[][src]Struct mpeg2ts_reader::demultiplex::Demultiplex

pub struct Demultiplex<Ctx: DemuxContext> { /* fields omitted */ }

Transport Stream demultiplexer.

Uses the DemuxContext passed to new() to create Filters for processing the payloads of each packet discovered in the TransportStream.

Incremental parsing

Successive sections of transport stream data can be passed in order to push(), and the demultiplexing process will resume at the start of one buffer where it left off at the end of the last. This supports for example the processing of sections of TS data as they are received from the network, without needing to copy them out of the source network buffer.

Methods

impl<Ctx: DemuxContext> Demultiplex<Ctx>[src]

pub fn new(ctx: &mut Ctx) -> Demultiplex<Ctx>[src]

Create a Dumultiplex instance, and populate it with an initial PacketFilter for handling PAT packets (which is created by the given DemuxContext object). The returned value does not retain any reference to the given DemuxContext reference.

pub fn push(&mut self, ctx: &mut Ctx, buf: &[u8])[src]

Parse the Transport Stream packets in the given buffer, using functions from the given DemuxContent object

Auto Trait Implementations

impl<Ctx> Send for Demultiplex<Ctx> where
    <Ctx as DemuxContext>::F: Send

impl<Ctx> Sync for Demultiplex<Ctx> where
    <Ctx as DemuxContext>::F: Sync

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.