pub struct SystemHeader {
pub rate_bound: u32,
pub audio_bound: u8,
pub fixed_flag: bool,
pub csps_flag: bool,
pub system_audio_lock_flag: bool,
pub system_video_lock_flag: bool,
pub video_bound: u8,
pub packet_rate_restriction_flag: bool,
pub reserved_bits: u8,
pub std_buffer_bounds: Vec<StdBufferBound>,
pub trailing_reserved: Vec<u8>,
}Expand description
A parsed system header.
Fields§
§rate_bound: u32Upper bound on program_mux_rate across all packs (22-bit, 50 B/s units).
audio_bound: u8Upper bound on simultaneously-active audio streams (6-bit).
fixed_flag: boolFixed / variable bitrate indicator.
csps_flag: boolConstrained system parameters flag.
system_audio_lock_flag: boolSystem audio lock flag.
system_video_lock_flag: boolSystem video lock flag.
video_bound: u8Upper bound on simultaneously-active video streams (5-bit).
packet_rate_restriction_flag: boolPacket rate restriction flag.
reserved_bits: u8The 7 reserved_bits after packet_rate_restriction_flag
(Table 2-40), preserved so a header whose encoder wrote something
other than the conventional all-ones (0x7F) re-serializes
byte-identically (audit r14-MPS-W8).
std_buffer_bounds: Vec<StdBufferBound>Per-stream P-STD buffer bounds (the while (nextbits() == '1') loop).
trailing_reserved: Vec<u8>Bytes of header_length that follow the stream-bound loop. Table
2-40 defines none, but a real encoder can pad the header; they are
preserved verbatim so the header re-serializes byte-identically
(audit r14-MPS-W8, #1119). Empty for a conformant header.
Trait Implementations§
Source§impl Clone for SystemHeader
impl Clone for SystemHeader
Source§impl Debug for SystemHeader
impl Debug for SystemHeader
impl Eq for SystemHeader
Source§impl<'a> Parse<'a> for SystemHeader
impl<'a> Parse<'a> for SystemHeader
Source§impl PartialEq for SystemHeader
impl PartialEq for SystemHeader
Source§impl Serialize for SystemHeader
Available on crate feature serde only.
impl Serialize for SystemHeader
serde only.Source§impl Serialize for SystemHeader
impl Serialize for SystemHeader
Source§type Error = Error
type Error = Error
Parse impl, but need not be).Source§fn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
serialize_into will write.Source§fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
buf. Returns the number of bytes
written (always equal to serialized_len()).Source§fn try_to_bytes(&self) -> Result<Vec<u8>, Self::Error>
fn try_to_bytes(&self) -> Result<Vec<u8>, Self::Error>
Vec and serialize into it, returning the serializer’s error instead of
panicking. This is the only
allocate-and-serialize entry point: there is deliberately no panicking
to_bytes (hand-built values, or values assembled from damaged wire data,
can violate a wire constraint, so the error must reach the caller).