pub struct MediaTimestamp(/* private fields */);Expand description
Non-negative position on a media session’s zero-based microsecond timeline.
Implementations§
Source§impl MediaTimestamp
impl MediaTimestamp
pub const fn new_from_microseconds(value: u64) -> Self
pub const fn as_microseconds(self) -> u64
Sourcepub fn has_reached(self, boundary: Duration) -> bool
pub fn has_reached(self, boundary: Duration) -> bool
Whether an absolute presentation boundary has been reached.
Sourcepub fn frame_is_due(self, timing: VideoFrameTiming) -> Result<bool>
pub fn frame_is_due(self, timing: VideoFrameTiming) -> Result<bool>
Whether a frame’s declared end has been reached by this clock.
Sequential sources require a known duration; indexed sources can use
their next presentation timestamp through has_reached.
Sourcepub fn to_video_ticks(self, base: VideoTimeBase) -> Result<u64>
pub fn to_video_ticks(self, base: VideoTimeBase) -> Result<u64>
Convert to an encoded track’s rational timestamp ticks, rounding down.
Trait Implementations§
Source§impl Clone for MediaTimestamp
impl Clone for MediaTimestamp
impl Copy for MediaTimestamp
Source§impl Debug for MediaTimestamp
impl Debug for MediaTimestamp
Source§impl Default for MediaTimestamp
impl Default for MediaTimestamp
impl Eq for MediaTimestamp
Source§impl Ord for MediaTimestamp
impl Ord for MediaTimestamp
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for MediaTimestamp
impl PartialEq for MediaTimestamp
Source§impl PartialOrd for MediaTimestamp
impl PartialOrd for MediaTimestamp
impl StructuralPartialEq for MediaTimestamp
Auto Trait Implementations§
impl Forget for MediaTimestamp
impl Freeze for MediaTimestamp
impl Move for MediaTimestamp
impl RefUnwindSafe for MediaTimestamp
impl Send for MediaTimestamp
impl Sync for MediaTimestamp
impl Unpin for MediaTimestamp
impl UnsafeUnpin for MediaTimestamp
impl UnwindSafe for MediaTimestamp
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