[Mplayer-cvslog] CVS: main/libmpdemux demux_rtp_codec.cpp,1.4,1.5

Ross Finlayson CVS rsf at mplayerhq.hu
Sun Jul 27 12:16:17 CEST 2003


Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv3994

Modified Files:
	demux_rtp_codec.cpp 
Log Message:
Added support for the "L16" and "L8" (raw PCM audio) RTP payload formats.


Index: demux_rtp_codec.cpp
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_rtp_codec.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- demux_rtp_codec.cpp	12 Apr 2003 09:29:13 -0000	1.4
+++ demux_rtp_codec.cpp	27 Jul 2003 10:16:14 -0000	1.5
@@ -32,10 +32,11 @@
   // Map known video MIME types to the BITMAPINFOHEADER parameters
   // that this program uses.  (Note that not all types need all
   // of the parameters to be set.)
-  if (strcmp(subsession->codecName(), "MPV") == 0 ||
-      strcmp(subsession->codecName(), "MP1S") == 0 ||
-      strcmp(subsession->codecName(), "MP2T") == 0) {
+  if (strcmp(subsession->codecName(), "MPV") == 0) {
     flags |= RTPSTATE_IS_MPEG12_VIDEO;
+  } else if (strcmp(subsession->codecName(), "MP1S") == 0 ||
+	     strcmp(subsession->codecName(), "MP2T") == 0) {
+    flags |= RTPSTATE_IS_MPEG12_VIDEO|RTPSTATE_IS_MULTIPLEXED;
   } else if (strcmp(subsession->codecName(), "H263") == 0 ||
 	     strcmp(subsession->codecName(), "H263-1998") == 0) {
     bih->biCompression = sh_video->format
@@ -116,6 +117,16 @@
   } else if (strcmp(subsession->codecName(), "AC3") == 0) {
     wf->wFormatTag = sh_audio->format = 0x2000;
     wf->nSamplesPerSec = 0; // sample rate is deduced from the data
+  } else if (strcmp(subsession->codecName(), "L16") == 0) {
+    wf->wFormatTag = sh_audio->format = 0x736f7774; // "twos"
+    wf->nBlockAlign = 1;
+    wf->wBitsPerSample = 16;
+    wf->cbSize = 0;
+  } else if (strcmp(subsession->codecName(), "L8") == 0) {
+    wf->wFormatTag = sh_audio->format = 0x20776172; // "raw "
+    wf->nBlockAlign = 1;
+    wf->wBitsPerSample = 8;
+    wf->cbSize = 0;
   } else if (strcmp(subsession->codecName(), "PCMU") == 0) {
     wf->wFormatTag = sh_audio->format = 0x7;
     wf->nAvgBytesPerSec = 8000;



More information about the MPlayer-cvslog mailing list