[][src]Struct mpeg2ts_reader::pes::Timestamp

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.

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_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

impl Send for Timestamp

impl Sync for Timestamp

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.