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 stretches to what the RTCP bandwidth holds one feedback packet in. On by default.
All RTCP of an endpoint shares 5% of the session bandwidth (RFC 3550 section 6.2,
unless b=RS / b=RR say otherwise), and the RTCP session sends no more than that.
At low media rates a tenth of a second of it does not hold a feedback packet, so
feedback built every 100 ms queues in the session and reaches the sender late or not
at all. With this on, the interval is the configured one where the bandwidth allows
it and longer where it does not, up to half a second (“with low uplink bandwidth
feedback may be sent less often”, section 3 of the draft): one feedback packet for
every RTCP packet the session may send, each covering everything since the last.
false keeps the interval fixed.
The share of the media received that the feedback may take while the interval is
adaptive: the interval is the time in which this share holds one feedback packet (with
its lower layers, and the minimal compound packet around it without reduced-size
RTCP). Default 0.05, RFC 3550 section 6.2’s 5% for all of RTCP. A smaller share leaves
room in the 5% for the regular reports (the Performance behaviour profile: 0.025).
Sourcepub fn with_max_adaptive_interval(self, max_interval: Duration) -> Self
pub fn with_max_adaptive_interval(self, max_interval: Duration) -> Self
The longest the adaptive interval stretches to while media flows. Default 250 ms.
draft-holmer-rmcat-transport-wide-cc-extensions-01 section 3: “in cases of low uplink
bandwidth it is acceptable to send them less frequently, e.g., for instance once per
RTT”; RFC 8888 section 4 leaves the interval to the application (“Applications need to
negotiate an appropriate congestion control feedback interval … based on … the
acceptable feedback overhead”). The Performance behaviour profile takes 500 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.