pub struct CongestionControlHandle { /* private fields */ }Expand description
The application’s end of the congestion controller: the estimate, pulled when the encoder wants it, and the limits only the application knows.
§Inputs from signalling
The engine’s SDP layer does not feed these yet; an application that negotiates them passes them on:
b=AS:<kbit/s>andb=TIAS:<bit/s>of the remote description (RFC 8866 section 5.8, RFC 3890):set_session_bitrate_limit.b=AScounts IP and UDP headers,b=TIASdoes not; the caller converts.- a selected candidate pair change:
notify_path_change. The engine’s peer connection tells the interceptor of its own pair changes (PathChanged); this is for a change it cannot see.
TMMBR and REMB arrive as RTCP and are read by the interceptor itself.
Implementations§
Source§impl CongestionControlHandle
impl CongestionControlHandle
Sourcepub fn target_bitrate(&self) -> f64
pub fn target_bitrate(&self) -> f64
The current target, in bits per second.
Sourcepub fn stats(&self) -> EstimatorStats
pub fn stats(&self) -> EstimatorStats
What the estimator says about itself.
Sourcepub fn set_session_bitrate_limit(&self, bits_per_second: Option<f64>)
pub fn set_session_bitrate_limit(&self, bits_per_second: Option<f64>)
The bit rate the remote description allows this endpoint to send (b=AS, b=TIAS), in
bits per second of RTP; None when it names none.
Sourcepub fn set_min_bitrate(&self, bits_per_second: Option<f64>)
pub fn set_min_bitrate(&self, bits_per_second: Option<f64>)
A floor for the target, in bits per second; None leaves the estimator’s own.
Sourcepub fn notify_path_change(&self)
pub fn notify_path_change(&self)
The network path changed: the estimator starts over from its current target.
Sourcepub fn remb_limit(&self) -> Option<f64>
pub fn remb_limit(&self) -> Option<f64>
The limit the receiver’s last REMB set, while it is in force.
Sourcepub fn tmmbr_limit(&self) -> Option<f64>
pub fn tmmbr_limit(&self) -> Option<f64>
The limit the TMMBR bounding set puts on this sender, while there is one.