Struct mpeg2ts_reader::packet::ClockRef [−][src]
pub struct ClockRef { /* fields omitted */ }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.
Implementations
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]
impl Copy for ClockRef[src]
impl Debug for ClockRef[src]
impl PartialEq<ClockRef> for ClockRef[src]
Auto Trait Implementations
impl RefUnwindSafe for ClockRef
impl Send for ClockRef
impl Sync for ClockRef
impl Unpin for ClockRef
impl UnwindSafe for ClockRef
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,