uridecodebin: Ensure that pads caps are set before exposing them
authorThibault Saunier <tsaunier@igalia.com>
Wed, 7 Sep 2022 14:39:21 +0000 (10:39 -0400)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 15 Sep 2022 19:25:01 +0000 (19:25 +0000)
commit1c6adcab895edcd2f276d3877b8621335f5e23c0
treec437e172901f027801810a8fe253e0a877f170b3
parent86dfe03be9f6a7240e58910753a77a5f0c6476ba
uridecodebin: Ensure that pads caps are set before exposing them

We are supposed to guarantee that pads that are exposed have the caps
set, but for sources that have pad with "all raw caps" templates, we end
up exposing pads that don't have caps set yet, which can break code (in
GES for example).

To avoid that we let uridecodebin plug a `decodebin` after such pads and
let decodebin to handle that for us. In the end the only thing that
decodebin does in those cases is to wait for pads to be ready and expose
them, after that `uridecodebin` will expose those pads.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3009>
subprojects/gst-plugins-base/gst/playback/gsturidecodebin.c
subprojects/gst-plugins-base/tests/validate/meson.build
subprojects/gst-plugins-base/tests/validate/uridecodebin/expose_raw_pad_caps.validatetest [new file with mode: 0644]