Skip to main content

UlpfecReceiveBuilder

Struct UlpfecReceiveBuilder 

Source
pub struct UlpfecReceiveBuilder { /* private fields */ }
Expand description

Builder for UlpfecReceiveInterceptor.

§Example

use rtci_interceptor::{Registry, Slot, UlpfecReceiveBuilder};

// `a=rtpmap:116 red/90000`, `a=rtpmap:117 ulpfec/90000`
let chain = Registry::new()
    .with(Slot::FecDecoder, UlpfecReceiveBuilder::red(116, 117).build())
    .build();

Implementations§

Source§

impl UlpfecReceiveBuilder

Source

pub fn red(red_payload_type: u8, fec_payload_type: u8) -> Self

FEC as a redundant encoding (RFC 5109 14.2): the protected streams arrive as RED packets of red_payload_type, with FEC blocks of fec_payload_type.

Source

pub fn stream() -> Self

FEC as a stream of its own (RFC 5109 14.1), on the repair SSRC of StreamInfo::ssrc_fec. A stream without a repair SSRC and payload type is not bound.

Source

pub fn with_one_level_only(self, one_level_only: bool) -> Self

Refuse FEC with more than one protection level: this endpoint signalled onelevelonly=1 (RFC 5109 13, 14.3: for a receiver the parameter says what it accepts).

Source

pub fn with_repair_forwarding(self, forward_repair: bool) -> Self

Whether a RED packet that held only FEC is passed on, emptied and marked UlpfecRepair, so the interceptors behind this one see its sequence number (the default), or swallowed here.

Source

pub fn with_stream_filter( self, filter: impl Fn(&StreamInfo) -> bool + Send + Sync + 'static, ) -> Self

Which bound remote streams are protected. The default is every video/ stream.

Source

pub fn build(self) -> UlpfecReceiveInterceptor

Build the interceptor.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.