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

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.

Implementations

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> RefUnwindSafe for Demultiplex<Ctx> where
    <Ctx as DemuxContext>::F: RefUnwindSafe

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

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

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

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

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.