Instead of always going through the file system API we allow the
application to modify the behaviour. For the playlist itself and
fragments, the application can provide a GOutputStream. In addition the
sink notifies the application whenever a fragment can be deleted.
hlssink2 defined "max-files" property to decide the maximum number
of fragments which should be stored in disk. But we've not used
the property. Instead, the size has been maintained by "playlist-length".
Since "max-files" and "playlist-length" have different meaning,
the decision should be done by "max-files" property.
For example, an user might want expose only 3 fragments via playlist
but might want to keep more files than 3 in disk.
hlssink* elements could be finalized without EOS event, and in that case
the final playlist might not include the EXT-X-ENDLIST tag.
Since missing ENDLIST tag means it's live stream, but we did't intend it,
hlssink* elements should put the tag at the end.
We don't want to reset the muxer, otherwise the continuity counter will
reset after each segment and some software gets confused. We want to
create a continuous stream.
https://bugzilla.gnome.org/show_bug.cgi?id=794816
This embeds the muxer inside the sink and accepts elementary streams
while the old HLS sink required the muxer outside. Apart from that the
interface is the same as before.
Currently only mpegtsmux is supported, but support for other muxers is
just a matter of adding a property.
The advantage of the new sink is that it reduces complexity a lot and
properly handles pre-encoded streams with appropriately spaced
keyframes.
https://bugzilla.gnome.org/show_bug.cgi?id=781496