pub struct Pack<'a> {
pub pack_header: PackHeader<'a>,
pub system_header: Option<SystemHeader>,
pub psm: Option<ProgramStreamMap<'a>>,
pub pes_packets: Vec<PesPacket<'a>>,
}Expand description
A single pack within a Program Stream: a pack_header(), optionally a
system_header(), an optional Program Stream Map, and zero or more PES
packets.
Fields§
§pack_header: PackHeader<'a>The pack header (SCR, program_mux_rate, stuffing).
system_header: Option<SystemHeader>The optional system header (only in the first pack of a compliant stream).
psm: Option<ProgramStreamMap<'a>>The Program Stream Map (stream_id 0xBC), if one appears in this
pack — stream_type → elementary_stream_id mapping (Table 2-41). If
more than one PSM packet appears (a version-change re-announcement),
this holds the last one.
W5 (#1119): PSM packets used to be handed to mpeg_pes::PesPacket::parse
like any other PES and returned as an opaque, un-mapped PES packet —
so a consumer had no way to learn stream_type per elementary
stream and had to guess the codec from stream_id alone.
pes_packets: Vec<PesPacket<'a>>Parsed PES packets within this pack (PSM packets are not included
here — see psm).