pub struct TwccReceiverBuilder { /* private fields */ }Expand description
Builder for the TwccReceiverInterceptor.
§Example
use rtci_interceptor::{Slot, Registry, TwccReceiverBuilder};
use std::time::Duration;
let chain = Registry::new()
.with(Slot::TwccReceiver, TwccReceiverBuilder::new()
.with_interval(Duration::from_millis(100))
.build())
.build();Implementations§
Source§impl TwccReceiverBuilder
impl TwccReceiverBuilder
Sourcepub fn with_interval(self, interval: Duration) -> Self
pub fn with_interval(self, interval: Duration) -> Self
Set the interval between feedback reports.
Sourcepub fn with_adaptive_interval(self, adaptive_interval: bool) -> Self
pub fn with_adaptive_interval(self, adaptive_interval: bool) -> Self
Whether the interval follows the cadence (Self::with_cadence: by default 50 to
250 ms, sized to 5% of the media received) or stays fixed at Self::with_interval
(false). On by default.
Sourcepub fn with_cadence(self, cadence: CongestionFeedbackCadence) -> Self
pub fn with_cadence(self, cadence: CongestionFeedbackCadence) -> Self
When feedback is built while the interval is not fixed: see
CongestionFeedbackCadence. Default CongestionFeedbackCadence::ReceivedMedia,
the engine’s own form, which no specification has. The drafts’ form is
CongestionFeedbackCadence::PerFrame
(draft-holmer-rmcat-transport-wide-cc-extensions-01 section 3, “It is recommended that
a feedback message is sent for every frame received, but in cases of low uplink
bandwidth it is acceptable to send them less frequently”, with
draft-ietf-rmcat-gcc-02 section 3’s intervals: 30 ms, up to 100 ms): measured worse as
the default, it is the StrictRfc behaviour profile’s.
The share of the rate it is sized to that the feedback may take with
CongestionFeedbackCadence::SendEstimate (of the send estimate) and
CongestionFeedbackCadence::ReceivedMedia (of the media received): the interval is
the time in which this share holds one feedback packet. Default 0.05 (libwebrtc: “Let
TWCC reports occupy 5% of total bandwidth”); the Performance behaviour profile
takes 0.025. CongestionFeedbackCadence::PerFrame does not use it.
Sourcepub fn with_max_adaptive_interval(self, max_interval: Duration) -> Self
pub fn with_max_adaptive_interval(self, max_interval: Duration) -> Self
The longest interval of CongestionFeedbackCadence::SendEstimate and
CongestionFeedbackCadence::ReceivedMedia while media flows. Default 250 ms
(libwebrtc’s kMaxInterval); the Performance behaviour profile takes 500 ms.
CongestionFeedbackCadence::PerFrame has the draft’s own ceiling, 100 ms.
Sourcepub fn with_rereport_received(self, rereport_received: bool) -> Self
pub fn with_rereport_received(self, rereport_received: bool) -> Self
Whether a packet an earlier feedback message reported as received is reported as received again when a late packet moves the base sequence number back over it, as libwebrtc does. Off by default: draft-holmer-rmcat-transport-wide-cc-extensions-01 section 3.1.1 has such packets marked “Packet not received”, with no delta. A libwebrtc sender drops a packet from its history once it is reported received, so it ignores the later “not received” either way.
Sourcepub fn with_feedback_on_extension_alone(self, extension_alone: bool) -> Self
pub fn with_feedback_on_extension_alone(self, extension_alone: bool) -> Self
Whether a remote stream whose packets carry the transport-wide sequence number header
extension is reported on although a=rtcp-fb:<pt> transport-cc was not negotiated for
it. Off by default: the feedback is an RTCP feedback message, sent only where the
session negotiated it (RFC 4585 section 4.2: “MUST NOT” use feedback other than the
listed types), and libwebrtc too reports only when the feedback is negotiated beside
the extension. On is the fork’s earlier behaviour, for a peer that signals the
extension alone.
Sourcepub fn build(self) -> TwccReceiverInterceptor
pub fn build(self) -> TwccReceiverInterceptor
Build the interceptor.