pub struct TsHeader {
pub tei: bool,
pub pusi: bool,
pub pid: u16,
pub scrambling: u8,
pub has_adaptation: bool,
pub has_payload: bool,
pub continuity_counter: u8,
}Expand description
Parsed TS header — the 4-byte transport header fields.
Fields§
§tei: boolTransport Error Indicator — set by the demodulator when an uncorrectable error is present in the packet.
pusi: boolPayload Unit Start Indicator — first byte of the payload is a new PES packet or PSI section header when set.
pid: u1613-bit Packet Identifier.
scrambling: u82-bit transport_scrambling_control (0 = not scrambled).
has_adaptation: boolAdaptation field present flag (adaptation_field_control bit 1).
has_payload: boolPayload present flag (adaptation_field_control bit 0).
continuity_counter: u84-bit continuity_counter (wraps 0..=15 per PID).
Implementations§
Source§impl TsHeader
impl TsHeader
Sourcepub const fn serialized_len() -> usize
pub const fn serialized_len() -> usize
Number of bytes written by serialize_into.
Sourcepub fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
pub fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
Serialize this header into the first 4 bytes of buf.
Trait Implementations§
impl Eq for TsHeader
Source§impl Serialize for TsHeader
impl Serialize for TsHeader
Source§type Error = Error
type Error = Error
The error type this implementer returns (usually the same as the
corresponding
Parse impl, but need not be).Source§fn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
Number of bytes
serialize_into will write.impl StructuralPartialEq for TsHeader
Auto Trait Implementations§
impl Freeze for TsHeader
impl RefUnwindSafe for TsHeader
impl Send for TsHeader
impl Sync for TsHeader
impl Unpin for TsHeader
impl UnsafeUnpin for TsHeader
impl UnwindSafe for TsHeader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more