pub struct Timeline { /* private fields */ }Expand description
A stateful conversion session.
Implementations§
Source§impl Timeline
impl Timeline
Sourcepub fn with_anchor(anchor: TimeAnchor) -> Self
pub fn with_anchor(anchor: TimeAnchor) -> Self
New session with a wall-clock anchor.
Sourcepub fn set_anchor(&mut self, anchor: TimeAnchor)
pub fn set_anchor(&mut self, anchor: TimeAnchor)
Set / replace the anchor.
Sourcepub fn push_scte35(&mut self, bytes: &[u8]) -> Result<TimedEvent>
pub fn push_scte35(&mut self, bytes: &[u8]) -> Result<TimedEvent>
Parse a SCTE-35 section; unroll its PTS into an absolute MediaTime.
Sourcepub fn to_daterange(&self, ev: &TimedEvent) -> Result<DateRange>
pub fn to_daterange(&self, ev: &TimedEvent) -> Result<DateRange>
Convert to a DATERANGE (requires an anchor).
Sourcepub fn to_emsg(&self, ev: &TimedEvent, cfg: &EmsgConfig) -> Result<Vec<u8>>
pub fn to_emsg(&self, ev: &TimedEvent, cfg: &EmsgConfig) -> Result<Vec<u8>>
Convert to a serialized SCTE-35 emsg box.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Timeline
impl RefUnwindSafe for Timeline
impl Send for Timeline
impl Sync for Timeline
impl Unpin for Timeline
impl UnsafeUnpin for Timeline
impl UnwindSafe for Timeline
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