Bit depth in the container format vs. in the output

Carlos Rafael Giani dv at pseudoterminal.org
Wed Jul 13 13:38:39 UTC 2016


Hello,

there is a problem with displaying file type information. Suppose I want 
to show a file's bit depth on screen. The intuitive solution is to use 
the caps that come out of a uridecodebin for example, and look at its 
format value. But this can be misleading.

For example, if in a system, avdec_flac is used instead of flacdec, then 
the format value will be S32LE even if the actual internal FLAC data 
format is S24_32LE. So now all of a sudden the display shows "32 bit", 
even though "24 bit" is more correct.

This is even visible with gst-discoverer. If you have a 24-bit FLAC 
file, and run gst-discoverer-1.0 -v <flacfile> , the output with flacdec 
present is:

     Channels: 2
     Sample rate: 192000
     Depth: 24
     Bitrate: 0
     Max bitrate: 0

but with flacdec missing (so only avdec_flac is available) it is:

     Channels: 2
     Sample rate: 192000
     Depth: 32
     Bitrate: 0
     Max bitrate: 0

So, the correct way to do this is to get the caps that *flacparse* 
outputs, and not the decoder's. However, I have no clue how to do that, 
or even how to communicate such information to the application properly. 
There is no tag that can hold a GstCaps instance.

Any ideas?


More information about the gstreamer-devel mailing list