[Mplayer-cvslog] CVS: main/libmpdemux demux_rtp.cpp,1.20,1.21

Ross Finlayson CVS syncmail at mplayerhq.hu
Sun Feb 22 07:20:10 CET 2004


CVS change done by Ross Finlayson CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv20140

Modified Files:
	demux_rtp.cpp 
Log Message:
Added support for multiplexed audio+video RTP streams.


Index: demux_rtp.cpp
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_rtp.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- demux_rtp.cpp	6 Jan 2004 09:30:27 -0000	1.20
+++ demux_rtp.cpp	22 Feb 2004 06:20:08 -0000	1.21
@@ -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) {




More information about the MPlayer-cvslog mailing list