uri-source: Respect stream-id even on streams muxed in raw
authorThibault Saunier <tsaunier@igalia.com>
Mon, 14 Dec 2020 01:54:37 +0000 (22:54 -0300)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sat, 23 Jan 2021 04:27:07 +0000 (04:27 +0000)
commit0d95d9258b9700d1d7da5cf562c30aef2b865a93
treee6ebd785cfa3a97c35ae23fb6c296402036f8bf9
parent8e9e95b90a4c68364155b9e5e7cff5a4b5ca36a4
uri-source: Respect stream-id even on streams muxed in raw

The issue is that we rely on `decodebin::autoplug-select` to `SKIP`
unwanted pads, that signal was first provided to select factories during
autoplugin, not totally thought to avoid exposing pads. For streams
muxed directly in raw, decodebin has nothing to plug after the demuxer
and the pad is exposed right away, meaning that we do not have any
chance to avoid that pad to be exposed. This patch takes that limitation
into account and checks the stream ID of the pads exposed by decodebin
before exposing them itself, so we end up using the right pad even if
more are uselessly exposed by decodebin.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/issues/126

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/222>
ges/ges-audio-uri-source.c
ges/ges-source.c
ges/ges-source.h
ges/ges-uri-source.c
ges/ges-uri-source.h
ges/ges-video-uri-source.c