Mercurial > mplayer.hg
changeset 7664:b10d6345f2a6
Added support for RTSP stream over TCP.
Patch from Ross Finlayson <finlayson@live.com>
author | bertrand |
---|---|
date | Tue, 08 Oct 2002 05:46:23 +0000 |
parents | eb3afb162aa4 |
children | fbd5445cc853 |
files | cfg-mplayer.h libmpdemux/demux_rtp.cpp |
diffstat | 2 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/cfg-mplayer.h Mon Oct 07 22:13:34 2002 +0000 +++ b/cfg-mplayer.h Tue Oct 08 05:46:23 2002 +0000 @@ -90,6 +90,7 @@ #ifdef STREAMING_LIVE_DOT_COM extern int isSDPFile; +extern int rtspStreamOverTCP; #endif #ifdef HAVE_NEW_GUI @@ -302,8 +303,11 @@ #ifdef STREAMING_LIVE_DOT_COM // -sdp option, specifying that the source is a SDP file {"sdp", &isSDPFile, CONF_TYPE_FLAG, 0, 0, 1, NULL}, + // -rtsp-stream-over-tcp option, specifying TCP streaming of RTP/RTCP + {"rtsp-stream-over-tcp", &rtspStreamOverTCP, CONF_TYPE_FLAG, 0, 0, 1, NULL}, #else - {"sdp", "MPlayer was compiled WITHOUT the \"LIVE.COM Streaming Media\" libraries!\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, + {"sdp", "SDP file support requires the \"LIVE.COM Streaming Media\" libraries!\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, + {"rtsp-stream-over-tcp", "RTSP support requires the \"LIVE.COM Streaming Media\" libraries!\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, #endif //---------------------- mplayer-only options ------------------------
--- a/libmpdemux/demux_rtp.cpp Mon Oct 07 22:13:34 2002 +0000 +++ b/libmpdemux/demux_rtp.cpp Tue Oct 08 05:46:23 2002 +0000 @@ -95,7 +95,13 @@ struct timeval firstSyncTime; }; +int rtspStreamOverTCP = 0; + extern "C" void demux_open_rtp(demuxer_t* demuxer) { + if (rtspStreamOverTCP && LIVEMEDIA_LIBRARY_VERSION_INT < 1033689600) { + fprintf(stderr, "TCP streaming of RTP/RTCP requires \"LIVE.COM Streaming Media\" library version 2002.10.04 or later - ignoring the \"-rtsp-stream-over-tcp\" flag\n"); + rtspStreamOverTCP = 0; + } do { TaskScheduler* scheduler = BasicTaskScheduler::createNew(); if (scheduler == NULL) break; @@ -155,7 +161,8 @@ if (rtspClient != NULL) { // Issue RTSP "SETUP" and "PLAY" commands on the chosen subsession: - if (!rtspClient->setupMediaSubsession(*subsession)) break; + if (!rtspClient->setupMediaSubsession(*subsession, False, + rtspStreamOverTCP)) break; if (!rtspClient->playMediaSubsession(*subsession)) break; }