Skip to main content

CongestionControlHandle

Struct CongestionControlHandle 

Source
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> and b=TIAS:<bit/s> of the remote description (RFC 8866 section 5.8, RFC 3890): set_session_bitrate_limit. b=AS counts IP and UDP headers, b=TIAS does 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

Source

pub fn target_bitrate(&self) -> f64

The current target, in bits per second.

Source

pub fn stats(&self) -> EstimatorStats

What the estimator says about itself.

Source

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.

Source

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.

Source

pub fn notify_path_change(&self)

The network path changed: the estimator starts over from its current target.

Source

pub fn remb_limit(&self) -> Option<f64>

The limit the receiver’s last REMB set, while it is in force.

Source

pub fn tmmbr_limit(&self) -> Option<f64>

The limit the TMMBR bounding set puts on this sender, while there is one.

Trait Implementations§

Source§

impl Clone for CongestionControlHandle

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.