# HG changeset patch # User lu_zero # Date 1243283315 0 # Node ID 99063eff751211d9fbfd3829f536e48d26131160 # Parent b4bbf02afc53826502c4480543cf72e92ba8aeb7 Unify over rtsp_transport_tcp as var to hold the -rtsp-stream-over-tcp flag and make sure libnemesi only builds are fine diff -r b4bbf02afc53 -r 99063eff7512 cfg-common-opts.h --- a/cfg-common-opts.h Mon May 25 17:51:10 2009 +0000 +++ b/cfg-common-opts.h Mon May 25 20:28:35 2009 +0000 @@ -85,7 +85,7 @@ #endif /* CONFIG_LIVE555 */ #ifdef CONFIG_LIBNEMESI || CONFIG_LIVE555 // -rtsp-stream-over-tcp option, specifying TCP streaming of RTP/RTCP - {"rtsp-stream-over-tcp", &rtspStreamOverTCP, CONF_TYPE_FLAG, 0, 0, 1, NULL}, + {"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 /* CONFIG_LIVE555 || CONFIG_LIBNEMESI */ diff -r b4bbf02afc53 -r 99063eff7512 libmpdemux/demux_rtp.cpp --- a/libmpdemux/demux_rtp.cpp Mon May 25 17:51:10 2009 +0000 +++ b/libmpdemux/demux_rtp.cpp Mon May 25 20:28:35 2009 +0000 @@ -110,7 +110,12 @@ } } -int rtspStreamOverTCP = 0; +#ifdef CONFIG_LIBNEMESI +extern int rtsp_transport_tcp; +#else +int rtsp_transport_tcp = 0; +#endif + extern int rtsp_port; extern "C" int audio_id, video_id, dvdsub_id; @@ -229,7 +234,7 @@ if (rtspClient != NULL) { // Issue a RTSP "SETUP" command on the chosen subsession: if (!rtspClient->setupMediaSubsession(*subsession, False, - rtspStreamOverTCP)) break; + rtsp_transport_tcp)) break; if (!strcmp(subsession->mediumName(), "audio")) audiofound = 1; if (!strcmp(subsession->mediumName(), "video")) @@ -327,7 +332,7 @@ const float ptsBehindLimit = 60.0; // seconds if (ptsBehind < ptsBehindThreshold || ptsBehind > ptsBehindLimit || - rtspStreamOverTCP) { // packet's OK + rtsp_transport_tcp) { // packet's OK ds_add_packet(ds, dp); break; }