decodebin3: Properly support changing input collections
I apologize for the big patchset. All but the last 2 commits are refactoring and cleanups (without feature modification).
This issue has been present for quite some time, which is that we poorly supported input collections (progressively) changing as they travel through decodebin3
The main change this brings in is to no longer assume that there is a single collection of streams. And instead group all information related to a collection of streams (The GstStreamCollection
, the requested streams, which ones are active or need to be activated, etc...) into a new structure DBCollection
.
- Reliably match
GST_EVENT_SELECT_STREAMS
to theDBCollection
they apply to - Only activate a
DBCollection
once it starts appearing on the output ofmultiqueue
- Gracefully handle "collection updates" (i.e. new collections which extend a previous one, as can happen with mpegts or mpegps)
- Don't auto-guess a selection early on, but only once it gets activated on the output of
multiqueue
(if there wasn't already a user selection)
This fixes a lot of issues related to gapless playback and instant-uri switching, including #3356 (closed) #3345 (closed)