pub struct MediaClock { /* private fields */ }Expand description
gPTP time, read through the monotonic clock.
Implementations§
Source§impl MediaClock
impl MediaClock
Sourcepub fn gptpd(interface: &str) -> Self
pub fn gptpd(interface: &str) -> Self
gPTP time as gptpd gives it for interface, on Linux; elsewhere,
and until gptpd gives it, the monotonic clock.
Sourcepub fn monotonic() -> Self
pub fn monotonic() -> Self
The monotonic clock alone: streams flow, but their presentation times mean nothing to other entities.
Sourcepub fn locked(&self) -> bool
pub fn locked(&self) -> bool
Whether gPTP time is a grandmaster’s, followed or this system’s, rather than the monotonic clock’s or an old line carried on.
Sourcepub fn generation(&self) -> u32
pub fn generation(&self) -> u32
Counts gPTP time’s discontinuities: a stream’s timeline built on it before a change is no longer good after.
Sourcepub fn last_step(&self) -> i64
pub fn last_step(&self) -> i64
How far gPTP time moved at the last discontinuity, in nanoseconds: against the monotonic clock at the first, against the last line after.
Sourcepub fn monotonic_at(&self, gptp: i64) -> Duration
pub fn monotonic_at(&self, gptp: i64) -> Duration
The monotonic time at which gPTP time reaches gptp nanoseconds.
Auto Trait Implementations§
impl !Freeze for MediaClock
impl Forget for MediaClock
impl Move for MediaClock
impl RefUnwindSafe for MediaClock
impl Send for MediaClock
impl Sync for MediaClock
impl Unpin for MediaClock
impl UnsafeUnpin for MediaClock
impl UnwindSafe for MediaClock
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