From 97b04458edda99073e308be88ff46db26abc051d Mon Sep 17 00:00:00 2001 From: lu_zero Date: Mon, 25 May 2009 20:28:35 +0000 Subject: [PATCH] Unify over rtsp_transport_tcp as var to hold the -rtsp-stream-over-tcp flag and make sure libnemesi only builds are fine git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29322 b3059339-0415-0410-9bf9-f77b7e298cf2 --- cfg-common-opts.h | 2 +- libmpdemux/demux_rtp.cpp | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/cfg-common-opts.h b/cfg-common-opts.h index a8945561d9..ee0cfcda4c 100644 --- a/cfg-common-opts.h +++ b/cfg-common-opts.h @@ -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 --git a/libmpdemux/demux_rtp.cpp b/libmpdemux/demux_rtp.cpp index 8d3595c02e..c59bf5bf7e 100644 --- a/libmpdemux/demux_rtp.cpp +++ b/libmpdemux/demux_rtp.cpp @@ -110,7 +110,12 @@ static char* openURL_sip(SIPClient* client, char const* url) { } } -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 @@ extern "C" demuxer_t* demux_open_rtp(demuxer_t* demuxer) { 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 @@ extern "C" int demux_rtp_fill_buffer(demuxer_t* demuxer, demux_stream_t* ds) { 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; }