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
impl UlpfecReceiveBuilder
Sourcepub fn sessions() -> Self
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.
Sourcepub fn red(red_payload_type: u8, fec_payload_type: u8) -> Self
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.
Sourcepub fn stream() -> Self
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.
Sourcepub fn with_one_level_only(self, one_level_only: bool) -> Self
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).
Sourcepub fn with_repair_forwarding(self, forward_repair: bool) -> Self
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.
Sourcepub fn with_stream_filter(
self,
filter: impl Fn(&StreamInfo) -> bool + Send + Sync + 'static,
) -> Self
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.
Sourcepub fn with_mutable_extensions_zeroed(self, zero: bool) -> Self
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).
Sourcepub fn build(self) -> UlpfecReceiveInterceptor
pub fn build(self) -> UlpfecReceiveInterceptor
Build the interceptor.