From c08fb00016ae69f5378876689d62c1aa661d8dff Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 26 Apr 2007 23:44:56 +0000 Subject: 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 --- libavformat/allformats.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'libavformat/allformats.c') 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); } -- cgit v1.2.3