pub struct HlsSegmenter<M: Muxer, S: StorageBackend> { /* private fields */ }hls only.Expand description
Keyframe-boundary HLS segmenter writing through a StorageBackend.
Starts at the first keyframe, cuts a new segment at the first keyframe at or
after target_duration seconds, and after each cut writes the media segment
and the regenerated index.m3u8 to storage under prefix.
Implementations§
Source§impl<M: Muxer, S: StorageBackend> HlsSegmenter<M, S>
impl<M: Muxer, S: StorageBackend> HlsSegmenter<M, S>
Sourcepub fn new(
muxer: M,
storage: S,
prefix: impl Into<String>,
target_duration: u64,
window: usize,
) -> Self
pub fn new( muxer: M, storage: S, prefix: impl Into<String>, target_duration: u64, window: usize, ) -> Self
New segmenter writing under prefix, targeting target_duration-second
segments and a window-segment live playlist.
Sourcepub fn codec_string(&self) -> Option<String>
pub fn codec_string(&self) -> Option<String>
The HLS CODECS attribute for this rendition’s master-playlist entry.
Sourcepub fn low_latency(self, part_target: f64) -> Self
pub fn low_latency(self, part_target: f64) -> Self
Enable LL-HLS output: the playlist advertises parts and the segmenter
emits a partial segment roughly every part_target seconds (writing the
part files and #EXT-X-PART/preload-hint lines) in addition to full
segments. Requires a muxer that implements
take_partial (fMP4 / passthrough).
Sourcepub fn playlist_key(&self) -> String
pub fn playlist_key(&self) -> String
The storage key of the media playlist.
Sourcepub fn master_key(&self) -> String
pub fn master_key(&self) -> String
The storage key of the multivariant (master) playlist.