[vlc-devel] commit: RTP: add QCLEP and GSM static formats (untested) ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sun Dec 7 18:40:06 CET 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Dec 7 19:39:49 2008 +0200| [3fc2289a178bd6cd0c9f813265504573d681c6a2] | committer: Rémi Denis-Courmont
RTP: add QCLEP and GSM static formats (untested)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3fc2289a178bd6cd0c9f813265504573d681c6a2
---
modules/access/rtp/rtp.c | 38 ++++++++++++++++++++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/modules/access/rtp/rtp.c b/modules/access/rtp/rtp.c
index 056d940..d639ab1 100644
--- a/modules/access/rtp/rtp.c
+++ b/modules/access/rtp/rtp.c
@@ -449,6 +449,19 @@ static void *pcmu_init (demux_t *demux)
return codec_init (demux, &fmt);
}
+/* PT=3
+ * GSM
+ */
+static void *gsm_init (demux_t *demux)
+{
+ es_format_t fmt;
+
+ es_format_Init (&fmt, AUDIO_ES, VLC_FOURCC ('g', 's', 'm', ' '));
+ fmt.audio.i_rate = 8000;
+ fmt.audio.i_channels = 1;
+ return codec_init (demux, &fmt);
+}
+
/* PT=8
* PCMA: G.711 A-law (RFC3551)
*/
@@ -485,6 +498,19 @@ static void *l16m_init (demux_t *demux)
return codec_init (demux, &fmt);
}
+/* PT=12
+ * QCELP
+ */
+static void *qcelp_init (demux_t *demux)
+{
+ es_format_t fmt;
+
+ es_format_Init (&fmt, AUDIO_ES, VLC_FOURCC ('Q', 'c', 'l', 'p'));
+ fmt.audio.i_rate = 8000;
+ fmt.audio.i_channels = 1;
+ return codec_init (demux, &fmt);
+}
+
/* PT=14
* MPA: MPEG Audio (RFC2250, §3.4)
*/
@@ -575,6 +601,12 @@ int rtp_autodetect (demux_t *demux, rtp_session_t *session,
pt.frequency = 8000;
break;
+ case 3:
+ msg_Dbg (demux, "detected GSM");
+ pt.init = gsm_init;
+ pt.frequency = 8000;
+ break;
+
case 8:
msg_Dbg (demux, "detected G.711 A-law");
pt.init = pcma_init;
@@ -593,6 +625,12 @@ int rtp_autodetect (demux_t *demux, rtp_session_t *session,
pt.frequency = 44100;
break;
+ case 12:
+ msg_Dbg (demux, "detected QCELP");
+ pt.init = qcelp_init;
+ pt.frequency = 8000;
+ break;
+
case 14:
msg_Dbg (demux, "detected MPEG Audio");
pt.init = mpa_init;
More information about the vlc-devel
mailing list