[vlc-devel] [PATCH] G.711 RTP payload for Stream Input

Christophe Mutricy xtophe at nxtelevision.com
Fri Jan 4 23:42:35 CET 2008


Hello,

On Fri, Jan 04, 08 at 10:24 +0100, maurizio simoni wrote:
> I've modified latest VLC sources from trunk (vlc-0.9.0) to add PCMU and PCMA
> as new demux modules. In this way it's possible to play RTP streams with
> G.711, both alaw and ulaw.

A few comments: (I haven't compiled it yet and won't be able to test
anyway)


> --- configure.ac	(revision 23415)
> +    VLC_ADD_BUILTINS([pcmu])
> +    VLC_ADD_BUILTINS([pcma])

Builtins no longer exist. 
And as there is no library detection, it would be better with the
default modules around line 1247

--- modules/demux/pcma.c        2008-01-04 22:09:26.000000000 +0000
+++ modules/demux/pcmu.c        2008-01-04 22:09:26.000000000 +0000
     // Fill fmt field
-    es_format_Init( &p_sys->fmt, AUDIO_ES, VLC_FOURCC( 'a', 'l', 'a', 'w' ) );
+    es_format_Init( &p_sys->fmt, AUDIO_ES, VLC_FOURCC( 'u', 'l', 'a', 'w' ) );

     /* Info that should be retrieved from SDP */

(meaningless diffs hidden)

So it seems it's not really necessary to have 2 modules. we could have a
submodule and 2 Open() or just a shortcut if there is a way to know from
which shortcut the module was called (vlc guru wanted)


> Index: modules/access/udp.c
>  
> +        case 0: // PCM u-law (G.711)
> +	    {
> +	       static int firstpkt = 1;
> +	       if(firstpkt)
> +	       {
> +		      msg_Dbg( p_access, "***** the following message will be displayed only once: ");
> +		      msg_Dbg( p_access, "BlockParseRTP(): RTP payload type for PCMU codec");
> +		      firstpkt = 0;
> +	       }
> +	    }
> +	   
> +	    psz_demux = "pcmu";
> +	    break;

I think those debugs will need to go

> +        case 0: // PCM u-law (G.711)
> +	    msg_Dbg( p_access, "BlockChoose(): detected PCMU codec over RTP (payload type = 0)");
> +	    p_access->psz_demux = strdup( "pcmu" );
> +	    break;

Those will need to be put in line with the adjacent debugs.

-- 
Xtophe



More information about the vlc-devel mailing list