From 9a17f78cb880a683f0cfba51280e17adad850f54 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Thu, 4 Oct 2007 16:33:52 +0000 Subject: [PATCH] Untested support for streaming G.711 over RTP --- modules/stream_out/rtp.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c index 2f361c1016..ca56af22ff 100644 --- a/modules/stream_out/rtp.c +++ b/modules/stream_out/rtp.c @@ -932,6 +932,26 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) else switch( p_fmt->i_codec ) { + case VLC_FOURCC( 'u', 'l', 'a', 'w' ): + if( p_fmt->audio.i_channels == 1 && p_fmt->audio.i_rate == 8000 ) + id->i_payload_type = 0; + id->i_clock_rate = p_fmt->audio.i_rate; + if( asprintf( &id->psz_rtpmap, "PCMU/%d/%d", p_fmt->audio.i_rate, + p_fmt->audio.i_channels ) == -1 ) + id->psz_rtpmap = NULL; + id->i_clock_rate = p_fmt->audio.i_rate; + id->pf_packetize = rtp_packetize_l8; + break; + case VLC_FOURCC( 'a', 'l', 'a', 'w' ): + if( p_fmt->audio.i_channels == 1 && p_fmt->audio.i_rate == 8000 ) + id->i_payload_type = 8; + id->i_clock_rate = p_fmt->audio.i_rate; + if( asprintf( &id->psz_rtpmap, "PCMA/%d/%d", p_fmt->audio.i_rate, + p_fmt->audio.i_channels ) == -1 ) + id->psz_rtpmap = NULL; + id->i_clock_rate = p_fmt->audio.i_rate; + id->pf_packetize = rtp_packetize_l8; + break; case VLC_FOURCC( 's', '1', '6', 'b' ): if( p_fmt->audio.i_channels == 1 && p_fmt->audio.i_rate == 44100 ) { -- 2.39.5