pub struct Segment {
pub number: u64,
pub url: String,
pub start: u64,
pub duration: u64,
pub timescale: u32,
}Expand description
One media segment of a StreamPlan::Segmented stream.
Times are in ticks of timescale per second, as in the MPD, so they add
up exactly; Segment::start_time and Segment::duration_time convert.
Fields§
§number: u64The DASH segment number ($Number$).
url: StringThe segment’s URL.
start: u64Start, in ticks from the start of the track.
duration: u64Length, in ticks.
timescale: u32Ticks per second.
Implementations§
Source§impl Segment
impl Segment
Sourcepub fn start_time(&self) -> Duration
pub fn start_time(&self) -> Duration
Start from the start of the track (rounded down to the nanosecond).
Sourcepub fn duration_time(&self) -> Duration
pub fn duration_time(&self) -> Duration
Length (rounded down to the nanosecond).
Trait Implementations§
impl Eq for Segment
impl StructuralPartialEq for Segment
Auto Trait Implementations§
impl Forget for Segment
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