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 sessions() -> Self

FEC in RTP sessions of their own (RFC 5109 section 14.1), told packet by packet (FecSessionPacket): every bound stream that passes the filter has a decoder from the start, fed with its media, so that the FEC of a session whose protected stream is only known once packets arrive finds it. A stream bound with a repair flow of the media’s own session (StreamInfo::ssrc_fec) is read as stream reads it.

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 and the receiver that puts frames together see its sequence number (the default), or swallowed here: its sequence number is then a missing packet to them.

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 with_mutable_extensions_zeroed(self, zero: bool) -> Self

Recover with the values of the transport-wide sequence number, abs-send-time and toffset extensions zeroed in this receiver’s copy of each media packet, as libwebrtc’s receiver does (UlpfecReceiver::ProcessReceivedFec, RtpPacket::ZeroMutableExtensions at a222406d): its sender protects them as zeros, since it writes them after its FEC was computed (see UlpfecSendBuilder::with_mutable_extensions_zeroed). A packet rebuilt from such FEC then has every octet as sent and those values zero, instead of XOR noise there. false by default (RFC 5109 section 8: the FEC covers the packet as sent).

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.