Skip to main content

PesHeader

Struct PesHeader 

Source
pub struct PesHeader<'a> {
Show 14 fields pub scrambling_control: u8, pub pes_priority: bool, pub data_alignment_indicator: bool, pub copyright: bool, pub original_or_copy: bool, pub escr_flag: bool, pub es_rate_flag: bool, pub dsm_trick_mode_flag: bool, pub additional_copy_info_flag: bool, pub pes_crc_flag: bool, pub pes_extension_flag: bool, pub pts: Option<Pts>, pub dts: Option<Dts>, pub optional_fields: &'a [u8],
}
Expand description

The optional PES header present for non-special stream_ids (§2.4.3.6). The variable optional fields (PTS/DTS, ESCR, ES_rate, trick mode, …) are retained verbatim in optional_fields; pts/dts are decoded from their front for convenience.

Fields§

§scrambling_control: u8

PES_scrambling_control (2 bits).

§pes_priority: bool

PES_priority.

§data_alignment_indicator: bool

data_alignment_indicator.

§copyright: bool

copyright.

§original_or_copy: bool

original_or_copy.

§escr_flag: bool

ESCR_flag.

§es_rate_flag: bool

ES_rate_flag.

§dsm_trick_mode_flag: bool

DSM_trick_mode_flag.

§additional_copy_info_flag: bool

additional_copy_info_flag.

§pes_crc_flag: bool

PES_CRC_flag.

§pes_extension_flag: bool

PES_extension_flag.

§pts: Option<Pts>

Presentation time stamp, if PTS_DTS_flags indicated one.

§dts: Option<Dts>

Decoding time stamp, if PTS_DTS_flags was 11.

§optional_fields: &'a [u8]

The raw optional-header data block (PES_header_data_length bytes): the PTS/DTS plus any ESCR/ES_rate/trick-mode/CRC/extension sub-fields.

Trait Implementations§

Source§

impl<'a> Clone for PesHeader<'a>

Source§

fn clone(&self) -> PesHeader<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for PesHeader<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'a> Eq for PesHeader<'a>

Source§

impl<'a> PartialEq for PesHeader<'a>

Source§

fn eq(&self, other: &PesHeader<'a>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a> Serialize for PesHeader<'a>

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'a> StructuralPartialEq for PesHeader<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for PesHeader<'a>

§

impl<'a> RefUnwindSafe for PesHeader<'a>

§

impl<'a> Send for PesHeader<'a>

§

impl<'a> Sync for PesHeader<'a>

§

impl<'a> Unpin for PesHeader<'a>

§

impl<'a> UnsafeUnpin for PesHeader<'a>

§

impl<'a> UnwindSafe for PesHeader<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.