# HG changeset patch # User reimar # Date 1379782392 0 # Node ID dba1b5aa72c1888754e76e7450a130884e2f8c53 # Parent d53606fdb6931da9ecbbddd89bf734b8a7ef6ed6 Move rtsp_transport_* variables to demuxer.c Also make the corresponding command-line options always available. Most users will have some kind of rtsp support, possibly through ffmpeg. Putting it under CONFIG_NETWORKING would be more correct, but doesn't seem worth the effort to me. diff -r d53606fdb693 -r dba1b5aa72c1 cfg-common.h --- a/cfg-common.h Sat Sep 21 16:39:24 2013 +0000 +++ b/cfg-common.h Sat Sep 21 16:53:12 2013 +0000 @@ -380,21 +380,10 @@ #ifdef CONFIG_LIVE555 {"sdp", "-sdp has been removed, use sdp://file instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, +#endif /* CONFIG_LIVE555 */ {"rtsp-stream-over-http", &rtsp_transport_http, CONF_TYPE_FLAG, 0, 0, 1, NULL}, -#else - {"rtsp-stream-over-http", "-rtsp-stream-over-http requires the \"LIVE555 Streaming Media\" library.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, -#endif /* CONFIG_LIVE555 */ -#if defined(CONFIG_LIBNEMESI) || defined(CONFIG_LIVE555) - // -rtsp-stream-over-tcp option, specifying TCP streaming of RTP/RTCP {"rtsp-stream-over-tcp", &rtsp_transport_tcp, CONF_TYPE_FLAG, 0, 0, 1, NULL}, -#else - {"rtsp-stream-over-tcp", "-rtsp-stream-over-tcp requires the \"LIVE555 Streaming Media\" or \"libnemesi\" libraries.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, -#endif /* defined(CONFIG_LIBNEMESI) || defined(CONFIG_LIVE555) */ -#ifdef CONFIG_LIBNEMESI {"rtsp-stream-over-sctp", &rtsp_transport_sctp, CONF_TYPE_FLAG, 0, 0, 1, NULL}, -#else - {"rtsp-stream-over-sctp", "-rtsp-stream-over-sctp requires the \"libnemesi\" library\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, -#endif /* CONFIG_LIBNEMESI */ #ifdef CONFIG_NETWORKING {"rtsp-port", &rtsp_port, CONF_TYPE_INT, CONF_RANGE, -1, 65535, NULL}, {"rtsp-destination", &rtsp_destination, CONF_TYPE_STRING, CONF_MIN, 0, 0, NULL}, diff -r d53606fdb693 -r dba1b5aa72c1 libmpdemux/demux_nemesi.c --- a/libmpdemux/demux_nemesi.c Sat Sep 21 16:39:24 2013 +0000 +++ b/libmpdemux/demux_nemesi.c Sat Sep 21 16:53:12 2013 +0000 @@ -30,9 +30,6 @@ #include "nemesi/rtp.h" #include -int rtsp_transport_http = 0; -int rtsp_transport_tcp = 0; -int rtsp_transport_sctp = 0; int rtsp_port = 0; typedef struct { diff -r d53606fdb693 -r dba1b5aa72c1 libmpdemux/demux_rtp.cpp --- a/libmpdemux/demux_rtp.cpp Sat Sep 21 16:39:24 2013 +0000 +++ b/libmpdemux/demux_rtp.cpp Sat Sep 21 16:53:12 2013 +0000 @@ -114,14 +114,6 @@ } } -#ifdef CONFIG_LIBNEMESI -extern int rtsp_transport_tcp; -extern int rtsp_transport_http; -#else -int rtsp_transport_tcp = 0; -int rtsp_transport_http = 0; -#endif - #ifdef CONFIG_FFMPEG extern AVCodecContext *avcctx; #endif diff -r d53606fdb693 -r dba1b5aa72c1 libmpdemux/demuxer.c --- a/libmpdemux/demuxer.c Sat Sep 21 16:39:24 2013 +0000 +++ b/libmpdemux/demuxer.c Sat Sep 21 16:53:12 2013 +0000 @@ -57,6 +57,11 @@ #endif #include "libavutil/avstring.h" +// Options shared between demuxers +int rtsp_transport_http = 0; +int rtsp_transport_tcp = 0; +int rtsp_transport_sctp = 0; + // This is quite experimental, in particular it will mess up the pts values // in the queue - on the other hand it might fix some issues like generating // broken files with mencoder and stream copy.