playbin3, decodebin3: Refactoring for gapless and other improvements
This MR finally implements the original design for gapless playback with playbin3
and (uri)decodebin3
.
Note: This was initially based on top of the buffering improvements MR : !3374 (closed)
The main goal is to re-use as much as possible existing elements, especially decoders and sinks. This is done by moving the "source" switch in uridecodebin3
before decodebin3
. From the outside the API is the same as before : wait for about-to-finish
and the set the uri
.
-
playbin3
only uses a singleuridecodebin3
and almost everything is forwarded directly to that instance. -
uridecodebin3
handles gapless, meaning you can use it in non-playbin uses-cases. Note that you will still need to usestreamsynchronizer
to convert the outgoing gapless streams to a "continuous" time realm -
urisourcebin
handles parsing and buffering of parsed streams via the newparse-streams
property (disabled by default, used when inuridecodebin3
) - A single
decodebin3
handles the various streams, reconfiguring the decoders if needed.
Other changes/improvements include:
- Better buffering in
urisourcebin
due to dealing with parsed streams (Ifurisourcebin parse-streams == True
non-default) - "Instantaneous" URI switching (if
instant-uri = True
, non-default). No need to go back to READY when switching URI, just set the new one with that property set andurisourcebin
(s) will be flushed/prerolled/switched automatically. Re-uses existing decoders if compatible.