mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 04:44:32 +01:00
make opendivx codec optional at compiletime
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4490 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
0234e8f3c7
commit
b106f93d00
10
Makefile
10
Makefile
@ -53,7 +53,10 @@ MISC_LIBS += -Llibdha -ldha -Lvidix -lvidix
|
||||
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 @@ all: $(ALL_PRG)
|
||||
.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
|
||||
|
31
configure
vendored
31
configure
vendored
@ -123,6 +123,8 @@ Optional features:
|
||||
--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 @@ _tv_v4l=auto
|
||||
_streaming=yes
|
||||
_vidix=yes
|
||||
_divx4linux=auto
|
||||
_opendivx=yes
|
||||
_lirc=auto
|
||||
_gui=no
|
||||
_termcap=auto
|
||||
@ -843,6 +846,8 @@ for ac_option do
|
||||
--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 @@ EOF
|
||||
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 = $_streaming
|
||||
STREAMING_LIB = $_ld_streaming
|
||||
VIDIX = $_vidix
|
||||
|
||||
OPENDIVX = $_opendivx
|
||||
|
||||
VO2 = $_vo2
|
||||
|
||||
EXTRA_LIB = $_ld_extra
|
||||
@ -2972,6 +2991,9 @@ $_def_dvdread
|
||||
-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 @@ $_def_css
|
||||
/* 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
|
||||
|
15
dec_video.c
15
dec_video.c
@ -80,11 +80,13 @@ static DS_VideoDecoder* ds_vdec=NULL;
|
||||
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,12 +225,14 @@ int get_video_quality_max(sh_video_t *sh_video){
|
||||
case VFM_FFMPEG:
|
||||
return GET_PP_QUALITY_MAX;
|
||||
#endif
|
||||
#ifdef USE_DIVX
|
||||
case VFM_DIVX4:
|
||||
case VFM_ODIVX:
|
||||
#ifdef NEW_DECORE
|
||||
return 9; // for divx4linux
|
||||
#else
|
||||
return GET_PP_QUALITY_MAX; // for opendivx
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
@ -262,6 +266,7 @@ void set_video_quality(sh_video_t *sh_video,int quality){
|
||||
lavc_pp=getPpModeForQuality(quality);
|
||||
break;
|
||||
#endif
|
||||
#ifdef USE_DIVX
|
||||
case VFM_DIVX4:
|
||||
case VFM_ODIVX: {
|
||||
DEC_SET dec_set;
|
||||
@ -274,6 +279,7 @@ void set_video_quality(sh_video_t *sh_video,int quality){
|
||||
#endif
|
||||
decore(0x123,DEC_OPT_SETPP,&dec_set,NULL);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -403,10 +409,12 @@ void uninit_video(sh_video_t *sh_video){
|
||||
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 @@ switch(sh_video->codec->driver){
|
||||
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 @@ switch(sh_video->codec->driver){
|
||||
}
|
||||
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 @@ switch(sh_video->codec->driver){
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#ifdef USE_DIVX
|
||||
case VFM_ODIVX: {
|
||||
// OpenDivX
|
||||
DEC_FRAME dec_frame;
|
||||
@ -861,6 +875,7 @@ switch(sh_video->codec->driver){
|
||||
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#ifdef NEW_DECORE
|
||||
case VFM_DIVX4: {
|
||||
// DivX4Linux
|
||||
|
Loading…
x
Reference in New Issue
Block a user