Trait mpeg2ts_reader::pes::ElementaryStreamConsumer[][src]

pub trait ElementaryStreamConsumer<Ctx> {
    fn start_stream(&mut self, ctx: &mut Ctx);
fn begin_packet(&mut self, ctx: &mut Ctx, header: PesHeader<'_>);
fn continue_packet(&mut self, ctx: &mut Ctx, data: &[u8]);
fn end_packet(&mut self, ctx: &mut Ctx);
fn continuity_error(&mut self, ctx: &mut Ctx); }

Trait for types that will receive call-backs as pieces of a specific elementary stream are encounted within a transport stream.

Instances of this type are registered with a PesPacketConsumer, which itself is responsible for extracting elementary stream data from transport stream packets.

Required methods

fn start_stream(&mut self, ctx: &mut Ctx)[src]

called before the first call to begin_packet()

fn begin_packet(&mut self, ctx: &mut Ctx, header: PesHeader<'_>)[src]

called with the header at the start of the PES packet, which may not contain the complete PES payload

fn continue_packet(&mut self, ctx: &mut Ctx, data: &[u8])[src]

called after an earlier call to begin_packet() when another part of the packet’s payload data is found in the Transport Stream.

fn end_packet(&mut self, ctx: &mut Ctx)[src]

called when a PES packet ends, prior to the next call to begin_packet() (if any).

fn continuity_error(&mut self, ctx: &mut Ctx)[src]

called when gap is seen in continuity counter values for this stream, indicating that some data in the original Transport Stream did not reach the parser.

Loading content...

Implementors

Loading content...