[Mplayer-cvslog] CVS: main configure,1.380,1.381 Makefile,1.147,1.148 dec_video.c,1.95,1.96

Richard Felker CVS rfelker at mplayer.dev.hu
Sun Feb 3 01:52:54 CET 2002


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv4367

Modified Files:
	configure Makefile dec_video.c 
Log Message:
make opendivx codec optional at compiletime

Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.380
retrieving revision 1.381
diff -u -r1.380 -r1.381
--- configure	1 Feb 2002 13:10:35 -0000	1.380
+++ configure	3 Feb 2002 00:52:51 -0000	1.381
@@ -123,6 +123,8 @@
   --disable-win32        disable Win32 DLL support [autodetect]
   --disable-dshow        disable DirectShow support [autodetect]
   --disable-xanim        disable XAnim DLL support [autodetect]
+  --disable-divx4linux   disable Divx4Linux codec [enable]
+  --disable-opendivx     disable OpenDivx codec [enable]
   --enable-vorbis        build with OggVorbis support [autodetect]
   --disable-iconv        do not use iconv(3) function [autodetect]
   --disable-rtc          disable RTC (/dev/rtc) on Linux [autodetect]
@@ -742,6 +744,7 @@
 _streaming=yes
 _vidix=yes
 _divx4linux=auto
+_opendivx=yes
 _lirc=auto
 _gui=no
 _termcap=auto
@@ -843,6 +846,8 @@
   --disable-vidix)	_vidix=no	;;
   --enable-divx4linux)	_divx4linux=yes	;;
   --disable-divx4linux)	_divx4linux=no	;;
+  --enable-opendivx)	_opendivx=yes	;;
+  --disable-opendivx)	_opendivx=no	;;
   --enable-lirc)	_lirc=yes	;;
   --disable-lirc)	_lirc=no	;;
   --enable-gui)		_gui=yes	;;
@@ -2549,13 +2554,25 @@
   test "$_divx4linux_decore" = yes && _divx4linux=yes
 fi
 if test "$_divx4linux_decore" = yes ; then
+  _opendivx='no'
   _def_decore='#define NEW_DECORE 1'
   _ld_decore='-ldivxdecore opendivx/postprocess.o'
+  _def_divx='#define USE_DIVX'
+  _def_odivx_postprocess='#define HAVE_ODIVX_POSTPROCESS 1'
   _codecmodules="divx4linux $_codecmodules"
 else
-  _ld_decore='-Lopendivx -ldecore'
-  _def_decore='#undef NEW_DECORE'
-  _codecmodules="opendivx $_codecmodules"
+  if test "$_opendivx" = yes ; then
+    _ld_decore='-Lopendivx -ldecore'
+    _def_decore='#undef NEW_DECORE'
+    _def_divx='#define USE_DIVX'
+    _def_odivx_postprocess='#define HAVE_ODIVX_POSTPROCESS 1'
+    _codecmodules="opendivx $_codecmodules"
+  else
+    _ld_decore=''
+    _def_decore='#undef NEW_DECORE'
+    _def_divx='#undef USE_DIVX'
+    _def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS'
+  fi
 fi
 
 # mencoder requires (optional) those libs: libmp3lame and divx4linux encore
@@ -2874,6 +2891,8 @@
 STREAMING_LIB = $_ld_streaming
 VIDIX = $_vidix
 
+OPENDIVX = $_opendivx
+
 VO2 = $_vo2
 
 EXTRA_LIB = $_ld_extra
@@ -2972,6 +2991,9 @@
    -cache <kilobytes> */
 #define USE_STREAM_CACHE 1
 
+/* Define to include support for OpenDivx/Divx4Linux */
+$_def_divx
+
 /* Define for using new DivX4Linux library, instead of open-source OpenDivX */
 /* You have to change DECORE_LIBS in config.mak too! */
 $_def_decore
@@ -3064,7 +3086,8 @@
 /* Define this to enable image postprocessing in libavcodec (requires FAST cpu!) */
 $_def_ffpostprocess
 
-#define HAVE_ODIVX_POSTPROCESS 1
+/* Define to include support for OpenDivx postprocessing */
+$_def_odivx_postprocess
 
 /* Win32 DLL support */
 $_def_win32

Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/Makefile,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -r1.147 -r1.148
--- Makefile	1 Feb 2002 05:33:40 -0000	1.147
+++ Makefile	3 Feb 2002 00:52:51 -0000	1.148
@@ -53,7 +53,10 @@
 endif
 CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader $(VO_INC) $(EXTRA_INC) # -Wall
 
-PARTS = g72x libmpdemux mp3lib libac3 liba52 libmp1e libmpeg2 opendivx libavcodec libao2 drivers drivers/syncfb linux postproc xa input
+PARTS = g72x libmpdemux mp3lib libac3 liba52 libmp1e libmpeg2 libavcodec libao2 drivers drivers/syncfb linux postproc xa input
+ifeq ($(OPENDIVX),yes)
+PARTS += opendivx
+endif
 ifeq ($(VIDIX),yes)
 PARTS += libdha vidix
 endif
@@ -95,8 +98,11 @@
 .c.o:
 	$(CC) -c $(CFLAGS) -o $@ $<
 
-COMMON_DEPS = g72x/libg72x.a libmpdemux/libmpdemux.a libao2/libao2.a libac3/libac3.a liba52/liba52.a mp3lib/libMP3.a libmpeg2/libmpeg2.a opendivx/libdecore.a linux/libosdep.a postproc/libpostproc.a xa/libxa.a
+COMMON_DEPS = g72x/libg72x.a libmpdemux/libmpdemux.a libao2/libao2.a libac3/libac3.a liba52/liba52.a mp3lib/libMP3.a libmpeg2/libmpeg2.a linux/libosdep.a postproc/libpostproc.a xa/libxa.a
 
+ifeq ($(OPENDIVX),yes)
+COMMON_DEPS += opendivx/libdecore.a
+endif
 ifeq ($(VIDIX),yes)
 COMMON_DEPS += libdha/libdha.so vidix/libvidix.a
 endif

Index: dec_video.c
===================================================================
RCS file: /cvsroot/mplayer/main/dec_video.c,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- dec_video.c	2 Feb 2002 22:45:39 -0000	1.95
+++ dec_video.c	3 Feb 2002 00:52:51 -0000	1.96
@@ -80,11 +80,13 @@
     unsigned int lavc_pp=0;
 #endif
 
+#ifdef USE_DIVX
 #ifndef NEW_DECORE
 #include "opendivx/decore.h"
 #else
 #include <decore.h>
 #endif
+#endif
 
 #ifdef USE_XANIM
 #include "xacodec.h"
@@ -223,6 +225,7 @@
   case VFM_FFMPEG:
       return GET_PP_QUALITY_MAX;
 #endif
+#ifdef USE_DIVX
   case VFM_DIVX4:
   case VFM_ODIVX:
 #ifdef NEW_DECORE
@@ -230,6 +233,7 @@
 #else
       return GET_PP_QUALITY_MAX;  // for opendivx
 #endif
+#endif
  }
  return 0;
 }
@@ -262,6 +266,7 @@
     lavc_pp=getPpModeForQuality(quality);
     break;
 #endif
+#ifdef USE_DIVX
   case VFM_DIVX4:
   case VFM_ODIVX: {
    DEC_SET dec_set;
@@ -274,6 +279,7 @@
 #endif
    decore(0x123,DEC_OPT_SETPP,&dec_set,NULL);
   }
+#endif
   break;
  }
 }
@@ -403,10 +409,12 @@
 	xacodec_exit();
 	break;
 #endif
+#ifdef USE_DIVX
     case VFM_DIVX4:
     case VFM_ODIVX:
       decore(0x123,DEC_OPT_RELEASE,NULL,NULL);
       break;
+#endif
     }
     if(sh_video->our_out_buffer){
 	free(sh_video->our_out_buffer);
@@ -533,6 +541,10 @@
    return 0;
 #endif	/* !USE_WIN32DLL */
  case VFM_ODIVX: {  // OpenDivX
+#ifndef USE_DIVX
+   mp_msg(MSGT_DECVIDEO,MSGL_ERR,"MPlayer was compiled WITHOUT OpenDivx support!\n");
+   return 0;
+#else
    mp_msg(MSGT_DECVIDEO,MSGL_V,"OpenDivX video codec\n");
    { DEC_PARAM dec_param;
      DEC_SET dec_set;
@@ -550,6 +562,7 @@
    }
    mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: OpenDivX video codec init OK!\n");
    break;
+#endif
  }
  case VFM_DIVX4: {  // DivX4Linux
 #ifndef NEW_DECORE
@@ -813,6 +826,7 @@
     break;
   }
 #endif
+#ifdef USE_DIVX
   case VFM_ODIVX: {
     // OpenDivX
     DEC_FRAME dec_frame;
@@ -861,6 +875,7 @@
 
     break;
   }
+#endif
 #ifdef NEW_DECORE
   case VFM_DIVX4: {
     // DivX4Linux




More information about the MPlayer-cvslog mailing list