summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-06 13:09:45 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-06 13:09:45 +0000
commit7844cbc3ce870b0d32d75e36729a89afc50c8aef (patch)
tree578381bb99e969cf8b1a50c6b85cfb94066841ef /libmpdemux
parent20770e8a7da4bd4469fa954e8c7a54c18e495835 (diff)
downloadmpv-7844cbc3ce870b0d32d75e36729a89afc50c8aef.tar.bz2
mpv-7844cbc3ce870b0d32d75e36729a89afc50c8aef.tar.xz
Move conditional compilation into the build system.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18927 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/Makefile93
-rw-r--r--libmpdemux/ai_alsa.c4
-rw-r--r--libmpdemux/ai_alsa1x.c4
-rw-r--r--libmpdemux/ai_oss.c4
-rw-r--r--libmpdemux/audio_in.c4
-rw-r--r--libmpdemux/cache2.c4
-rw-r--r--libmpdemux/cdda.c4
-rw-r--r--libmpdemux/cddb.c4
-rw-r--r--libmpdemux/demux_gif.c4
-rw-r--r--libmpdemux/demux_ogg.c4
-rw-r--r--libmpdemux/demux_rawdv.c4
-rw-r--r--libmpdemux/dvdnav_stream.c3
-rw-r--r--libmpdemux/stream_ftp.c4
-rw-r--r--libmpdemux/stream_livedotcom.c6
-rw-r--r--libmpdemux/stream_netstream.c4
-rw-r--r--libmpdemux/stream_smb.c4
-rw-r--r--libmpdemux/stream_vcd.c3
-rw-r--r--libmpdemux/stream_vstream.c4
-rw-r--r--libmpdemux/tv.c3
-rw-r--r--libmpdemux/tvi_bsdbt848.c4
-rw-r--r--libmpdemux/tvi_dummy.c4
-rw-r--r--libmpdemux/tvi_v4l.c4
-rw-r--r--libmpdemux/tvi_v4l2.c4
23 files changed, 66 insertions, 114 deletions
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 <alsa/asoundlib.h>
#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 <alsa/asoundlib.h>
#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 <string.h> /* strerror */
#include <fcntl.h>
#include <errno.h>
@@ -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 <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
@@ -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 <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -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 <stdlib.h>
#include <stdio.h>
#include <unistd.h>
@@ -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 <stdlib.h>
#include <stdio.h>
@@ -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 <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -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 <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -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 <libsmbclient.h>
#include <unistd.h>
@@ -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 <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -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 <stdio.h>
#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 <stdio.h>
#include <errno.h>
#include <fcntl.h>
@@ -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 <errno.h>
#include <fcntl.h>
#include <pthread.h>
@@ -1747,5 +1745,3 @@ static int get_audio_framesize(priv_t *priv)
{
return(priv->audio_in.blocksize);
}
-
-#endif /* USE_TV && HAVE_TV_V4L2 */