[vlc-devel] Opus RTP raw audio decoder plugin patch

Ilkka Ollakka ileoo at videolan.org
Thu Nov 28 13:48:45 CET 2013


Hi,

Thanks for the new patch.

Why not use multistream api (OggOpus uses it) ? I don't have clear idea
how they differ (than that basic decoder seems to output S16N and
multistream can output FL32). Maybe someone more into Opus can clarify
this?

On Thu, Nov 28, 2013 at 08:24:11PM +0800, Yupeng Chang wrote:
> From 49da1c8c17b763cf71ee65e1b9f925ccc4e7b79f Mon Sep 17 00:00:00 2001
> From: Yupeng Chang <ypchang at ambarella.com>
> Date: Thu, 28 Nov 2013 20:19:17 +0800
> Subject: [PATCH 2/2] codec: Add Opus raw decoding.

> +    written = opus_decode(p_sys->p_raw_dec,
> +                          data, size,
> +                          (opus_int16*)p_aout_buffer->p_buffer,
> +                          buf_size / nb_channels, 0) * nb_channels * 2;
> +
> +    p_aout_buffer->i_nb_samples = nb_samples;
> +    p_aout_buffer->i_pts = date_Get( &p_sys->end_date );
> +    p_aout_buffer->i_length = written;

I think it would be clearer if you would do the multiplication when you
set i_lenght, not directly to opus_decode return value.

-- 
Ilkka Ollakka
Everybody is somebody else's weirdo.
		-- Dykstra
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20131128/53bd91b2/attachment.sig>


More information about the vlc-devel mailing list