Struct smpte2022_1_fec::Decoder[][src]

pub struct Decoder<BP: BufferPool, Recv: Receiver<BP::P>> { /* fields omitted */ }

Decoder state-machine for SMPTE 2022-1 FEC.

The decoder instance owns the storage for all RTP packets being processed. An application receiving data from the network will borrow buffers from the decoder and arrange for UDP packet payloads to be written into these.

Note that this does not try to solve the following problems,

  • Reordering
    • Out-of-order packets on the main stream are passed on to the application still out-of-order
    • Recovery of lost packets may occur after packets with later sequence numbers have already been passed to the application
  • Pacing
    • Packets are passed to the application as soon as possible, without regard for the timestamps on the packets

Planned changes

This design will change in future as required to support things like AF_XDP, and the caller will be able to plug in their own allocation strategy. In this future design, the decoder will just hold on to references to packets

Implementations

impl<BP: BufferPool, Recv: Receiver<BP::P>> Decoder<BP, Recv>[src]

pub fn new(buffer_pool: BP, receiver: Recv) -> Decoder<BP, Recv>[src]

pub fn add_main_packets<T: Iterator<Item = BP::P>>(
    &mut self,
    pk: T
) -> Result<(), FecDecodeError>
[src]

pub fn add_row_packets<T: Iterator<Item = BP::P>>(
    &mut self,
    packets: T
) -> Result<(), FecDecodeError>
[src]

pub fn add_column_packets<T: Iterator<Item = BP::P>>(
    &mut self,
    pk: T
) -> Result<(), FecDecodeError>
[src]

Auto Trait Implementations

impl<BP, Recv> RefUnwindSafe for Decoder<BP, Recv> where
    BP: RefUnwindSafe,
    Recv: RefUnwindSafe,
    <BP as BufferPool>::P: RefUnwindSafe

impl<BP, Recv> Send for Decoder<BP, Recv> where
    BP: Send,
    Recv: Send,
    <BP as BufferPool>::P: Send

impl<BP, Recv> Sync for Decoder<BP, Recv> where
    BP: Sync,
    Recv: Sync,
    <BP as BufferPool>::P: Sync

impl<BP, Recv> Unpin for Decoder<BP, Recv> where
    BP: Unpin,
    Recv: Unpin,
    <BP as BufferPool>::P: Unpin

impl<BP, Recv> UnwindSafe for Decoder<BP, Recv> where
    BP: UnwindSafe,
    Recv: UnwindSafe,
    <BP as BufferPool>::P: 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.