A question about the decodebin logic for downstream caps

William Manley william.manley at youview.com
Thu Nov 1 08:52:52 PDT 2012


On 01/11/12 15:05, dv wrote:
> This, on the other hand, doesn't work:
> gst-launch-1.0 filesrc location=/path/to/song.mp3  ! decodebin !
> "audio/x-raw, format=(string)F32LE" ! fakesink
>
> Looking at the gst-launch -v output, it turns out that the decodebin
> srcpad uses S16LE as the format. The reason is this: mpg123audiodec
> looks at its peer pad, which in the decodebin case, is a ghost pad with
> caps set to "ANY". It then sees if S16LE is allowed by downstream. Since
> downstream essentially says that any format is OK, S16LE is chosen.
>
> An audioconvert element is necessary:
>
> gst-launch-1.0 filesrc location=/path/to/song.mp3  ! decodebin !
> audioconvert ! "audio/x-raw, format=(string)F32LE" ! fakesink
>
> But that defeats the whole purpose of multiple formats in the
> mpg123audiodec srccaps!
>
> Any ideas on how to solve this?

Try:

     gst-launch-1.0 filesrc location=/path/to/song.mp3 \
       ! decodebin caps="audio/x-raw, format=(string)F32LE" \
       ! fakesink

Thanks

Will
This transmission contains information that may be confidential and contain personal views which are not necessarily those of YouView TV Ltd. YouView TV Ltd (Co No:7308805) is a limited liability company registered in England and Wales with its registered address at YouView TV Ltd, 3rd Floor, 10 Lower Thames Street, London, EC3R 6YT. For details see our web site at http://www.youview.com




More information about the gstreamer-devel mailing list