Trait mpeg2ts_reader::psi::SectionProcessor [−][src]
pub trait SectionProcessor {
type Context;
fn start_section<'a>(
&mut self,
ctx: &mut Self::Context,
header: &SectionCommonHeader,
section_data: &'a [u8]
);
fn continue_section<'a>(
&mut self,
ctx: &mut Self::Context,
section_data: &'a [u8]
);
fn reset(&mut self);
}Trait for types which process the data within a PSI section following the 12-byte
section_length field (which is one of the items available in the SectionCommonHeader that
is passed in.
- For PSI tables that use 'section syntax', the existing
SectionSyntaxSectionProcessorimplementation of this trait can be used. - This trait should be implemented directly for PSI tables that use 'compact' syntax (i.e.
they lack the 5-bytes-worth of fields represented by
TableSyntaxHeader)
Associated Types
type Context
Required Methods
fn start_section<'a>(
&mut self,
ctx: &mut Self::Context,
header: &SectionCommonHeader,
section_data: &'a [u8]
)
&mut self,
ctx: &mut Self::Context,
header: &SectionCommonHeader,
section_data: &'a [u8]
)
Note that the first 3 bytes of section_data contain the header fields that have also
been supplied to this call in the header parameter. This is to allow implementers to
calculate a CRC over the whole section if required.
fn continue_section<'a>(
&mut self,
ctx: &mut Self::Context,
section_data: &'a [u8]
)
&mut self,
ctx: &mut Self::Context,
section_data: &'a [u8]
)
fn reset(&mut self)
Implementors
impl<SP> SectionProcessor for SectionSyntaxSectionProcessor<SP> where
SP: SectionSyntaxPayloadParser, type Context = SP::Context;