summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authorrsf <rsf@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-07-27 10:16:14 +0000
committerrsf <rsf@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-07-27 10:16:14 +0000
commit84f273841e3a61fc1bc27d7db905111ac3a2fa90 (patch)
tree9f20ba787bae6d9803866df019640edffac28149 /libmpdemux
parent4867e17bfa7ca38c347b3e446c00f5ea83a7ca67 (diff)
downloadmpv-84f273841e3a61fc1bc27d7db905111ac3a2fa90.tar.bz2
mpv-84f273841e3a61fc1bc27d7db905111ac3a2fa90.tar.xz
Added support for the "L16" and "L8" (raw PCM audio) RTP payload formats.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10479 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_rtp_codec.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/libmpdemux/demux_rtp_codec.cpp b/libmpdemux/demux_rtp_codec.cpp
index 4d58824594..f59504506b 100644
--- a/libmpdemux/demux_rtp_codec.cpp
+++ b/libmpdemux/demux_rtp_codec.cpp
@@ -32,10 +32,11 @@ void rtpCodecInitialize_video(demuxer_t* demuxer,
// 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 @@ void rtpCodecInitialize_audio(demuxer_t* demuxer,
} 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;