changeset 31281:cc43f6d8bb6b

Support RTSP/RTP over HTTP via LIVE555. Patch by Malte S¸«£rner, malte D sarner A multiq se
author cehoyos
date Tue, 08 Jun 2010 09:29:14 +0000
parents 17db8e56de4c
children adf1dc3600b0
files DOCS/man/en/mplayer.1 cfg-common-opts.h cfg-common.h libmpdemux/demux_rtp.cpp
diffstat 4 files changed, 16 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1	Mon Jun 07 19:01:15 2010 +0000
+++ b/DOCS/man/en/mplayer.1	Tue Jun 08 09:29:14 2010 +0000
@@ -1816,6 +1816,11 @@
 not pass incoming UDP packets (see http://www.live555.com/\:mplayer/).
 .
 .TP
+.B \-rtsp\-stream\-over\-http (LIVE555 only)
+Used with 'http://' URLs to specify that the resulting incoming RTP and RTCP
+packets be streamed over HTTP.
+.
+.TP
 .B \-saveidx <filename>
 Force index rebuilding and dump the index to <filename>.
 Currently this only works with AVI files.
--- a/cfg-common-opts.h	Mon Jun 07 19:01:15 2010 +0000
+++ b/cfg-common-opts.h	Tue Jun 08 09:29:14 2010 +0000
@@ -101,6 +101,9 @@
 
 #ifdef CONFIG_LIVE555
     {"sdp", "-sdp has been removed, use sdp://file instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"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
--- a/cfg-common.h	Mon Jun 07 19:01:15 2010 +0000
+++ b/cfg-common.h	Tue Jun 08 09:29:14 2010 +0000
@@ -189,6 +189,7 @@
 
 extern int rtspStreamOverTCP;
 extern int rtsp_transport_tcp;
+extern int rtsp_transport_http;
 extern int rtsp_transport_sctp;
 extern int rtsp_port;
 extern char *rtsp_destination;
--- a/libmpdemux/demux_rtp.cpp	Mon Jun 07 19:01:15 2010 +0000
+++ b/libmpdemux/demux_rtp.cpp	Tue Jun 08 09:29:14 2010 +0000
@@ -112,8 +112,10 @@
 
 #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
 
 extern int rtsp_port;
@@ -146,7 +148,11 @@
       char const* url = demuxer->stream->streaming_ctrl->url->url;
       extern int verbose;
       if (strcmp(protocol, "rtsp") == 0) {
-	rtspClient = RTSPClient::createNew(*env, verbose, "MPlayer");
+	if (rtsp_transport_http == 1) {
+	  rtsp_transport_http = demuxer->stream->streaming_ctrl->url->port;
+	  rtsp_transport_tcp = 1;
+	}
+	rtspClient = RTSPClient::createNew(*env, verbose, "MPlayer", rtsp_transport_http);
 	if (rtspClient == NULL) {
 	  fprintf(stderr, "Failed to create RTSP client: %s\n",
 		  env->getResultMsg());