[−][src]Struct mpeg2ts_reader::packet::ClockRef
A Clock Reference is used to represent the values of PCR and ESCR fields within the transport stream data.
A Clock Reference includes a 33-bit, 90kHz base component, together with another 9-bit,
high-resolution extension component.
Together these can be viewed as a 42-bit, 27MHz quantity (e.g. let full_value = pcr as u64).
Since the clock reference is limited to 33-bits, at a rate of 90kHz a continuously increasing
clock value will wrap-around approximately every 26.5 hours.
Methods
impl ClockRef[src]
pub fn from_slice(data: &[u8]) -> ClockRef[src]
Panics if data is shorter than 5 bytes
pub fn from_parts(base: u64, extension: u16) -> ClockRef[src]
Panics if the base is greater than 2^33-1 or the extension is greater than 2^9-1
pub fn base(&self) -> u64[src]
get the 33-bit, 90kHz 'base' component of the timestamp
pub fn extension(&self) -> u16[src]
get the 9-bit 'extension' component of the timestamp, measured in 300ths of the 90kHz base clockrate (i.e. 27MHz)
Trait Implementations
impl Clone for ClockRef[src]
fn clone(&self) -> ClockRef[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl From<ClockRef> for u64[src]
impl Copy for ClockRef[src]
impl PartialEq<ClockRef> for ClockRef[src]
fn eq(&self, other: &ClockRef) -> bool[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
This method tests for !=.
impl Debug for ClockRef[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T[src]
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,