Commit 3fc2289a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

RTP: add QCLEP and GSM static formats (untested)

parent 95b3682a
...@@ -449,6 +449,19 @@ static void *pcmu_init (demux_t *demux) ...@@ -449,6 +449,19 @@ static void *pcmu_init (demux_t *demux)
return codec_init (demux, &fmt); 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 /* PT=8
* PCMA: G.711 A-law (RFC3551) * PCMA: G.711 A-law (RFC3551)
*/ */
...@@ -485,6 +498,19 @@ static void *l16m_init (demux_t *demux) ...@@ -485,6 +498,19 @@ static void *l16m_init (demux_t *demux)
return codec_init (demux, &fmt); 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 /* PT=14
* MPA: MPEG Audio (RFC2250, §3.4) * MPA: MPEG Audio (RFC2250, §3.4)
*/ */
...@@ -575,6 +601,12 @@ int rtp_autodetect (demux_t *demux, rtp_session_t *session, ...@@ -575,6 +601,12 @@ int rtp_autodetect (demux_t *demux, rtp_session_t *session,
pt.frequency = 8000; pt.frequency = 8000;
break; break;
case 3:
msg_Dbg (demux, "detected GSM");
pt.init = gsm_init;
pt.frequency = 8000;
break;
case 8: case 8:
msg_Dbg (demux, "detected G.711 A-law"); msg_Dbg (demux, "detected G.711 A-law");
pt.init = pcma_init; pt.init = pcma_init;
...@@ -593,6 +625,12 @@ int rtp_autodetect (demux_t *demux, rtp_session_t *session, ...@@ -593,6 +625,12 @@ int rtp_autodetect (demux_t *demux, rtp_session_t *session,
pt.frequency = 44100; pt.frequency = 44100;
break; break;
case 12:
msg_Dbg (demux, "detected QCELP");
pt.init = qcelp_init;
pt.frequency = 8000;
break;
case 14: case 14:
msg_Dbg (demux, "detected MPEG Audio"); msg_Dbg (demux, "detected MPEG Audio");
pt.init = mpa_init; pt.init = mpa_init;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment