pub struct PesPacket<'a> {
pub stream_id: StreamId,
pub pes_packet_length: u16,
pub header: Option<PesHeader<'a>>,
pub payload: &'a [u8],
}Expand description
A parsed PES packet.
Fields§
§stream_id: StreamIdstream_id (Table 2-22).
pes_packet_length: u16PES_packet_length as carried; 0 means unbounded (video).
header: Option<PesHeader<'a>>Optional PES header (absent for the special stream_ids).
payload: &'a [u8]The elementary-stream bytes (PES_packet_data_bytes).
Implementations§
Source§impl<'a> PesPacket<'a>
impl<'a> PesPacket<'a>
Sourcepub fn parse(b: &'a [u8]) -> Result<Self>
pub fn parse(b: &'a [u8]) -> Result<Self>
Parse a PES packet from the bytes starting at its packet_start_code_prefix.
Sourcepub fn serialized_len(&self) -> usize
pub fn serialized_len(&self) -> usize
Serialized length in bytes.
Sourcepub fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
pub fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
Serialize back to bytes (byte-identical to a spec-compliant input).
Trait Implementations§
impl<'a> Eq for PesPacket<'a>
Source§impl<'a> PartialEq for PesPacket<'a>
impl<'a> PartialEq for PesPacket<'a>
impl<'a> StructuralPartialEq for PesPacket<'a>
Auto Trait Implementations§
impl<'a> Freeze for PesPacket<'a>
impl<'a> RefUnwindSafe for PesPacket<'a>
impl<'a> Send for PesPacket<'a>
impl<'a> Sync for PesPacket<'a>
impl<'a> Unpin for PesPacket<'a>
impl<'a> UnsafeUnpin for PesPacket<'a>
impl<'a> UnwindSafe for PesPacket<'a>
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