[MPlayer-dev-eng] [PATCH] remove USE_LIBAVUTIL_SO usage

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Mar 1 14:07:48 CET 2007


Hello,
since my [RFC] received no real objections I'd like to propose attached
patch.
The way I see it, in the future practically every file will use
libavutil, using USE_LIBAVUTIL_SO ifdef just leads to a big mess.
Linking against dynamic libavutil should be unaffected as long as the
libavutil subdirectory is there.
I someone is against it, I'd propose one of these alternative (to be
implemented by whoever requests them ;-) ):
1) a mplavutil.h or so that uses USE_LIBAVUTIL_SO to include the right
one.
2) using #include <avutil.h> and using the compiler include path to make
it use the right one.

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: libmpcodecs/vf_sab.c
===================================================================
--- libmpcodecs/vf_sab.c	(revision 22396)
+++ libmpcodecs/vf_sab.c	(working copy)
@@ -29,11 +29,7 @@
 #include <malloc.h>
 #endif
 
-#ifdef USE_LIBAVUTIL_SO
-#include <ffmpeg/avutil.h>
-#else
 #include "avutil.h"
-#endif
 #include "img_format.h"
 #include "mp_image.h"
 #include "vf.h"
Index: libmpcodecs/native/nuppelvideo.c
===================================================================
--- libmpcodecs/native/nuppelvideo.c	(revision 22396)
+++ libmpcodecs/native/nuppelvideo.c	(working copy)
@@ -20,11 +20,7 @@
 
 #include "libmpdemux/nuppelvideo.h" 
 #include "RTjpegN.h"
-#ifdef USE_LIBAVUTIL_SO
-#include <ffmpeg/lzo.h>
-#else
 #include "libavutil/lzo.h"
-#endif
 
 #define KEEP_BUFFER
 
Index: libmpcodecs/vf_smartblur.c
===================================================================
--- libmpcodecs/vf_smartblur.c	(revision 22396)
+++ libmpcodecs/vf_smartblur.c	(working copy)
@@ -29,11 +29,7 @@
 #include <malloc.h>
 #endif
 
-#ifdef USE_LIBAVUTIL_SO
-#include <ffmpeg/avutil.h>
-#else
 #include "avutil.h"
-#endif
 #include "img_format.h"
 #include "mp_image.h"
 #include "vf.h"
Index: libmpcodecs/vd_lzo.c
===================================================================
--- libmpcodecs/vd_lzo.c	(revision 22396)
+++ libmpcodecs/vd_lzo.c	(working copy)
@@ -6,11 +6,7 @@
 
 #include "vd_internal.h"
 
-#ifdef USE_LIBAVUTIL_SO
-#include <ffmpeg/lzo.h>
-#else
 #include "libavutil/lzo.h"
-#endif
 
 #define MOD_NAME "DecLZO"
 
Index: stream/realrtsp/real.c
===================================================================
--- stream/realrtsp/real.c	(revision 22396)
+++ stream/realrtsp/real.c	(working copy)
@@ -36,11 +36,7 @@
 #include "asmrp.h"
 #include "sdpplin.h"
 #include "xbuffer.h"
-#if USE_LIBAVUTIL_SO
-#include "ffmpeg/md5.h"
-#else
 #include "libavutil/md5.h"
-#endif
 #include "libavutil/intreadwrite.h"
 #include "../http.h"
 #include "mp_msg.h"
Index: fmt-conversion.h
===================================================================
--- fmt-conversion.h	(revision 22396)
+++ fmt-conversion.h	(working copy)
@@ -1,8 +1,4 @@
-#ifdef USE_LIBAVUTIL_SO
-#include <ffmpeg/avutil.h>
-#else
 #include "avutil.h"
-#endif
 #include "img_format.h"
 
 enum PixelFormat imgfmt2pixfmt(int fmt)
Index: spudec.c
===================================================================
--- spudec.c	(revision 22396)
+++ spudec.c	(working copy)
@@ -23,11 +23,7 @@
 #include <math.h>
 #include "libvo/video_out.h"
 #include "spudec.h"
-#ifdef USE_LIBAVUTIL_SO
-#include <ffmpeg/avutil.h>
-#else
 #include "avutil.h"
-#endif
 #include "libswscale/swscale.h"
 
 /* Valid values for spu_aamode:
Index: libvo/vo_md5sum.c
===================================================================
--- libvo/vo_md5sum.c	(revision 22396)
+++ libvo/vo_md5sum.c	(working copy)
@@ -39,11 +39,7 @@
 #include "video_out_internal.h"
 #include "mplayer.h"			/* for exit_player() */
 #include "help_mp.h"
-#ifdef USE_LIBAVUTIL_SO
-#include "ffmpeg/md5.h"
-#else
 #include "libavutil/md5.h"
-#endif
 
 /* ------------------------------------------------------------------------- */
 
Index: libmpdemux/demux_mkv.c
===================================================================
--- libmpdemux/demux_mkv.c	(revision 22396)
+++ libmpdemux/demux_mkv.c	(working copy)
@@ -36,11 +36,7 @@
 #include <zlib.h>
 #endif
 
-#ifdef USE_LIBAVUTIL_SO
-#include <ffmpeg/lzo.h>
-#else
 #include "libavutil/lzo.h"
-#endif
 
 static unsigned char sipr_swaps[38][2]={
     {0,63},{1,22},{2,44},{3,90},{5,81},{7,31},{8,86},{9,58},{10,36},{12,68},


More information about the MPlayer-dev-eng mailing list