#[non_exhaustive]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 pts: Option<Pts>,
pub dts: Option<Dts>,
pub escr: Option<Escr>,
pub es_rate: Option<u32>,
pub dsm_trick_mode: Option<TrickMode>,
pub additional_copy_info: Option<u8>,
pub pes_crc: Option<u16>,
pub pes_extension: Option<PesExtension<'a>>,
pub header_stuffing_len: usize,
}Expand description
The optional PES header present for non-special stream_ids
(ISO/IEC 13818-1 §2.4.3.6, §2.4.3.7). All optional sub-fields are fully
typed — the raw optional_fields blob has been replaced with the
individual decoded fields.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.scrambling_control: u8PES_scrambling_control (2 bits).
pes_priority: boolPES_priority.
data_alignment_indicator: booldata_alignment_indicator.
copyright: boolcopyright.
original_or_copy: booloriginal_or_copy.
pts: Option<Pts>Presentation time stamp, if PTS_DTS_flags indicated one.
dts: Option<Dts>Decoding time stamp, if PTS_DTS_flags was 11.
escr: Option<Escr>Elementary stream clock reference (6 bytes), if ESCR_flag is set.
es_rate: Option<u32>22-bit ES rate (bytes/second × 50), if ES_rate_flag is set.
dsm_trick_mode: Option<TrickMode>DSM trick-mode control byte (typed), if DSM_trick_mode_flag is set.
additional_copy_info: Option<u8>7-bit additional_copy_info, if additional_copy_info_flag is set.
pes_crc: Option<u16>Previous PES packet CRC (16 bits), if PES_CRC_flag is set.
pes_extension: Option<PesExtension<'a>>PES extension sub-structure, if PES_extension_flag is set.
header_stuffing_len: usizeNumber of trailing 0xFF stuffing bytes inside the PES_header_data_length
region, after the typed optional fields (ISO/IEC 13818-1:2007 §2.4.3.7 —
“stuffing_byte: fixed 8-bit value 0xFF”).
Encoders pad the optional-header block (often so the elementary stream
starts at a fixed offset). These bytes are part of the wire image;
capturing the count lets PesPacket::serialize_into reproduce the
header byte-for-byte. Set to 0 when constructing a header with no
stuffing.