1
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 06:03:45 +01:00

Move #ifdefs around complete files into the build system.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18774 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2006-06-21 14:49:09 +00:00
parent 6b050a4ed0
commit 60f223f766
32 changed files with 124 additions and 169 deletions

17
configure vendored
View File

@ -6841,11 +6841,9 @@ fi
echores "$_menu"
if x86; then
# Check to see if they want QTX codecs enabled
echocheck "QTX codecs"
echocheck "QuickTime codecs"
if test "$_qtx" = auto ; then
_qtx=$_win32
test "$_win32" = yes || darwin && _qtx=yes
fi
if test "$_qtx" = yes ; then
_def_qtx='#define USE_QTX_CODECS 1'
@ -6855,7 +6853,6 @@ else
_nocodecmodules="qtx $_nocodecmodules"
fi
echores "$_qtx"
fi #if x86
echocheck "Subtitles sorting"
@ -7363,7 +7360,9 @@ CONFIG_PP = yes
CONFIG_MP3LAME = $_mp3lame
LIBMENU = $_menu
DIVX = $_divx
OPENDIVX = $_opendivx
DIVX4ENCORE = $_divx_encore
MP3LIB = $_mp3lib
LIBA52 = $_liba52
@ -7446,6 +7445,9 @@ SDL_INC = $_inc_sdl
WIN32DLL = $_win32
W32_DEP = $_dep_win32
W32_LIB = $_ld_win32
QTX_CODECS = $_qtx
REAL_CODECS = $_real
XANIM_CODECS = $_xanim
AV_DEP = $_dep_libavcodec $_dep_libavformat $_dep_libavutil $_dep_libpostproc
AV_LIB = $_ld_libavcodec $_ld_libavformat $_ld_libavutil $_ld_libpostproc
CONFIG_LIBAVUTIL = $_libavutil
@ -7459,10 +7461,12 @@ CONFIG_LIBPOSTPROC_SO = $_libpostproc_so
ZORAN = $_zr
FAME = $_libfame
FAME_LIB = $_ld_libfame
LIBDV = $_libdv
MP1E_DEP = $_dep_mp1e
MP1E_LIB = $_ld_mp1e
ARCH_LIB = $_ld_arch $_ld_iconv
XVID = $_xvid
XVID4 = $_xvid4
XVID_INC = $_inc_xvid
XVID_LIB = $_ld_xvid
X264 = $_x264
@ -7487,9 +7491,12 @@ FRIBIDI_LIB = $_ld_fribidi
LIBCDIO_INC = $_inc_libcdio
LIBCDIO_LIB = $_ld_libcdio
LIBLZO_LIB= $_ld_liblzo
LIBMAD = $_mad
MAD_LIB = $_ld_mad
LIBVORBIS = $_vorbis
VORBIS_LIB = $_ld_vorbis $_ld_libdv
SPEEX_LIB = $_ld_speex
LIBTHEORA = $_theora
THEORA_LIB = $_ld_theora
FAAD_LIB = $_ld_faad
INTERNAL_FAAD = $_faad_internal

View File

@ -10,10 +10,15 @@ LIBS+=$(LIBNAME2)
endif
AUDIO_SRCS_LIB=ad_hwac3.c \
ad_liba52.c \
ad_mp3lib.c \
ad_hwmpa.c \
ifeq ($(LIBA52),yes)
AUDIO_SRCS_LIB+=ad_liba52.c
endif
ifeq ($(MP3LIB),yes)
AUDIO_SRCS_LIB+=ad_mp3lib.c
endif
AUDIO_SRCS_NAT=ad_alaw.c \
ad_dk3adpcm.c \
ad_dvdpcm.c \
@ -22,35 +27,47 @@ AUDIO_SRCS_NAT=ad_alaw.c \
ad_msgsm.c \
ad_pcm.c \
AUDIO_SRCS_OPT=ad_acm.c \
ad_faad.c \
ad_libdv.c \
ad_libmad.c \
ad_libvorbis.c \
ad_qtaudio.c \
ad_realaud.c \
ad_twin.c \
ifeq ($(CONFIG_LIBAVCODEC),yes)
AUDIO_SRCS_OPT+=ad_ffmpeg.c
endif
ifeq ($(CONFIG_LIBAVCODEC_SO),yes)
AUDIO_SRCS_OPT+=ad_ffmpeg.c
endif
ifeq ($(WIN32DLL),yes)
AUDIO_SRCS_OPT+=ad_dshow.c ad_dmo.c
endif
AUDIO_SRCS=dec_audio.c \
ad.c \
$(AUDIO_SRCS_LIB) \
$(AUDIO_SRCS_NAT) \
$(AUDIO_SRCS_OPT) \
VIDEO_SRCS_LIB=vd_libmpeg2.c \
vd_lzo.c \
ifeq ($(CONFIG_LIBAVCODEC),yes)
AUDIO_SRCS+=ad_ffmpeg.c
endif
ifeq ($(CONFIG_LIBAVCODEC_SO),yes)
AUDIO_SRCS+=ad_ffmpeg.c
endif
ifeq ($(WIN32DLL),yes)
AUDIO_SRCS+=ad_acm.c ad_dmo.c ad_dshow.c ad_twin.c
endif
ifeq ($(QTX_CODECS),yes)
AUDIO_SRCS+=ad_qtaudio.c
endif
ifeq ($(REAL_CODECS),yes)
AUDIO_SRCS+=ad_realaud.c
endif
ifeq ($(FAAD),yes)
AUDIO_SRCS += ad_faad.c
endif
ifeq ($(LIBDV),yes)
AUDIO_SRCS+=ad_libdv.c
endif
ifeq ($(LIBMAD),yes)
AUDIO_SRCS+=ad_libmad.c
endif
ifeq ($(LIBVORBIS),yes)
AUDIO_SRCS+=ad_libvorbis.c
endif
VIDEO_SRCS_LIB=vd_lzo.c \
vd_nuv.c \
ifeq ($(LIBMPEG2),yes)
VIDEO_SRCS_LIB+=vd_libmpeg2.c
endif
VIDEO_SRCS_NAT=vd_hmblck.c \
vd_mpegpes.c \
vd_mtga.c \
@ -58,34 +75,52 @@ VIDEO_SRCS_NAT=vd_hmblck.c \
vd_raw.c \
vd_sgi.c \
VIDEO_SRCS_OPT=vd_divx4.c \
vd_libdv.c \
vd_odivx.c \
vd_qtvideo.c \
vd_realvid.c \
vd_theora.c \
vd_vfw.c \
vd_vfwex.c \
vd_xanim.c \
vd_xvid4.c \
vd_xvid.c \
vd_zrmjpeg.c \
ifeq ($(CONFIG_LIBAVCODEC),yes)
VIDEO_SRCS_OPT+=vd_ffmpeg.c
endif
ifeq ($(CONFIG_LIBAVCODEC_SO),yes)
VIDEO_SRCS_OPT+=vd_ffmpeg.c
endif
ifeq ($(WIN32DLL),yes)
VIDEO_SRCS_OPT+=vd_dmo.c vd_dshow.c
endif
VIDEO_SRCS=dec_video.c \
vd.c \
$(VIDEO_SRCS_NAT) \
$(VIDEO_SRCS_LIB) \
$(VIDEO_SRCS_OPT) \
ifeq ($(CONFIG_LIBAVCODEC),yes)
VIDEO_SRCS+=vd_ffmpeg.c
endif
ifeq ($(CONFIG_LIBAVCODEC_SO),yes)
VIDEO_SRCS+=vd_ffmpeg.c
endif
ifeq ($(WIN32DLL),yes)
VIDEO_SRCS+=vd_dmo.c vd_dshow.c vd_vfw.c vd_vfwex.c
endif
ifeq ($(QTX_CODECS),yes)
VIDEO_SRCS+=vd_qtvideo.c
endif
ifeq ($(REAL_CODECS),yes)
VIDEO_SRCS+=vd_realvid.c
endif
ifeq ($(XANIM_CODECS),yes)
VIDEO_SRCS+=vd_xanim.c
endif
ifeq ($(LIBDV),yes)
VIDEO_SRCS+=vd_libdv.c
endif
ifeq ($(LIBTHEORA),yes)
VIDEO_SRCS+=vd_theora.c
endif
ifeq ($(DIVX),yes)
VIDEO_SRCS+=vd_odivx.c
ifneq ($(OPENDIVX),yes)
VIDEO_SRCS+=vd_divx4.c
endif
endif
ifeq ($(XVID4),yes)
VIDEO_SRCS+=vd_xvid4.c
else
ifeq ($(XVID),yes)
VIDEO_SRCS+=vd_xvid.c
endif
endif
ifeq ($(ZORAN),yes)
VIDEO_SRCS+=vd_zrmjpeg.c
endif
VFILTER_SRCS=vf.c \
pullup.c \
@ -150,7 +185,6 @@ VFILTER_SRCS=vf.c \
vf_yuvcsp.c \
vf_yuy2.c \
vf_yvu9.c \
vf_screenshot.c \
vf_yadif.c \
VFILTER_LAVC_SRCS += vf_lavc.c \
@ -177,17 +211,16 @@ ifeq ($(CONFIG_LIBAVCODEC_SO),yes)
VFILTER_SRCS += $(VFILTER_LAVC_SRCS)
endif
ifeq ($(PNG),yes)
VFILTER_SRCS += vf_screenshot.c
endif
ENCODER_SRCS=ae.c \
ae_pcm.c \
ve.c \
ve_divx4.c \
ve_libdv.c \
ve_nuv.c \
ve_qtvideo.c \
ve_raw.c \
ve_vfw.c \
ve_xvid4.c \
ve_xvid.c \
ifeq ($(CONFIG_LIBAVCODEC),yes)
ENCODER_SRCS+=ve_lavc.c
@ -195,11 +228,30 @@ endif
ifeq ($(CONFIG_LIBAVCODEC_SO),yes)
ENCODER_SRCS+=ve_lavc.c
endif
ifeq ($(WIN32DLL),yes)
ENCODER_SRCS+=ve_vfw.c
endif
ifeq ($(QTX_CODECS),yes)
ENCODER_SRCS+=ve_qtvideo.c
endif
ifeq ($(LIBDV),yes)
ENCODER_SRCS+=ve_libdv.c
endif
ifeq ($(XVID4),yes)
ENCODER_SRCS+=ve_xvid4.c
else
ifeq ($(XVID),yes)
ENCODER_SRCS+=ve_xvid.c
endif
endif
ifeq ($(DIVX4ENCORE),yes)
ENCODER_SRCS+=ve_divx4.c
endif
ifeq ($(X264),yes)
ENCODER_SRCS+=ve_x264.c
endif
NATIVE_SRCS=native/minilzo.c \
native/nuppelvideo.c \
native/RTjpegN.c \

View File

@ -6,8 +6,6 @@
#include "mp_msg.h"
#include "help_mp.h"
#ifdef USE_WIN32DLL
#include "wineacm.h"
#include "ad_internal.h"
@ -243,4 +241,3 @@ static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int m
}
return len;
}
#endif

View File

@ -11,8 +11,6 @@
#include "config.h"
#include "ad_internal.h"
#ifdef HAVE_FAAD
static ad_info_t info =
{
"AAC (MPEG2/4 Advanced Audio Coding)",
@ -284,6 +282,3 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen)
}
return len;
}
#endif /* !HAVE_FAAD */

View File

@ -5,7 +5,6 @@
#include <assert.h>
#include "config.h"
#ifdef USE_LIBA52
#include "mp_msg.h"
#include "help_mp.h"
@ -316,4 +315,3 @@ static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int m
assert(len <= maxlen);
return len;
}
#endif

View File

@ -9,8 +9,6 @@
#include "mp_msg.h"
#include "help_mp.h"
#ifdef HAVE_LIBDV095
#include "img_format.h"
#include <libdv/dv.h>
@ -111,6 +109,3 @@ static int decode_audio(sh_audio_t *audio, unsigned char *buf, int minlen, int m
}
return len*2;
}
#endif

View File

@ -6,8 +6,6 @@
#include "config.h"
#ifdef USE_LIBMAD
#include "ad_internal.h"
static ad_info_t info = {
@ -171,4 +169,3 @@ static int control(sh_audio_t *sh,int cmd,void* arg, ...){
}
return CONTROL_UNKNOWN;
}
#endif

View File

@ -8,8 +8,6 @@
#include "config.h"
#include "ad_internal.h"
#ifdef HAVE_OGGVORBIS
static ad_info_t info =
{
"Ogg/Vorbis audio decoder",
@ -322,6 +320,3 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen)
return len;
}
#endif /* !HAVE_OGGVORBIS */

View File

@ -3,7 +3,6 @@
#include <unistd.h>
#include "config.h"
#ifdef USE_MP3LIB
#include "ad_internal.h"
@ -80,4 +79,3 @@ static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int m
{
return MP3_DecodeFrame(buf,-1);
}
#endif

View File

@ -6,7 +6,6 @@
#include "config.h"
#include "mp_msg.h"
#if defined(USE_QTX_CODECS) || defined(MACOSX)
#include "wine/windef.h"
#include "ad_internal.h"
@ -30,7 +29,7 @@ static ad_info_t info = {
LIBAD_EXTERN(qtaudio)
#if defined(USE_QTX_CODECS) && !defined(MACOSX)
#if !defined(MACOSX)
typedef struct OpaqueSoundConverter* SoundConverter;
typedef unsigned long OSType;
typedef unsigned long UnsignedFixed;
@ -164,7 +163,7 @@ static int loader_init()
mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"loader_init DONE???\n");
return 0;
}
#endif /* USE_QTX_CODECS */
#endif /* #if !defined(MACOSX) */
static SoundConverter myConverter = NULL;
static SoundComponentData InputFormatInfo,OutputFormatInfo;
@ -334,5 +333,3 @@ static int control(sh_audio_t *sh,int cmd,void* arg, ...){
// various optional functions you MAY implement:
return CONTROL_UNKNOWN;
}
#endif

View File

@ -5,8 +5,6 @@
#include "config.h"
#ifdef USE_REALCODECS
//#include <stddef.h>
#ifdef HAVE_LIBDL
#include <dlfcn.h>
@ -449,5 +447,3 @@ static int control(sh_audio_t *sh,int cmd,void* arg, ...){
}
return CONTROL_UNKNOWN;
}
#endif

View File

@ -3,8 +3,6 @@
#include <unistd.h>
#include "config.h"
#ifdef USE_WIN32DLL
#include "ad_internal.h"
#include "vqf.h"
#include "loader/ldt_keeper.h"
@ -506,5 +504,3 @@ int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen)
}
return len;
}
#endif

View File

@ -7,9 +7,6 @@
#include "mp_msg.h"
#include "help_mp.h"
#ifdef USE_DIVX
#ifdef NEW_DECORE
#include "vd_internal.h"
static vd_info_t info = {
@ -328,5 +325,3 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
return mpi;
}
#endif /* NEW_DECORE */
#endif /* USE_DIVX */

View File

@ -7,8 +7,6 @@
#include "config.h"
#ifdef HAVE_LIBDV095
#include "img_format.h"
#include <libdv/dv.h>
@ -83,5 +81,3 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags)
return mpi;
}
#endif

View File

@ -2,7 +2,6 @@
#include <stdlib.h>
#include "config.h"
#ifdef USE_LIBMPEG2
#include "mp_msg.h"
@ -269,4 +268,3 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
}
}
}
#endif

View File

@ -4,8 +4,6 @@
#include "config.h"
#include "mp_msg.h"
#ifdef HAVE_PNG
#include <png.h>
#include "bswap.h"
@ -160,5 +158,3 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
return mpi;
}
#endif

View File

@ -6,8 +6,6 @@
#include "mp_msg.h"
#include "help_mp.h"
#ifdef USE_DIVX
#include "vd_internal.h"
static vd_info_t info = {
@ -296,6 +294,3 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
return mpi;
}
#endif

View File

@ -3,7 +3,6 @@
#include "config.h"
#if defined(USE_QTX_CODECS) || defined(MACOSX)
#include "wine/windef.h"
#include "mp_msg.h"
@ -30,11 +29,7 @@ LIBVD_EXTERN(qtvideo)
#define dump_ImageDescription(x)
#else
#include "qtx/qtxsdk/components.h"
#endif
#if defined(USE_QTX_CODECS) && !defined(MACOSX)
//#include "wine/windef.h"
HMODULE WINAPI LoadLibraryA(LPCSTR);
FARPROC WINAPI GetProcAddress(HMODULE,LPCSTR);
int WINAPI FreeLibrary(HMODULE);
@ -55,7 +50,7 @@ static ImageDescriptionHandle framedescHandle;
static HINSTANCE qtime_qts; // handle to the preloaded quicktime.qts
static HMODULE handler;
#if defined(USE_QTX_CODECS) && !defined(MACOSX)
#if !defined(MACOSX)
static Component (*FindNextComponent)(Component prev,ComponentDescription* desc);
static OSErr (*GetComponentInfo)(Component prev,ComponentDescription* desc,Handle h1,Handle h2,Handle h3);
static long (*CountComponents)(ComponentDescription* desc);
@ -90,7 +85,7 @@ static OSErr (*QTNewGWorldFromPtr)(GWorldPtr *gw,
void *baseAddr,
long rowBytes);
static OSErr (*NewHandleClear)(Size byteCount);
#endif /* #if defined(USE_QTX_CODECS) && !defined(MACOSX) */
#endif /* #if !defined(MACOSX) */
// to set/get/query special features/parameters
static int control(sh_video_t *sh,int cmd,void* arg,...){
@ -438,4 +433,3 @@ if((int)sh->context==0x73797639){ // Sorenson 16-bit YUV -> std YVU9
return mpi;
}
#endif /* #if defined(USE_QTX_CODECS) || defined(MACOSX) */

View File

@ -2,7 +2,6 @@
#include <stdlib.h>
#include "config.h"
#ifdef USE_REALCODECS
#ifdef HAVE_LIBDL
#include <dlfcn.h>
@ -356,5 +355,3 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
return (result?NULL:mpi);
}
#endif

View File

@ -7,8 +7,6 @@
#include "mp_msg.h"
#include "help_mp.h"
#ifdef HAVE_OGGTHEORA
#include "vd_internal.h"
static vd_info_t info = {
@ -179,5 +177,3 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags)
return mpi;
}
#endif

View File

@ -5,8 +5,6 @@
#include "mp_msg.h"
#include "help_mp.h"
#ifdef USE_WIN32DLL
#include "vd_internal.h"
#include "wine/driver.h"
@ -341,4 +339,3 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
return mpi;
}
#endif

View File

@ -14,7 +14,6 @@
#include "config.h"
#ifdef USE_XANIM
#include "mp_msg.h"
#include "vd_internal.h"
@ -822,4 +821,3 @@ static mp_image_t* decode(sh_video_t *sh, void *data, int len, int flags)
return priv->mpi;
}
#endif

View File

@ -4,8 +4,6 @@
#include "config.h"
#include "mp_msg.h"
#ifdef HAVE_XVID3
#include "vd_internal.h"
#include "m_option.h"
@ -247,4 +245,3 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
return mpi;
}
#endif //have_xvid

View File

@ -31,8 +31,6 @@
#include "config.h"
#include "mp_msg.h"
#ifdef HAVE_XVID4
#include "vd_internal.h"
#include "m_option.h"
@ -391,7 +389,5 @@ static vd_info_t info =
LIBVD_EXTERN(xvid)
#endif /* HAVE_XVID4 */
/* Please do not change that tag comment.
* arch-tag: b7d654a5-76ea-4768-9713-2c791567fe7d mplayer xvid decoder module */

View File

@ -5,8 +5,6 @@
#include "config.h"
#include "mp_msg.h"
#ifdef HAVE_DIVX4ENCORE
#include "codec-cfg.h"
#include "stream.h"
#include "demuxer.h"
@ -488,4 +486,3 @@ vf_info_t ve_info_divx4 = {
};
//===========================================================================//
#endif

View File

@ -8,8 +8,6 @@
#include "config.h"
#include "mp_msg.h"
#ifdef HAVE_LIBDV095
#include "codec-cfg.h"
#include "stream.h"
#include "demuxer.h"
@ -116,4 +114,3 @@ vf_info_t ve_info_libdv = {
};
//===========================================================================//
#endif

View File

@ -16,7 +16,6 @@
#include "ldt_keeper.h"
#endif
#ifdef USE_QTX_CODECS
#include "loader/qtx/qtxsdk/components.h"
#include "wine/windef.h"
@ -341,4 +340,3 @@ vf_info_t ve_info_qtvideo = {
};
//===========================================================================//
#endif

View File

@ -5,7 +5,6 @@
#include <inttypes.h>
#include "config.h"
#ifdef USE_WIN32DLL
#include "mp_msg.h"
#include "help_mp.h"
@ -290,4 +289,3 @@ vf_info_t ve_info_vfw = {
};
//===========================================================================//
#endif

View File

@ -12,8 +12,6 @@
#include "config.h"
#include "mp_msg.h"
#ifdef HAVE_XVID3
#include "codec-cfg.h"
#include "stream.h"
#include "demuxer.h"
@ -587,4 +585,3 @@ vf_info_t ve_info_xvid = {
};
//===========================================================================//
#endif

View File

@ -36,8 +36,6 @@
#include "config.h"
#include "mp_msg.h"
#ifdef HAVE_XVID4
#include "codec-cfg.h"
#include "stream.h"
#include "demuxer.h"
@ -1597,7 +1595,5 @@ vf_info_t ve_info_xvid = {
};
#endif /* HAVE_XVID4 */
/* Please do not change that tag comment.
* arch-tag: 42ccc257-0548-4a3e-9617-2876c4e8ac88 mplayer xvid encoder module */

View File

@ -7,8 +7,6 @@
#include "mp_msg.h"
#include "help_mp.h"
//#ifdef USE_LIBFAME
// 100=best >=80 very good >=50 fast
#define QUALITY 90
@ -151,4 +149,3 @@ vf_info_t vf_info_fame = {
};
//===========================================================================//
//#endif

View File

@ -1,5 +1,4 @@
#include "config.h"
#ifdef HAVE_PNG
#include <stdio.h>
#include <stdlib.h>
@ -299,5 +298,3 @@ vf_info_t vf_info_screenshot = {
};
//===========================================================================//
#endif /* HAVE_PNG */