GstAudioDecoder feature proposal for 1.0

dv dv at pseudoterminal.org
Fri Jul 6 13:23:57 PDT 2012


Hello,

in 0.10, I noticed that it seems to be impossible to adapt a decoder 
based on GstAudioDecoder to the downstream caps.

The use case is this:

Suppose there is a decoder "mydecoder", which has the capability of 
optimized decoding to several sample formats. That is, for each 
supported sample format, the decoder has a separate, optimized codepath.
It makes sense to make use of these optimizations. But that requires the 
decoder to somehow determine what kind of sample format downstream 
needs. Like:

   filesrc location=foo ! mydecoder ! "audio/x-raw-int, width=(int)32" ! 
fakesink

Ideally, in a case like this, mydecoder would determine that a 32-bit 
integer output is the right choice, and use the corresponding internal 
codepath.

The problem is that I cannot find out what downstream needs. In this 
case, I could not determine that a 32bit integer format is the best 
choice. GstAudioDecoder's setformat call informs me about incoming (that 
is, upstream) caps, but nothing informs me about downstream. It seems to 
be a limitation of GstAudioDecoder.

If so, I suggest to extend GstAudioDecoder in 0.11/1.0 to also inform 
about downstream caps.

C.R.


More information about the gstreamer-devel mailing list