pub struct Segment {
pub segment: u64,
pub media: Bytes,
pub duration: Duration,
pub program_date_time: Option<SystemTime>,
pub discontinuity: bool,
}Expand description
A segment with its transmuxed media, yielded by a Consumer.
Fields§
§segment: u64The aligned segment number (also its seg/{segment}.m4s URI stem), shared across the
broadcast’s renditions.
media: BytesThe transmuxed CMAF fragment (moof+mdat), fetched on demand by Consumer::next.
duration: DurationPresentation duration.
program_date_time: Option<SystemTime>Wall-clock start time, when the timeline advertises an anchor.
discontinuity: boolThe content timeline breaks before this segment (the source skipped or restarted), so a
recorder marks an EXT-X-DISCONTINUITY here. Every rendition marks the same breaks, as
HLS requires. Segments this cursor skipped (evicted, uncached, or gaps with no content
for this rendition) leave a hole on a continuous timeline, not a discontinuity.
Auto Trait Implementations§
impl !Freeze for Segment
impl RefUnwindSafe for Segment
impl Send for Segment
impl Sync for Segment
impl Unpin for Segment
impl UnsafeUnpin for Segment
impl UnwindSafe for Segment
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