[Ekiga-devel-list] Building libopal with recent ffmpeg/libavcodec



I saw in this message http://mail.gnome.org/archives/ekiga-list/2011-January/msg00026.html that there were problems using libopal with current libx264. I had a few problems compiling the H263/H264/MPEG4 plugins and wrote the attached patch to address them. Now the code compiles, but I haven't got anyone else running Ekiga to test against. Anyone out there able to try this?

(You can probably ignore the configure diff; that was an earlier hack when I only had static libraries for libavcodec and so the configure test failed to link. The problem doesn't occur when you have shared libraries that are already linked against their dependencies.)

PS: I was just pointed to https://bugzilla.gnome.org/show_bug.cgi?id=596006 so I've attached a part of this patch there as well.
--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/
Index: plugins/configure
===================================================================
--- plugins/configure	(revision 25030)
+++ plugins/configure	(working copy)
@@ -6527,7 +6527,7 @@
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lavcodec  $LIBS"
+LIBS="$LIBAVCODEC_LIBS  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -6569,7 +6569,7 @@
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lavcodec  $LIBS"
+LIBS="$LIBAVCODEC_LIBS  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -6611,7 +6611,7 @@
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lavcodec  $LIBS"
+LIBS="$LIBAVCODEC_LIBS  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
Index: plugins/video/H.264/gpl/x264loader_unix.cxx
===================================================================
--- plugins/video/H.264/gpl/x264loader_unix.cxx	(revision 25030)
+++ plugins/video/H.264/gpl/x264loader_unix.cxx	(working copy)
@@ -38,6 +38,9 @@
   }
 }
 
+#define str(x)	#x
+#define xstr(x)	str(x)
+
 bool X264Library::Load()
 {
   if (_isLoaded)
@@ -53,7 +56,8 @@
     return false;
   }
 
-  if (!GetFunction("x264_encoder_open", (Function &)Xx264_encoder_open)) {
+  if (!GetFunction("x264_encoder_open", (Function &)Xx264_encoder_open) &&
+  	!GetFunction(xstr(x264_encoder_open), (Function &)Xx264_encoder_open)) {
     TRACE (1, "H264\tDYNA\tFailed to load x264_encoder_open");
     return false;
   }
Index: plugins/video/H.264/h264-x264.h
===================================================================
--- plugins/video/H.264/h264-x264.h	(revision 25030)
+++ plugins/video/H.264/h264-x264.h	(working copy)
@@ -39,6 +39,8 @@
 #ifndef __H264_X264_H__
 #define __H264_X264_H__ 1
 
+#define __STDC_CONSTANT_MACROS
+
 #include "plugin-config.h"
 
 #include <stdarg.h>
Index: plugins/video/H.263-1998/h263-1998.h
===================================================================
--- plugins/video/H.263-1998/h263-1998.h	(revision 25030)
+++ plugins/video/H.263-1998/h263-1998.h	(working copy)
@@ -48,6 +48,7 @@
 
 #ifndef __H263P_1998_H__
 #define __H263P_1998_H__ 1
+#define __STDC_CONSTANT_MACROS
 #include <codec/opalplugin.h>
 #include "h263pframe.h"
 #include "rfc2190.h"
Index: plugins/video/H.263-1998/h263pframe.h
===================================================================
--- plugins/video/H.263-1998/h263pframe.h	(revision 25030)
+++ plugins/video/H.263-1998/h263pframe.h	(working copy)
@@ -23,6 +23,7 @@
 #ifndef __H263PFrame_H__
 #define __H263PFrame_H__ 1
 
+#define __STDC_CONSTANT_MACROS
 #include "plugin-config.h"
 
 #include <stdint.h>
Index: plugins/video/common/dyna.h
===================================================================
--- plugins/video/common/dyna.h	(revision 25030)
+++ plugins/video/common/dyna.h	(working copy)
@@ -65,6 +65,7 @@
 
 
 extern "C" {
+#define __STDC_CONSTANT_MACROS
 #include LIBAVCODEC_HEADER
 };
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]