Skip to content

splitmuxsrc, splitmuxsink: lazy loading and dynamic fragment addition

Jan Schmidt requested to merge thaytan/gstreamer:splitmux-indexing into main

This MR adds some new abilities to splitmuxsink and splitmuxsrc, aimed at improving support for recordings with a large number of files, and for playing back ongoing recordings.

The overview of the changes is:

  • You can now add fragments directly to splitmuxsrc and provide the offset and duration in the stream.
    • Providing offset+duration means splitmuxsrc doesn't need to scan the file to measure it and calculate it. That makes for much faster startup
    • The new add-fragment signal can be used to add files to the set dynamically - allowing to be playing an ongoing recording and adding files to the playback set as they are finished.
  • splitmuxsrc no longer keeps all files open, but instead only keeps 100 open by default, configurable with a property
  • There is a lookahead property on splitmuxsrc to trigger (re)opening files a certain distance ahead of the play position
  • splitmuxsink will report fragment offset and duration when closing a file

There are also some refactor / bug fix commits that would be slightly annoying to break out of the patch stack now.

Merge request reports