Bit depth in the container format vs. in the output
Arun Raghavan
arun at arunraghavan.net
Thu Jul 14 06:49:59 UTC 2016
On Wed, 13 Jul 2016, at 07:08 PM, Carlos Rafael Giani wrote:
> 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?
At one point we had toyed with the idea of having a "shallow" mode in
GstDiscoverer -- basically get it to stop at the point of plugging a
parser. Perhaps this is worth resurrecting?
-- Arun
More information about the gstreamer-devel
mailing list