pub struct HlsSegmenter<M: Muxer, S: StorageBackend> { /* private fields */ }Available on crate feature
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 reported by the muxer, for a master playlist.
Sourcepub fn low_latency(self, part_target: f64) -> Self
pub fn low_latency(self, part_target: f64) -> Self
Enable LL-HLS playlist output with the given part target duration.
Sourcepub fn playlist_key(&self) -> String
pub fn playlist_key(&self) -> String
The storage key of the media playlist.
Trait Implementations§
Source§impl<M: Muxer, S: StorageBackend> Packager for HlsSegmenter<M, S>
impl<M: Muxer, S: StorageBackend> Packager for HlsSegmenter<M, S>
Auto Trait Implementations§
impl<M, S> Freeze for HlsSegmenter<M, S>
impl<M, S> RefUnwindSafe for HlsSegmenter<M, S>where
M: RefUnwindSafe,
S: RefUnwindSafe,
impl<M, S> Send for HlsSegmenter<M, S>
impl<M, S> Sync for HlsSegmenter<M, S>where
M: Sync,
impl<M, S> Unpin for HlsSegmenter<M, S>
impl<M, S> UnsafeUnpin for HlsSegmenter<M, S>where
M: UnsafeUnpin,
S: UnsafeUnpin,
impl<M, S> UnwindSafe for HlsSegmenter<M, S>where
M: UnwindSafe,
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more