Struct mpeg2ts_reader::psi::BufferCompactSyntaxParser
source · pub struct BufferCompactSyntaxParser<P>where
P: WholeCompactSyntaxPayloadParser,{ /* private fields */ }
Expand description
Implements CompactSyntaxPayloadParser
so that any sections that cross TS-packet boundaries
are collected into a single byte-buffer for easier parsing. In the common case that the
section fits entirely in a single TS packet, the implementation is zero-copy.
Implementations§
source§impl<P> BufferCompactSyntaxParser<P>where
P: WholeCompactSyntaxPayloadParser,
impl<P> BufferCompactSyntaxParser<P>where
P: WholeCompactSyntaxPayloadParser,
sourcepub fn new(parser: P) -> BufferCompactSyntaxParser<P>
pub fn new(parser: P) -> BufferCompactSyntaxParser<P>
wraps the given WholeSectionSyntaxPayloadParser
instance in a new
BufferSectionSyntaxParser
.
Trait Implementations§
source§impl<P> CompactSyntaxPayloadParser for BufferCompactSyntaxParser<P>where
P: WholeCompactSyntaxPayloadParser,
impl<P> CompactSyntaxPayloadParser for BufferCompactSyntaxParser<P>where
P: WholeCompactSyntaxPayloadParser,
§type Context = <P as WholeCompactSyntaxPayloadParser>::Context
type Context = <P as WholeCompactSyntaxPayloadParser>::Context
The type of the context object passed to all methods
source§fn start_compact_section(
&mut self,
ctx: &mut Self::Context,
header: &SectionCommonHeader,
data: &[u8]
)
fn start_compact_section( &mut self, ctx: &mut Self::Context, header: &SectionCommonHeader, data: &[u8] )
NB the
data
buffer passed to will include the bytes which are represented by header
(in order that the called code can check any CRC that covers the
whole section).source§fn continue_compact_section(&mut self, ctx: &mut Self::Context, data: &[u8])
fn continue_compact_section(&mut self, ctx: &mut Self::Context, data: &[u8])
may be called to pass the implementation additional slices of section data, if the
complete section was not already passed.
Auto Trait Implementations§
impl<P> RefUnwindSafe for BufferCompactSyntaxParser<P>where
P: RefUnwindSafe,
impl<P> Send for BufferCompactSyntaxParser<P>where
P: Send,
impl<P> Sync for BufferCompactSyntaxParser<P>where
P: Sync,
impl<P> Unpin for BufferCompactSyntaxParser<P>where
P: Unpin,
impl<P> UnwindSafe for BufferCompactSyntaxParser<P>where
P: UnwindSafe,
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