Struct mpeg2ts_reader::pes::Timestamp [−][src]
pub struct Timestamp { /* fields omitted */ }A 33-bit Elementary Stream timestamp, used to represent PTS and DTS values which may appear in an Elementary Stream header.
Implementations
impl Timestamp[src]
pub const MAX: Timestamp[src]
The largest representable timestamp value before the timestamp wraps back around to zero.
pub const TIMEBASE: u64[src]
90kHz timebase in which PTS and DTS values are measured.
pub fn from_pts_bytes(buf: &[u8]) -> Result<Timestamp, TimestampError>[src]
Parse a Presentation Time Stamp value from the 5 bytes at the start of the given slice
Panics if fewer than 5 bytes given
pub fn from_dts_bytes(buf: &[u8]) -> Result<Timestamp, TimestampError>[src]
Parse a Decode Time Stamp value from the 5 bytes at the start of the given slice
Panics if fewer than 5 bytes given
pub fn from_bytes(buf: &[u8]) -> Result<Timestamp, TimestampError>[src]
Parse a Time Stamp value from the 5 bytes at the start of the given slice, without checking
the 4-bit prefix for any particular value (the from_pts_bytes() and from_dts_bytes()
methods, in contrast, do check that the expected prefix bits are present).
Panics if fewer than 5 bytes given
pub fn from_u64(val: u64) -> Timestamp[src]
Panics if the given val is greater than 2^33-1
pub fn value(self) -> u64[src]
produces the timestamp’s value (only the low 33 bits are used)
pub fn likely_wrapped_since(self, other: Self) -> bool[src]
returns true if timestamps are likely to have wrapped around since other, given a curent
timestamp of self, and given the two timestamp values were taken no more than about
13.3 hours apart (i.e. no more than half the 26.5-ish hours it takes for the wrap around
to occur).
Trait Implementations
impl Clone for Timestamp[src]
impl Copy for Timestamp[src]
impl Debug for Timestamp[src]
impl PartialEq<Timestamp> for Timestamp[src]
impl StructuralPartialEq for Timestamp[src]
Auto Trait Implementations
impl RefUnwindSafe for Timestamp
impl Send for Timestamp
impl Sync for Timestamp
impl Unpin for Timestamp
impl UnwindSafe for Timestamp
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>,