how the audio decoder element handling when changing audio track

Sebastian Dröge sebastian at centricular.com
Tue Feb 4 06:48:24 PST 2014


On Sa, 2014-02-01 at 00:19 -0800, morris.yang wrote:
> Hi, I am a audio decoder element provider,and I still don't understand when
> app change audio tracks, what should the audio decoder element do anything
> else? or just the same way with a normal decoding negotiation?Do I need to
> add some additional actions in my original decoder element?For example, I
> may need to handle 1.the caps2.the set_property for "pass through"=ture,
> then I can know which audio format needs to be decoded and do it?Could give
> me some reference for audio decoder element needs do for changing audio
> tracks?Many thanksMorris

If you mean the application audio track selection, your element does not
have to do anything special at all. Just work as before.

If you mean changes of the input format of your audio decoder, you'll
get notified about that by changing caps. You will need to handle that
and reconfigure your decoder then.


Also you should consider using GstAudioDecoder as base class for your
decoders as it handles most of the common behaviour of audio decoders in
GStreamer and you'll have to write much less code.

-- 
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140204/87c59f5d/attachment-0001.pgp>


More information about the gstreamer-devel mailing list