Trait mpeg2ts_reader::psi::SectionProcessor
source · 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);
}
Expand description
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
SectionSyntaxSectionProcessor
implementation 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
)
Required Associated Types
Required Methods
sourcefn start_section<'a>(
&mut self,
ctx: &mut Self::Context,
header: &SectionCommonHeader,
section_data: &'a [u8]
)
fn start_section<'a>(
&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.