pub struct DashPackager<M: Muxer, S: StorageBackend> { /* private fields */ }Available on crate features
dash and hls only.Expand description
Keyframe-boundary DASH packager writing CMAF segments + a live MPD through a
StorageBackend. The DASH counterpart to
HlsSegmenter.
Implementations§
Source§impl<M: Muxer, S: StorageBackend> DashPackager<M, S>
impl<M: Muxer, S: StorageBackend> DashPackager<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 packager writing under prefix, target_duration-second segments,
a window-segment live MPD.
Sourcepub fn low_latency(self, part_target: f64) -> Self
pub fn low_latency(self, part_target: f64) -> Self
Enable LL-DASH: advertise availabilityTimeOffset in the MPD and emit a
CMAF fragment roughly every part_target seconds (via
Muxer::take_partial) so an attached ChunkSink can stream the
in-progress segment. Requires a muxer that implements take_partial.
Sourcepub fn with_chunk_sink(self, sink: Arc<dyn ChunkSink>) -> Self
pub fn with_chunk_sink(self, sink: Arc<dyn ChunkSink>) -> Self
Attach a ChunkSink that receives each segment’s fragments as produced.
Only meaningful together with low_latency.
Sourcepub fn manifest_key(&self) -> String
pub fn manifest_key(&self) -> String
The storage key of the MPD.
Trait Implementations§
Source§impl<M: Muxer, S: StorageBackend> Packager for DashPackager<M, S>
impl<M: Muxer, S: StorageBackend> Packager for DashPackager<M, S>
Auto Trait Implementations§
impl<M, S> !RefUnwindSafe for DashPackager<M, S>
impl<M, S> !UnwindSafe for DashPackager<M, S>
impl<M, S> Freeze for DashPackager<M, S>
impl<M, S> Send for DashPackager<M, S>
impl<M, S> Sync for DashPackager<M, S>where
M: Sync,
impl<M, S> Unpin for DashPackager<M, S>
impl<M, S> UnsafeUnpin for DashPackager<M, S>where
M: UnsafeUnpin,
S: UnsafeUnpin,
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