decodebin3: Avoid parsebin usage if not needed
authorEdward Hervey <edward@centricular.com>
Wed, 9 Nov 2022 09:26:41 +0000 (10:26 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 16 Nov 2022 14:01:46 +0000 (14:01 +0000)
commit5e2606cacd5f2119cf8cf92f23f0f902cb7a0edc
treef0e536e20539e07bb042750fb2ea3aced9e4673f
parentf010dce6e7c068349e9f58e3d575aeca7e7df829
decodebin3: Avoid parsebin usage if not needed

If the incoming streams are already parsed, there is no need to add yet-another
parsebin to process it *IF* that stream is compatible with a decoder or the
decodebin3 output caps.

This only applies if all the following conditions are met:
* The incoming stream can *NOT* do pull-based scheduling
* The incoming stream provides a `GstStream` and `GstStreamCollection`
* The caps are compatible with either the decodebin3 output caps or a decoder
  input

If all those conditions are met, a identity element is used instead of a
parsebin element and the same code paths are taken.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2784>
subprojects/gst-plugins-base/gst/playback/gstdecodebin3-parse.c
subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c