[−][src]Struct mpeg2ts_reader::pes::Timestamp
A 33-bit Elementary Stream timestamp, used to represent PTS and DTS values which may appear in an Elementary Stream header.
Methods
impl Timestamp[src]
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)
Trait Implementations
impl Clone for Timestamp[src]
fn clone(&self) -> Timestamp[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Copy for Timestamp[src]
impl PartialEq<Timestamp> for Timestamp[src]
impl Debug for Timestamp[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>,