diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2007-04-26 23:44:56 +0000 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2007-04-26 23:44:56 +0000 |
commit | c08fb00016ae69f5378876689d62c1aa661d8dff (patch) | |
tree | d17f94093b3006b49521ed6982c0ea2b14df0188 /libavformat | |
parent | 9686292664bfd1124a4a01c1cd2e697f55525f58 (diff) | |
download | ffmpeg-c08fb00016ae69f5378876689d62c1aa661d8dff.tar.gz |
Make protocols configure selectable and also cleanup the CONFIG_NETWORK
related parts (rtp,rtsp,sdp). Currently they are interdependent.
Originally committed as revision 8842 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/Makefile | 13 | ||||
-rw-r--r-- | libavformat/allformats.c | 19 |
2 files changed, 18 insertions, 14 deletions
diff --git a/libavformat/Makefile b/libavformat/Makefile index cfc324d29c..765a6f3dda 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -117,10 +117,14 @@ OBJS-$(CONFIG_RAWVIDEO_DEMUXER) += raw.o OBJS-$(CONFIG_RAWVIDEO_MUXER) += raw.o OBJS-$(CONFIG_SHORTEN_DEMUXER) += raw.o OBJS-$(CONFIG_NUT_DEMUXER) += nutdec.o riff.o +OBJS-$(CONFIG_REDIR_DEMUXER) += rtsp.o OBJS-$(CONFIG_RM_DEMUXER) += rm.o OBJS-$(CONFIG_RM_MUXER) += rm.o +OBJS-$(CONFIG_RTP_MUXER) += rtp.o rtp_h264.o +OBJS-$(CONFIG_RTSP_DEMUXER) += rtsp.o OBJS-$(CONFIG_SEGAFILM_DEMUXER) += segafilm.o OBJS-$(CONFIG_VMD_DEMUXER) += sierravmd.o +OBJS-$(CONFIG_SDP_DEMUXER) += rtsp.o OBJS-$(CONFIG_SMACKER_DEMUXER) += smacker.o OBJS-$(CONFIG_SOL_DEMUXER) += sol.o OBJS-$(CONFIG_SWF_DEMUXER) += swf.o @@ -158,9 +162,12 @@ CPPOBJS-$(CONFIG_AUDIO_BEOS) += beosaudio.o # protocols I/O OBJS+= avio.o aviobuf.o -OBJS-$(CONFIG_PROTOCOLS) += file.o -OBJS-$(CONFIG_NETWORK) += udp.o tcp.o http.o rtsp.o rtp.o \ - rtpproto.o rtp_h264.o +OBJS-$(CONFIG_FILE_PROTOCOL) += file.o +OBJS-$(CONFIG_HTTP_PROTOCOL) += http.o +OBJS-$(CONFIG_PIPE_PROTOCOL) += file.o +OBJS-$(CONFIG_RTP_PROTOCOL) += rtpproto.o +OBJS-$(CONFIG_TCP_PROTOCOL) += tcp.o +OBJS-$(CONFIG_UDP_PROTOCOL) += udp.o NAME=avformat LIBVERSION=$(LAVFVERSION) diff --git a/libavformat/allformats.c b/libavformat/allformats.c index 4a1db118e1..91c4a7b49b 100644 --- a/libavformat/allformats.c +++ b/libavformat/allformats.c @@ -26,6 +26,8 @@ #define REGISTER_DEMUXER(X,x) \ if(ENABLE_##X##_DEMUXER) av_register_input_format(&x##_demuxer) #define REGISTER_MUXDEMUX(X,x) REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x) +#define REGISTER_PROTOCOL(X,x) \ + if(ENABLE_##X##_PROTOCOL) register_protocol(&x##_protocol) /* If you do not call this function, then you can select exactly which formats you want to support */ @@ -162,15 +164,10 @@ void av_register_all(void) REGISTER_DEMUXER (X11_GRAB_DEVICE, x11_grab_device); REGISTER_MUXDEMUX(YUV4MPEGPIPE, yuv4mpegpipe); -#ifdef CONFIG_PROTOCOLS - /* file protocols */ - register_protocol(&file_protocol); - register_protocol(&pipe_protocol); -#ifdef CONFIG_NETWORK - register_protocol(&udp_protocol); - register_protocol(&rtp_protocol); - register_protocol(&tcp_protocol); - register_protocol(&http_protocol); -#endif -#endif + REGISTER_PROTOCOL(FILE, file); + REGISTER_PROTOCOL(HTTP, http); + REGISTER_PROTOCOL(PIPE, pipe); + REGISTER_PROTOCOL(RTP, rtp); + REGISTER_PROTOCOL(TCP, tcp); + REGISTER_PROTOCOL(UDP, udp); } |