summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-06-08 09:29:14 +0000
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-02 04:07:16 +0200
commit8de983fe7f447d5b5a567dc9947184d19f1b6095 (patch)
tree1a41929ee211b0e881518e2f4c2df68ec9fc34f7
parentc280fd08c3ee5b81dc3ef83d274cd9972c5c29bc (diff)
downloadmpv-8de983fe7f447d5b5a567dc9947184d19f1b6095.tar.bz2
mpv-8de983fe7f447d5b5a567dc9947184d19f1b6095.tar.xz
rtsp: Support RTSP/RTP over HTTP via LIVE555
Patch by Malte Särner, malte D sarner A multiq se git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31347 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix compilation with nemesi and live555. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31348 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--DOCS/man/en/mplayer.15
-rw-r--r--cfg-common-opts.h3
-rw-r--r--cfg-common.h1
-rw-r--r--libmpdemux/demux_nemesi.c1
-rw-r--r--libmpdemux/demux_rtp.cpp8
5 files changed, 17 insertions, 1 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
index 05fa8a04c0..647fe68164 100644
--- a/DOCS/man/en/mplayer.1
+++ b/DOCS/man/en/mplayer.1
@@ -1786,6 +1786,11 @@ This option may be useful if you have a broken internet connection that does
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.
diff --git a/cfg-common-opts.h b/cfg-common-opts.h
index 614392a0b9..aa0f07d237 100644
--- a/cfg-common-opts.h
+++ b/cfg-common-opts.h
@@ -93,6 +93,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
diff --git a/cfg-common.h b/cfg-common.h
index 0b4ac9addc..f57e376157 100644
--- a/cfg-common.h
+++ b/cfg-common.h
@@ -185,6 +185,7 @@ extern const m_option_t lavfdopts_conf[];
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;
diff --git a/libmpdemux/demux_nemesi.c b/libmpdemux/demux_nemesi.c
index 704c31e4b1..3d2d413a4a 100644
--- a/libmpdemux/demux_nemesi.c
+++ b/libmpdemux/demux_nemesi.c
@@ -27,6 +27,7 @@
#include "nemesi/rtp.h"
#include <sched.h>
+int rtsp_transport_http = 0;
int rtsp_transport_tcp = 0;
int rtsp_transport_sctp = 0;
int rtsp_port = 0;
diff --git a/libmpdemux/demux_rtp.cpp b/libmpdemux/demux_rtp.cpp
index 8a5cfb8460..1dc7703921 100644
--- a/libmpdemux/demux_rtp.cpp
+++ b/libmpdemux/demux_rtp.cpp
@@ -113,8 +113,10 @@ static char* openURL_sip(SIPClient* client, char const* url) {
#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;
@@ -147,7 +149,11 @@ extern "C" demuxer_t* demux_open_rtp(demuxer_t* demuxer) {
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());