1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-28 11:20:56 +00:00

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
This commit is contained in:
lu_zero 2009-05-25 20:28:35 +00:00
parent 2bd1990820
commit 97b04458ed
2 changed files with 9 additions and 4 deletions

View File

@ -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 */

View File

@ -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;
}