[Opalvoip-svn] SF.net SVN: opalvoip:[29601] opal/trunk/plugins
Brought to you by:
csoutheren,
rjongbloed
From: <rjo...@us...> - 2013-04-29 19:59:55
|
Revision: 29601 http://sourceforge.net/p/opalvoip/code/29601 Author: rjongbloed Date: 2013-04-29 19:59:49 +0000 (Mon, 29 Apr 2013) Log Message: ----------- Fixed issues with Mac "port" version of FFMPEG Modified Paths: -------------- opal/trunk/plugins/configure opal/trunk/plugins/configure.ac opal/trunk/plugins/video/common/dyna.cxx opal/trunk/plugins/video/common/ffmpeg.cxx Modified: opal/trunk/plugins/configure =================================================================== --- opal/trunk/plugins/configure 2013-04-29 19:04:32 UTC (rev 29600) +++ opal/trunk/plugins/configure 2013-04-29 19:59:49 UTC (rev 29601) @@ -7411,7 +7411,16 @@ if test "x$HAVE_LIBAVCODEC" = "xyes" ; then + cat >>confdefs.h <<_ACEOF +#define LIBAVCODEC_LIB_NAME "libavcodec.$SHAREDLIBEXT" +_ACEOF + cat >>confdefs.h <<_ACEOF +#define LIBAVUTIL_LIB_NAME "libavutil.$SHAREDLIBEXT" +_ACEOF + + + oldCPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $LIBAVCODEC_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libavcodec has rtp_mode" >&5 Modified: opal/trunk/plugins/configure.ac =================================================================== --- opal/trunk/plugins/configure.ac 2013-04-29 19:04:32 UTC (rev 29600) +++ opal/trunk/plugins/configure.ac 2013-04-29 19:59:49 UTC (rev 29601) @@ -162,6 +162,9 @@ AC_SUBST(HAVE_LIBAVCODEC_RTP_MODE, 0) if test "x$HAVE_LIBAVCODEC" = "xyes" ; then + AC_DEFINE_UNQUOTED(LIBAVCODEC_LIB_NAME, "libavcodec.$SHAREDLIBEXT") + AC_DEFINE_UNQUOTED(LIBAVUTIL_LIB_NAME, "libavutil.$SHAREDLIBEXT") + MY_COMPILE_IFELSE( [if libavcodec has rtp_mode], [$LIBAVCODEC_CFLAGS], Modified: opal/trunk/plugins/video/common/dyna.cxx =================================================================== --- opal/trunk/plugins/video/common/dyna.cxx 2013-04-29 19:04:32 UTC (rev 29600) +++ opal/trunk/plugins/video/common/dyna.cxx 2013-04-29 19:59:49 UTC (rev 29601) @@ -48,22 +48,22 @@ return true; // Try the current directory - if (InternalOpen(".", name)) - return true; - + char ptlibPath[1024] = "."; // try directories specified in PTLIBPLUGINDIR - char ptlibPath[1024]; char * env = ::getenv("PTLIBPLUGINDIR"); - if (env != NULL) - strcpy(ptlibPath, env); - else + if (env != NULL && *env != '\0') { + strcat(ptlibPath, DIR_TOKENISER); + strcat(ptlibPath, env); + } + else { #ifdef P_DEFAULT_PLUGIN_DIR - strcpy(ptlibPath, P_DEFAULT_PLUGIN_DIR); + strcat(ptlibPath, DIR_TOKENISER P_DEFAULT_PLUGIN_DIR); #elif _WIN32 - strcpy(ptlibPath, "C:\\PTLib_Plugins"); -#else - strcpy(ptlibPath, "/usr/local/lib:/opt/local/lib"); + strcat(ptlibPath, DIR_TOKENISER "C:\\PTLib_Plugins"); #endif + } + strcat(ptlibPath, DIR_TOKENISER "/usr/local/lib:/opt/local/lib"); + char * p = ::strtok(ptlibPath, DIR_TOKENISER); while (p != NULL) { if (InternalOpen(p, name)) @@ -113,11 +113,11 @@ #ifndef _WIN32 const char * err = dlerror(); if (err != NULL) - PTRACE(1, "DynaLink", "dlopen error " << err); + PTRACE(3, "DynaLink", "dlopen error " << err); else - PTRACE(1, "DynaLink", "dlopen error loading " << path); + PTRACE(3, "DynaLink", "dlopen error loading " << path); #else /* _WIN32 */ - PTRACE(1, "DynaLink", "Error loading " << path); + PTRACE(3, "DynaLink", "Error loading " << path); #endif /* _WIN32 */ return false; } Modified: opal/trunk/plugins/video/common/ffmpeg.cxx =================================================================== --- opal/trunk/plugins/video/common/ffmpeg.cxx 2013-04-29 19:04:32 UTC (rev 29600) +++ opal/trunk/plugins/video/common/ffmpeg.cxx 2013-04-29 19:59:49 UTC (rev 29601) @@ -145,8 +145,7 @@ return false; } - if (!m_libAvcodec.GetFunction("avcodec_init", (DynaLink::Function &)Favcodec_init)) - return false; + m_libAvcodec.GetFunction("avcodec_init", (DynaLink::Function &)Favcodec_init); if (!m_libAvcodec.GetFunction("av_init_packet", (DynaLink::Function &)Fav_init_packet)) return false; @@ -207,8 +206,9 @@ << (libVer >> 16) << ((libVer>>8) & 0xff) << (libVer & 0xff)); } - Favcodec_init(); - Favcodec_register_all (); + if (Favcodec_init != NULL) + Favcodec_init(); + Favcodec_register_all(); #if PLUGINCODEC_TRACING AvLogSetLevel(AV_LOG_DEBUG); @@ -357,7 +357,7 @@ delete m_fullFrame; - PTRACE(4, m_prefix, "Encoder closed"); + PTRACE(4, m_prefix, "Codec closed"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |