diff --git a/configure b/configure index 499f4a0c7f..1f671ae5dc 100755 --- a/configure +++ b/configure @@ -4973,30 +4973,35 @@ _def_alsa_asoundlib_h='#undef HAVE_ALSA_ASOUNDLIB_H' if test "$_alsaver" ; then _alsa=yes if test "$_alsaver" = '0.5.x' ; then + _alsa5=yes _aosrc="$_aosrc ao_alsa5.c" _aomodules="alsa5 $_aomodules" _def_alsa5='#define HAVE_ALSA5 1' _def_sys_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1' _res_comment="using alsa 0.5.x and sys/asoundlib.h" elif test "$_alsaver" = '0.9.x-sys' ; then + _alsa9=yes _aosrc="$_aosrc ao_alsa.c" _aomodules="alsa $_aomodules" _def_alsa9='#define HAVE_ALSA9 1' _def_sys_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1' _res_comment="using alsa 0.9.x and sys/asoundlib.h" elif test "$_alsaver" = '0.9.x-alsa' ; then + _alsa9=yes _aosrc="$_aosrc ao_alsa.c" _aomodules="alsa $_aomodules" _def_alsa9='#define HAVE_ALSA9 1' _def_alsa_asoundlib_h='#define HAVE_ALSA_ASOUNDLIB_H 1' _res_comment="using alsa 0.9.x and alsa/asoundlib.h" elif test "$_alsaver" = '1.0.x-sys' ; then + _alsa1x=yes _aosrc="$_aosrc ao_alsa.c" _aomodules="alsa $_aomodules" _def_alsa1x="#define HAVE_ALSA1X 1" _def_alsa_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1' _res_comment="using alsa 1.0.x and sys/asoundlib.h" elif test "$_alsaver" = '1.0.x-alsa' ; then + _alsa1x=yes _aosrc="$_aosrc ao_alsa.c" _aomodules="alsa $_aomodules" _def_alsa1x="#define HAVE_ALSA1X 1" @@ -5241,6 +5246,7 @@ EOF done fi if test "$_cdparanoia" = yes ; then + _cdda='yes' _def_cdparanoia='#define HAVE_CDDA' _inputmodules="cdda $_inputmodules" _ld_cdparanoia="$_ld_cdparanoia -lcdda_interface -lcdda_paranoia" @@ -5278,6 +5284,7 @@ EOF fi fi if test "$_libcdio" = yes && test "$_cdparanoia" = no ; then + _cdda='yes' _def_libcdio='#define HAVE_LIBCDIO' _def_cdparanoia='#define HAVE_CDDA' _def_havelibcdio='yes' @@ -7358,8 +7365,11 @@ PRG_MENCODER = $_prg_mencoder $_live_libs_def MPLAYER_NETWORK = $_network +FTP = $_ftp STREAMING_LIVE555 = $_live +VSTREAM = $_vstream MPLAYER_NETWORK_LIB = $_ld_live $_ld_vstream $_ld_network +STREAM_CACHE = yes DVBIN = $_dvbin VIDIX = $_vidix_internal EXTERNAL_VIDIX = $_vidix_external @@ -7426,6 +7436,11 @@ CACA_INC = $_inc_caca CACA_LIB = $_ld_caca # audio output +OSS = $_ossaudio +ALSA = $_alsa +ALSA5 = $_alsa5 +ALSA9 = $_alsa9 +ALSA1X = $_alsa1x ALSA_LIB = $_ld_alsa NAS_LIB = $_ld_nas ARTS_LIB = $_ld_arts @@ -7444,10 +7459,16 @@ SGIAUDIO_LIB = $_ld_sgiaudio TERMCAP_LIB = $_ld_termcap LIRC_LIB = $_ld_lirc LIRCC_LIB = $_ld_lircc +TV = $_tv +TV_V4L = $_tv_v4l +TV_V4L2 = $_tv_v4l2 +TV_BSDBT848 = $_tv_bsdbt848 +VCD = $_vcd HAVE_DVD = $_have_dvd DVDREAD = $_dvdread DVDREAD_LIB = $_ld_dvdread DVDKIT2 = $_mpdvdkit +DVDNAV = $_dvdnav DVDNAV_LIB = $_ld_dvdnav SDL_INC = $_inc_sdl WIN32DLL = $_win32 @@ -7488,6 +7509,7 @@ MENCODER = $_mencoder ENCORE_LIB = $_ld_encore $_ld_mp3lame DIRECTFB_INC = $_inc_directfb DIRECTFB_LIB = $_ld_directfb +CDDA = $_cdda CDPARANOIA_INC = $_inc_cdparanoia CDPARANOIA_LIB = $_ld_cdparanoia FREETYPE = $_freetype @@ -7509,6 +7531,7 @@ LIBTHEORA = $_theora THEORA_LIB = $_ld_theora FAAD_LIB = $_ld_faad INTERNAL_FAAD = $_faad_internal +LIBSMBCLIENT = $_smbsupport SMBSUPPORT_LIB = $_ld_smb XMMS_PLUGINS = $_xmms XMMS_LIB = $_xmms_lib diff --git a/libmpdemux/Makefile b/libmpdemux/Makefile index 94a96d690f..e4cbfffc2c 100644 --- a/libmpdemux/Makefile +++ b/libmpdemux/Makefile @@ -11,52 +11,85 @@ SRCS = mp3_hdr.c \ aviprint.c \ # Core -SRCS += cache2.c \ - extension.c \ +SRCS += extension.c \ mf.c \ open.c \ url.c \ video.c \ +ifeq ($(STREAM_CACHE),yes) +SRCS += cache2.c +endif + # Miscellaneous -SRCS += cdda.c \ - cddb.c \ - cdinfo.c \ +SRCS += cdinfo.c \ cue_read.c \ - dvdnav_stream.c \ parse_es.c \ parse_mp4.c \ yuv4mpeg.c \ yuv4mpeg_ratio.c \ +ifeq ($(CDDA),yes) +SRCS += cdda.c + ifeq ($(MPLAYER_NETWORK),yes) + SRCS += cddb.c + endif +endif + # Stream readers/writers SRCS += stream.c \ stream_file.c \ - stream_ftp.c \ - stream_livedotcom.c \ - stream_netstream.c \ stream_null.c \ - stream_smb.c \ - stream_vcd.c \ - stream_vstream.c \ ifeq ($(HAVE_DVD),yes) SRCS += stream_dvd.c endif +ifeq ($(DVDNAV),yes) +SRCS += dvdnav_stream.c +endif +ifeq ($(VCD),yes) +SRCS += stream_vcd.c +endif +ifeq ($(FTP),yes) +SRCS += stream_ftp.c +endif +ifeq ($(LIBSMBCLIENT),yes) +SRCS += stream_smb.c +endif +ifeq ($(MPLAYER_NETWORK),yes) + SRCS += stream_netstream.c + ifeq ($(STREAMING_LIVE555),yes) + SRCS += stream_livedotcom.c + endif +endif +ifeq ($(VSTREAM),yes) +SRCS += stream_vstream.c +endif # TV in -SRCS += tv.c \ - frequencies.c \ - tvi_bsdbt848.c \ - tvi_dummy.c \ - tvi_v4l2.c \ - tvi_v4l.c \ - -# Audio in -SRCS += audio_in.c \ - ai_alsa1x.c \ - ai_alsa.c \ - ai_oss.c \ +ifeq ($(TV),yes) +SRCS += tv.c frequencies.c tvi_dummy.c + ifeq ($(TV_BSDBT848),yes) + SRCS += tvi_bsdbt848.c + endif + ifeq ($(TV_V4L2),yes) + SRCS += tvi_v4l2.c audio_in.c + endif + ifeq ($(TV_V4L),yes) + SRCS += tvi_v4l.c audio_in.c + endif + ifeq ($(TV_V4L)$(TV_V4L2),yes) + ifeq ($(ALSA1X),yes) + SRCS += ai_alsa1x.c + endif + ifeq ($(ALSA9),yes) + SRCS += ai_alsa.c + endif + ifeq ($(OSS),yes) + SRCS += ai_oss.c + endif + endif +endif # Demuxers SRCS += demuxer.c \ @@ -67,7 +100,6 @@ SRCS += demuxer.c \ demux_demuxers.c \ demux_film.c \ demux_fli.c \ - demux_gif.c \ demux_lmlm4.c \ demux_mf.c \ demux_mov.c \ @@ -75,10 +107,8 @@ SRCS += demuxer.c \ demux_mpg.c \ demux_nsv.c \ demux_nuv.c \ - demux_ogg.c \ demux_pva.c \ demux_rawaudio.c \ - demux_rawdv.c \ demux_rawvideo.c \ demux_realaud.c \ demux_real.c \ @@ -92,6 +122,15 @@ SRCS += demuxer.c \ demux_y4m.c \ demux_mkv.c ebml.c \ +ifeq ($(LIBVORBIS),yes) +SRCS += demux_ogg.c +endif +ifeq ($(LIBDV),yes) +SRCS += demux_rawdv.c +endif +ifeq ($(GIF),yes) +SRCS += demux_gif.c +endif ifeq ($(XMMS_PLUGINS),yes) SRCS += demux_xmms.c endif diff --git a/libmpdemux/ai_alsa.c b/libmpdemux/ai_alsa.c index 473fd99175..a1468bed09 100644 --- a/libmpdemux/ai_alsa.c +++ b/libmpdemux/ai_alsa.c @@ -4,8 +4,6 @@ #include "config.h" -#if defined(USE_TV) && (defined(HAVE_TV_V4L) || defined(HAVE_TV_V4L2)) && defined(HAVE_ALSA9) - #include #include "audio_in.h" #include "mp_msg.h" @@ -166,5 +164,3 @@ int ai_alsa_xrun(audio_in_t *ai) mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_AlsaReadWriteError); return -1; } - -#endif /* HAVE_ALSA9 */ diff --git a/libmpdemux/ai_alsa1x.c b/libmpdemux/ai_alsa1x.c index 8ca30bce3c..d0c6af0f98 100644 --- a/libmpdemux/ai_alsa1x.c +++ b/libmpdemux/ai_alsa1x.c @@ -4,8 +4,6 @@ #include "config.h" -#if defined(USE_TV) && (defined(HAVE_TV_V4L) || defined(HAVE_TV_V4L2)) && defined(HAVE_ALSA1X) - #include #include "audio_in.h" #include "mp_msg.h" @@ -185,5 +183,3 @@ int ai_alsa_xrun(audio_in_t *ai) mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_AlsaReadWriteError); return -1; } - -#endif /* HAVE_ALSA1X */ diff --git a/libmpdemux/ai_oss.c b/libmpdemux/ai_oss.c index 325c23ed05..bd7c7c312a 100644 --- a/libmpdemux/ai_oss.c +++ b/libmpdemux/ai_oss.c @@ -3,8 +3,6 @@ #include "config.h" -#if defined(USE_TV) && (defined(HAVE_TV_V4L) || defined(HAVE_TV_V4L2)) && defined(USE_OSS_AUDIO) - #include /* strerror */ #include #include @@ -139,5 +137,3 @@ int ai_oss_init(audio_in_t *ai) return 0; } - -#endif /* USE_OSS_AUDIO */ diff --git a/libmpdemux/audio_in.c b/libmpdemux/audio_in.c index 4a98b00618..03259614a4 100644 --- a/libmpdemux/audio_in.c +++ b/libmpdemux/audio_in.c @@ -4,8 +4,6 @@ #include "config.h" -#if defined(USE_TV) && (defined(HAVE_TV_V4L) || defined(HAVE_TV_V4L2)) - #include "audio_in.h" #include "mp_msg.h" #include "help_mp.h" @@ -219,5 +217,3 @@ int audio_in_read_chunk(audio_in_t *ai, unsigned char *buffer) return -1; } } - -#endif diff --git a/libmpdemux/cache2.c b/libmpdemux/cache2.c index 116bd2e9ff..6ad33d8664 100644 --- a/libmpdemux/cache2.c +++ b/libmpdemux/cache2.c @@ -1,7 +1,5 @@ #include "config.h" -#ifdef USE_STREAM_CACHE - // Initial draft of my new cache system... // Note it runs in 2 processes (using fork()), but doesn't requires locking!! // TODO: seeking, data consistency checking @@ -367,5 +365,3 @@ int cache_stream_seek_long(stream_t *stream,off_t pos){ mp_msg(MSGT_CACHE,MSGL_V,"cache_stream_seek: WARNING! Can't seek to 0x%"PRIX64" !\n",(int64_t)(pos+newpos)); return 0; } - -#endif diff --git a/libmpdemux/cdda.c b/libmpdemux/cdda.c index 1db54cc973..34f69b737e 100644 --- a/libmpdemux/cdda.c +++ b/libmpdemux/cdda.c @@ -1,7 +1,5 @@ #include "config.h" -#ifdef HAVE_CDDA - #include "stream.h" #include "m_option.h" #include "m_struct.h" @@ -391,5 +389,3 @@ stream_info_t stream_info_cdda = { &stream_opts, 1 // Urls are an option string }; - -#endif diff --git a/libmpdemux/cddb.c b/libmpdemux/cddb.c index 89a7a22f7b..a43db97218 100644 --- a/libmpdemux/cddb.c +++ b/libmpdemux/cddb.c @@ -14,8 +14,6 @@ #include "config.h" -#if defined(HAVE_CDDA) && defined(MPLAYER_NETWORK) - #include #include #include @@ -878,5 +876,3 @@ cddb_parse_xmcd(char *xmcd_file) { return cd_info; } - -#endif diff --git a/libmpdemux/demux_gif.c b/libmpdemux/demux_gif.c index 5c4d8fdadc..0f390b074d 100644 --- a/libmpdemux/demux_gif.c +++ b/libmpdemux/demux_gif.c @@ -9,8 +9,6 @@ #include "config.h" -#ifdef HAVE_GIF - #include "mp_msg.h" #include "help_mp.h" @@ -236,5 +234,3 @@ demuxer_desc_t demuxer_desc_gif = { NULL, NULL }; - -#endif /* HAVE_GIF */ diff --git a/libmpdemux/demux_ogg.c b/libmpdemux/demux_ogg.c index 60df3bda47..ed8086f362 100644 --- a/libmpdemux/demux_ogg.c +++ b/libmpdemux/demux_ogg.c @@ -17,8 +17,6 @@ unsigned int store_ughvlc(unsigned char *s, unsigned int v) return n; } -#ifdef HAVE_OGGVORBIS - #include #include #include @@ -1685,5 +1683,3 @@ demuxer_desc_t demuxer_desc_ogg = { demux_ogg_seek, demux_ogg_control }; - -#endif diff --git a/libmpdemux/demux_rawdv.c b/libmpdemux/demux_rawdv.c index 8163a34fc0..5a840a6d55 100644 --- a/libmpdemux/demux_rawdv.c +++ b/libmpdemux/demux_rawdv.c @@ -12,8 +12,6 @@ #include "config.h" -#ifdef HAVE_LIBDV095 - #include "mp_msg.h" #include "help_mp.h" @@ -262,5 +260,3 @@ demuxer_desc_t demuxer_desc_rawdv = { demux_seek_rawdv, demux_rawdv_control }; - -#endif diff --git a/libmpdemux/dvdnav_stream.c b/libmpdemux/dvdnav_stream.c index 76272ac1bd..fefb7ecf12 100644 --- a/libmpdemux/dvdnav_stream.c +++ b/libmpdemux/dvdnav_stream.c @@ -1,6 +1,5 @@ #include "config.h" -#ifdef USE_DVDNAV #include #include #include @@ -395,5 +394,3 @@ stream_info_t stream_info_dvdnav = { &stream_opts, 1 // Urls are an option string }; - -#endif /* USE_DVDNAV */ diff --git a/libmpdemux/stream_ftp.c b/libmpdemux/stream_ftp.c index 2a23fd2d3d..2f82aa2210 100644 --- a/libmpdemux/stream_ftp.c +++ b/libmpdemux/stream_ftp.c @@ -1,8 +1,6 @@ #include "config.h" -#ifdef HAVE_FTP - #include #include @@ -469,5 +467,3 @@ stream_info_t stream_info_ftp = { &stream_opts, 1 // Urls are an option string }; - -#endif diff --git a/libmpdemux/stream_livedotcom.c b/libmpdemux/stream_livedotcom.c index b07e18d406..20c6a82499 100644 --- a/libmpdemux/stream_livedotcom.c +++ b/libmpdemux/stream_livedotcom.c @@ -1,7 +1,6 @@ #include "config.h" -#ifdef MPLAYER_NETWORK #include #include #include @@ -12,8 +11,6 @@ #include "demuxer.h" #include "help_mp.h" -#ifdef STREAMING_LIVE555 - extern int network_bandwidth; static int _rtsp_streaming_seek(int fd, off_t pos, streaming_ctrl_t* streaming_ctrl) { @@ -120,6 +117,3 @@ stream_info_t stream_info_sdp = { NULL, 0 // Urls are an option string }; - -#endif -#endif diff --git a/libmpdemux/stream_netstream.c b/libmpdemux/stream_netstream.c index 5316f0512f..753b9d7320 100644 --- a/libmpdemux/stream_netstream.c +++ b/libmpdemux/stream_netstream.c @@ -36,8 +36,6 @@ #include "config.h" -#ifdef MPLAYER_NETWORK - #include #include #include @@ -308,5 +306,3 @@ stream_info_t stream_info_netstream = { &stream_opts, 1 // Url is an option string }; - -#endif diff --git a/libmpdemux/stream_smb.c b/libmpdemux/stream_smb.c index c92b1da432..21c8d39e5d 100644 --- a/libmpdemux/stream_smb.c +++ b/libmpdemux/stream_smb.c @@ -1,8 +1,6 @@ #include "config.h" -#ifdef LIBSMBCLIENT - #include #include @@ -148,5 +146,3 @@ stream_info_t stream_info_smb = { &stream_opts, 0 //Url is an option string }; - -#endif diff --git a/libmpdemux/stream_vcd.c b/libmpdemux/stream_vcd.c index 2e765d5d12..528a8d43d2 100644 --- a/libmpdemux/stream_vcd.c +++ b/libmpdemux/stream_vcd.c @@ -1,7 +1,6 @@ #include "config.h" -#ifdef HAVE_VCD #include "mp_msg.h" #include "stream.h" #include "help_mp.h" @@ -151,5 +150,3 @@ stream_info_t stream_info_vcd = { &stream_opts, 1 // Urls are an option string }; - -#endif diff --git a/libmpdemux/stream_vstream.c b/libmpdemux/stream_vstream.c index f32144f93a..180700a2fe 100644 --- a/libmpdemux/stream_vstream.c +++ b/libmpdemux/stream_vstream.c @@ -35,8 +35,6 @@ #include "config.h" -#ifdef HAVE_VSTREAM - #include #include #include @@ -180,5 +178,3 @@ stream_info_t stream_info_vstream = { &stream_opts, 1 // Url is an option string }; - -#endif diff --git a/libmpdemux/tv.c b/libmpdemux/tv.c index 7433d86337..001cd2ec48 100644 --- a/libmpdemux/tv.c +++ b/libmpdemux/tv.c @@ -21,7 +21,6 @@ int tv_param_on = 0; -#ifdef USE_TV #include "mp_msg.h" #include "help_mp.h" @@ -918,5 +917,3 @@ demuxer_desc_t demuxer_desc_tv = { NULL, NULL }; - -#endif /* USE_TV */ diff --git a/libmpdemux/tvi_bsdbt848.c b/libmpdemux/tvi_bsdbt848.c index bd6f0253ef..7732d017de 100644 --- a/libmpdemux/tvi_bsdbt848.c +++ b/libmpdemux/tvi_bsdbt848.c @@ -12,8 +12,6 @@ #include "config.h" -#if defined(USE_TV) && defined(HAVE_TV_BSDBT848) - #define RINGSIZE 8 #define FRAGSIZE 4096 /* (2^12 see SETFRAGSIZE below) */ @@ -846,5 +844,3 @@ switch(innumber) return 0; } - -#endif /* USE_TV */ diff --git a/libmpdemux/tvi_dummy.c b/libmpdemux/tvi_dummy.c index 151d102489..152ce0938c 100644 --- a/libmpdemux/tvi_dummy.c +++ b/libmpdemux/tvi_dummy.c @@ -4,8 +4,6 @@ #include "config.h" -#ifdef USE_TV - #include #include "libvo/img_format.h" #include "tv.h" @@ -120,5 +118,3 @@ static int get_audio_framesize(priv_t *priv) { return(1); } - -#endif /* USE_TV */ diff --git a/libmpdemux/tvi_v4l.c b/libmpdemux/tvi_v4l.c index 1083561079..1fa3874228 100644 --- a/libmpdemux/tvi_v4l.c +++ b/libmpdemux/tvi_v4l.c @@ -17,8 +17,6 @@ #include "config.h" -#if defined(USE_TV) && defined(HAVE_TV_V4L) - #include #include #include @@ -1759,5 +1757,3 @@ static int get_audio_framesize(priv_t *priv) { return(priv->audio_in.blocksize); } - -#endif /* USE_TV */ diff --git a/libmpdemux/tvi_v4l2.c b/libmpdemux/tvi_v4l2.c index a91ca48bd2..c6e5f8041f 100644 --- a/libmpdemux/tvi_v4l2.c +++ b/libmpdemux/tvi_v4l2.c @@ -25,8 +25,6 @@ known issues: #include "config.h" -#if defined(USE_TV) && defined(HAVE_TV_V4L2) - #include #include #include @@ -1747,5 +1745,3 @@ static int get_audio_framesize(priv_t *priv) { return(priv->audio_in.blocksize); } - -#endif /* USE_TV && HAVE_TV_V4L2 */