Skip to content

playback: improvements to buffering and processing

Edward Hervey requested to merge bilboed/gstreamer:urisourcebin-refactor into main

Refactor urisourcebin handling

A lot of code had been used as-is from uridecodebin3 and was in dire need of a cleanup/refactoring

Improve urisourcebin buffering handling

Introduce the option to have the streams be parsed with parsebin for compatible sources (i.e. which are eligible for buffering in the same way as before this commit).

By parsing the inputs directly, this allows more accurate buffering control:

  • Instead of relying on potential bitrate information coming from somewhere
  • and without being linked downstream

If parse-streams is activated and the stream is eligible for buffering, then a multiqueue will be used on the output of parsebin in order to handle the buffering.

API: parse-streams

decodebin3 Avoid parsebin 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.

decodebin3 refactoring and cleanup

Merge request reports