[MPlayer-dev-eng] [PATCH] Support for MPEG-4 (AAC) audio RTSP/RTP streams
Ross Finlayson
finlayson at live.com
Fri Jan 17 10:17:05 CET 2003
The following patch allows MPlayer to be used (with the "LIVE.COM Streaming
Media" libraries) to play MPEG-4 (i.e., AAC) RTSP/RTP streams.
In particular, 3GPP standard audio streams can now be played.
Ross.
-------------- next part --------------
Index: libmpdemux/demux_rtp.cpp
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_rtp.cpp,v
retrieving revision 1.8
diff -u -r1.8 demux_rtp.cpp
--- libmpdemux/demux_rtp.cpp 6 Dec 2002 09:41:13 -0000 1.8
+++ libmpdemux/demux_rtp.cpp 17 Jan 2003 08:46:55 -0000
@@ -247,6 +247,19 @@
wf->nBlockAlign = 33;
wf->wBitsPerSample = 16;
wf->cbSize = 0;
+ } else if (strcmp(subsession->codecName(), "MP4A-LATM") == 0) {
+ wf->wFormatTag = sh_audio->format = mmioFOURCC('m','p','4','a');
+ // For the codec to work correctly, it needs "AudioSpecificConfig"
+ // data, which is parsed from the "StreamMuxConfig" string that
+ // was present (hopefully) in the SDP description:
+ unsigned codecdata_len;
+ sh_audio->codecdata
+ = parseStreamMuxConfigStr(subsession->fmtp_config(),
+ codecdata_len);
+ sh_audio->codecdata_len = codecdata_len;
+#ifndef HAVE_FAAD
+ fprintf(stderr, "Warning: Playing MPEG-4 (AAC) Audio requires the \"faad\" library!\n");
+#endif
} else {
fprintf(stderr,
"Unknown mplayer format code for MIME type \"audio/%s\"\n",
More information about the MPlayer-dev-eng
mailing list