Mercurial > mplayer.hg
changeset 11984:94e1953fbe8e
Added support for multiplexed audio+video RTP streams.
author | rsf |
---|---|
date | Sun, 22 Feb 2004 06:20:08 +0000 |
parents | 1615952c26a8 |
children | c43d654a1f45 |
files | libmpdemux/demux_rtp.cpp |
diffstat | 1 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_rtp.cpp Sun Feb 22 06:19:24 2004 +0000 +++ b/libmpdemux/demux_rtp.cpp Sun Feb 22 06:20:08 2004 +0000 @@ -119,7 +119,7 @@ int rtspStreamOverTCP = 0; -extern "C" void demux_open_rtp(demuxer_t* demuxer) { +extern "C" demuxer_t* demux_open_rtp(demuxer_t* demuxer) { do { TaskScheduler* scheduler = BasicTaskScheduler::createNew(); if (scheduler == NULL) break; @@ -254,6 +254,17 @@ rtpState->flags |= flags; } } while (0); + + // Hack: If audio and video are demuxed together on a single RTP stream, + // then create a new "demuxer_t" structure to allow the higher-level + // code to recognize this: + if (demux_is_multiplexed_rtp_stream(demuxer)) { + stream_t* s = new_ds_stream(demuxer->video); + demuxer_t* od = demux_open(s, DEMUXER_TYPE_UNKNOWN, -1, -1, -1, NULL); + demuxer = new_demuxers_demuxer(od, od, od); + } + + return demuxer; } extern "C" int demux_is_mpeg_rtp_stream(demuxer_t* demuxer) {