gst-plugins-rs/net/hlssink3
Piotr Brzeziński 982a9a9aea hlssink3: Post hls-segment-added message
Posts a simple 'hls-segment-added' message with the segment location, start running time and duration.
With hlssink2, it was possible to catch 'splitmuxsink-fragment-closed', but since hlssink3 doesn't forward that message
(and hlscmafsink doesn't even use that mux), the new one was added to allow for listening for new fragments being added.

I extended the existing tests to check whether this message is posted correctly.
They theoretically only cover hlssink3, but hlscmafsink uses the same base class so it should be alright for now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1677>
2024-08-20 18:32:59 +00:00
..
examples Fix various new clippy 1.79 warnings 2024-06-14 08:33:49 +03:00
src hlssink3: Post hls-segment-added message 2024-08-20 18:32:59 +00:00
tests hlssink3: Post hls-segment-added message 2024-08-20 18:32:59 +00:00
build.rs Add hlssink3 plugin 2021-11-16 08:23:44 +00:00
Cargo.toml Use workspace features for crates metadata/deps 2024-02-05 15:34:31 +01:00
LICENSE-MPL-2.0 git: replace LICENSE file symlinks with copies 2023-04-04 14:26:37 +01:00
README.md hlssink3: Update README 2023-09-25 21:34:05 +09:00

GStreamer HTTP Live Streaming Plugin

A GStreamer HLS sink plugin. Based on the "hlssink2" element.

The hlssink3 plugin consists of hlssink3 and hlscmafsink elements. hlssink3 element generates traditional MPEG-TS based HLS segments and playlist while hlscmafsink generates CMAF (fragmented mp4) segments.

NOTE: hlssink3 element is feature-equivalent to the hlssink2 element. Any pipeline that uses hlssink2 can use the hlssink3 element and the result should be the same.

Both elements have a playlist-type property used to control the behavior of the HLS playlist file. The available values for this property are:

  • null (default): The tag #EXT-X-PLAYLIST-TYPE won't be present in the playlist during the pipeline processing. The playlist will be updated in sync as new segments are available, old segments are removed, keeping N segments as defined in the property playlist-length. This is the default behavior, and is compatible with how "hlssink2" works;
  • "event": The playlist is updated as new segments are available, and the tag #EXT-X-PLAYLIST-TYPE:EVENT is present during processing. No segments will be removed from the playlist.
  • "vod": The playlist behaves like the event option (a live event), but at the end of the processing, the playlist will be set to #EXT-X-PLAYLIST-TYPE:VOD.

At the end of the processing, #EXT-X-ENDLIST is added to the playlist if a enable-endlist property is enabled (default is true).

Live playlist generation

In case of live recording with multiple playlists, the #EXT-X-PROGRAM-DATE-TIME tags can be useful hint for clients when mapping each stream time to the wall-clock.

The #EXT-X-PROGRAM-DATE-TIME tags will be written to the playlist if enable-program-date-time property is enabled.