[MPlayer-dev-eng] [PATCH] libavcodec shared library

Alexander Gottwald Alexander.Gottwald at informatik.tu-chemnitz.de
Tue Aug 13 22:06:27 CEST 2002


Hi,

This patch enables the libavcodec shared library detection and usage.
I changed the path and library name to the ones used by ffmpegs
make install/make installlib.

bye
    ago
-- 
 Alexander.Gottwald at informatik.tu-chemnitz.de
 http://www.gotti.org           ICQ: 126018723
-------------- next part --------------
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.536
diff -U3 -r1.536 configure
--- configure	11 Aug 2002 17:14:41 -0000	1.536
+++ configure	13 Aug 2002 20:18:30 -0000
@@ -903,7 +903,7 @@
 # and have - unless stated otherwise - at least 2 states : yes no
 # If autodetection is available then the third state is: auto
 _libavcodec=auto
-_libavcodecso=no # changed default to no as it causes problems - atmos
+_libavcodecso=auto 
 _fame=auto
 _mp1e=no
 _mencoder=yes
@@ -3516,15 +3516,18 @@
 # FIXME : check for avcodec_find_encoder_by_name() for mencoder
   cat > $TMPC << EOF
 #define FF_POSTPROCESS 1 
-#include <libffmpeg/avcodec.h>
+#include <ffmpeg/avcodec.h>
 int quant_store[MBR+1][MBC+1];
-int main(void) { return 0; }
+int main(void) { 
+    avcodec_find_encoder_by_name("");
+    return 0; 
+}
 EOF
-  if cc_check -lffmpeg -lm ; then
+  if cc_check -lavcodec -lm ; then
     _libavcodecso=yes
-    echores "yes (using libffmpeg.so)"
+    echores "yes (using libavcodec.so)"
   else
-    echores "no (libffmpeg.so is broken/obsolete)"
+    echores "no (libavcodec.so is broken/obsolete)"
   fi
 else
   echores "$_libavcodecso"
@@ -3541,8 +3544,9 @@
   _def_ffpostprocess='#define FF_POSTPROCESS 1'
   _codecmodules="libavcodec $_codecmodules"
 elif test "$_libavcodecso" = yes ; then
+  _def_libavcodec='#define USE_LIBAVCODEC 1'
   _def_libavcodecso='#define USE_LIBAVCODEC_SO 1'
-  _ld_libavcodec='-lffmpeg'
+  _ld_libavcodec='-lavcodec'
   _def_ffpostprocess='#define FF_POSTPROCESS 1'
   _codecmodules="libavcodec.so $_codecmodules"
 else
Index: libmpcodecs/ad_ffmpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ad_ffmpeg.c,v
retrieving revision 1.4
diff -U3 -r1.4 ad_ffmpeg.c
--- libmpcodecs/ad_ffmpeg.c	3 Apr 2002 21:01:15 -0000	1.4
+++ libmpcodecs/ad_ffmpeg.c	13 Aug 2002 20:18:34 -0000
@@ -27,7 +27,7 @@
 #define assert(x)
 
 #ifdef USE_LIBAVCODEC_SO
-#include <libffmpeg/avcodec.h>
+#include <ffmpeg/avcodec.h>
 #else
 #include "libavcodec/avcodec.h"
 #endif
Index: libmpcodecs/vd_ffmpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_ffmpeg.c,v
retrieving revision 1.43
diff -U3 -r1.43 vd_ffmpeg.c
--- libmpcodecs/vd_ffmpeg.c	4 Aug 2002 16:27:52 -0000	1.43
+++ libmpcodecs/vd_ffmpeg.c	13 Aug 2002 20:18:36 -0000
@@ -28,7 +28,7 @@
 
 
 #ifdef USE_LIBAVCODEC_SO
-#include <libffmpeg/avcodec.h>
+#include <ffmpeg/avcodec.h>
 #else
 #include "libavcodec/avcodec.h"
 #endif
Index: libmpcodecs/ve_lavc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_lavc.c,v
retrieving revision 1.19
diff -U3 -r1.19 ve_lavc.c
--- libmpcodecs/ve_lavc.c	7 Aug 2002 00:08:57 -0000	1.19
+++ libmpcodecs/ve_lavc.c	13 Aug 2002 20:18:38 -0000
@@ -30,7 +30,7 @@
 //===========================================================================//
 
 #ifdef USE_LIBAVCODEC_SO
-#include <libffmpeg/avcodec.h>
+#include <ffmpeg/avcodec.h>
 #else
 #include "libavcodec/avcodec.h"
 #endif
Index: libmpcodecs/vf_lavc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_lavc.c,v
retrieving revision 1.3
diff -U3 -r1.3 vf_lavc.c
--- libmpcodecs/vf_lavc.c	8 May 2002 22:11:14 -0000	1.3
+++ libmpcodecs/vf_lavc.c	13 Aug 2002 20:18:39 -0000
@@ -16,7 +16,7 @@
 //#include "../libvo/fastmemcpy.h"
 
 #ifdef USE_LIBAVCODEC_SO
-#include <libffmpeg/avcodec.h>
+#include <ffmpeg/avcodec.h>
 #else
 #include "libavcodec/avcodec.h"
 #endif
Index: libmpcodecs/vf_lavcdeint.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_lavcdeint.c,v
retrieving revision 1.2
diff -U3 -r1.2 vf_lavcdeint.c
--- libmpcodecs/vf_lavcdeint.c	31 Jul 2002 20:18:44 -0000	1.2
+++ libmpcodecs/vf_lavcdeint.c	13 Aug 2002 20:18:40 -0000
@@ -16,7 +16,7 @@
 //#include "../libvo/fastmemcpy.h"
 
 #ifdef USE_LIBAVCODEC_SO
-#include <libffmpeg/avcodec.h>
+#include <ffmpeg/avcodec.h>
 #else
 #include "libavcodec/avcodec.h"
 #endif


More information about the MPlayer-dev-eng mailing list