summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorrtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-02-18 15:57:50 +0000
committerrtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-02-18 15:57:50 +0000
commitef4a45551be048c38b1a2da67569f4626a74e399 (patch)
treeefe45d840e761ce20ac2c6db5065988a0a803e9b /stream
parent56d17cef0213a9c7a7f15d031b77116349c4a480 (diff)
downloadmpv-ef4a45551be048c38b1a2da67569f4626a74e399.tar.bz2
mpv-ef4a45551be048c38b1a2da67569f4626a74e399.tar.xz
Add support for smil playlist served over realrtsp
(audio and video playback only, not full smil support) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22260 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r--stream/librtsp/rtsp_session.c9
-rw-r--r--stream/realrtsp/real.c7
-rw-r--r--stream/realrtsp/real.h4
3 files changed, 17 insertions, 3 deletions
diff --git a/stream/librtsp/rtsp_session.c b/stream/librtsp/rtsp_session.c
index a5c6655cf5..ecc07501f9 100644
--- a/stream/librtsp/rtsp_session.c
+++ b/stream/librtsp/rtsp_session.c
@@ -140,6 +140,12 @@ rtsp_session_t *rtsp_session_start(int fd, char **mrl, char *path, char *host,
}
rtsp_session->real_session = init_real_rtsp_session ();
+ if(!strncmp(h->streams[0]->mime_type, "application/vnd.rn-rmadriver", h->streams[0]->mime_type_size)) {
+ rtsp_session->real_session->header_len = 0;
+ rtsp_session->real_session->recv_size = 0;
+ rtsp_session->real_session->rdt_rawdata = 1;
+ mp_msg(MSGT_OPEN, MSGL_V, "smil-over-realrtsp playlist, switching to raw rdt mode\n");
+ } else {
rtsp_session->real_session->header_len =
rmff_dump_header (h, (char *) rtsp_session->real_session->header, 1024);
@@ -150,6 +156,7 @@ rtsp_session_t *rtsp_session_start(int fd, char **mrl, char *path, char *host,
rtsp_session->real_session->recv_size =
rtsp_session->real_session->header_len;
+ }
rtsp_session->real_session->recv_read = 0;
} else /* not a Real server : try RTP instead */
{
@@ -219,7 +226,7 @@ int rtsp_session_read (rtsp_session_t *this, char *data, int len) {
dest += fill;
this->real_session->recv_read = 0;
this->real_session->recv_size =
- real_get_rdt_chunk (this->s, (char **)&(this->real_session->recv));
+ real_get_rdt_chunk (this->s, (char **)&(this->real_session->recv), this->real_session->rdt_rawdata);
if (this->real_session->recv_size < 0) {
this->real_session->rdteof = 1;
this->real_session->recv_size = 0;
diff --git a/stream/realrtsp/real.c b/stream/realrtsp/real.c
index 23fb74f0b3..ec75b3ea57 100644
--- a/stream/realrtsp/real.c
+++ b/stream/realrtsp/real.c
@@ -342,7 +342,7 @@ static rmff_header_t *real_parse_sdp(char *data, char **stream_rules, uint32_t b
return header;
}
-int real_get_rdt_chunk(rtsp_t *rtsp_session, char **buffer) {
+int real_get_rdt_chunk(rtsp_t *rtsp_session, char **buffer, int rdt_rawdata) {
int n=1;
uint8_t header[8];
@@ -414,6 +414,10 @@ int real_get_rdt_chunk(rtsp_t *rtsp_session, char **buffer) {
else
ph.flags=0;
*buffer = xbuffer_ensure_size(*buffer, 12+size);
+ if(rdt_rawdata) {
+ n=rtsp_read_data(rtsp_session, *buffer, size-12);
+ return (n <= 0) ? 0 : n;
+ }
rmff_dump_pheader(&ph, *buffer);
size-=12;
n=rtsp_read_data(rtsp_session, (*buffer)+12, size);
@@ -650,6 +654,7 @@ init_real_rtsp_session (void)
real_rtsp_session = malloc (sizeof (struct real_rtsp_session_t));
real_rtsp_session->recv = xbuffer_init (BUF_SIZE);
real_rtsp_session->rdteof = 0;
+ real_rtsp_session->rdt_rawdata = 0;
return real_rtsp_session;
}
diff --git a/stream/realrtsp/real.h b/stream/realrtsp/real.h
index 4abc58cbd1..c37f5af5d1 100644
--- a/stream/realrtsp/real.h
+++ b/stream/realrtsp/real.h
@@ -47,9 +47,11 @@ struct real_rtsp_session_t {
int header_read;
int rdteof;
+
+ int rdt_rawdata;
};
-int real_get_rdt_chunk(rtsp_t *rtsp_session, char **buffer);
+int real_get_rdt_chunk(rtsp_t *rtsp_session, char **buffer, int rdt_rawdata);
rmff_header_t *real_setup_and_get_header(rtsp_t *rtsp_session, uint32_t bandwidth,
char *username, char *password);
struct real_rtsp_session_t *init_real_rtsp_session (void);