RtpTransceiverOptions

Struct RtpTransceiverOptions 

Source
pub struct RtpTransceiverOptions { /* private fields */ }
Expand description

RTP transceiver options.

Implementations§

Source§

impl RtpTransceiverOptions

Source

pub fn new() -> Self

Create new options.

Source

pub fn primary_sender_ssrc(&self) -> u32

Get the primary sender SSRC.

Source

pub fn with_primary_sender_ssrc(self, ssrc: u32) -> Self

Set the primary sender SSRC.

This SSRC will be used as the sender SSRC for RTCP reception reports. The default value is random.

Source

pub fn reordering_buffer_depth(&self) -> usize

Get depth of the reordering buffer for incoming RTP packets.

Source

pub fn with_reordering_buffer_depth(self, depth: usize) -> Self

Set depth of the reordering buffer for incoming RTP packets.

The default value is 64.

Source

pub fn default_clock_rate(&self) -> u32

Get the default clock rate for SSRCs without an explicit clock rate.

Source

pub fn with_default_clock_rate(self, clock_rate: u32) -> Self

Set the default clock rate for SSRCs without an explicit clock rate.

This clock rate will be used when creating sender and receiver reports for SSRCs where the clock rate is not known. The default value is 90000.

Source

pub fn input_ssrc_mode(&self) -> SSRCMode

Get the input SSRC handling mode.

Source

pub fn with_input_ssrc_mode(self, mode: SSRCMode) -> Self

Set the input SSRC handling mode.

The default mode is SSRCMode::Any.

Source

pub fn max_input_ssrcs(&self) -> Option<usize>

Get the maximum number of input SSRCs to track.

Source

pub fn with_max_input_ssrcs(self, max: Option<usize>) -> Self

Set the maximum number of input SSRCs to track.

This option is valid only when input_ssrc_mode is set to SSRCMode::Any. Setting this option to None will allow unlimited number of SSRCs. This should be used with caution as it may lead to excessive memory usage. The default limit is 64 SSRCs.

If there are more SSRCs than the limit, the least recently used SSRCs will be dropped first.

Source

pub fn input_ssrcs(&self) -> &SSRC2ClockRate

Get the input SSRC to clock rate mapping.

Source

pub fn with_input_ssrcs<T>(self, ssrcs: T) -> Self
where T: IntoIterator<Item = (u32, u32)>,

Set the expected input SSRCs along with their clock rates.

The clock rate is used for generating RTCP receiver reports. The method accepts an iterator of (ssrc, clock_rate) tuples.

Note that if the clock rate for a given SSRC is not specified here, the default clock rate will be used instead when generating receiver reports. This may lead to incorrect reports if the actual clock rate differs from the default one.

Source

pub fn output_ssrcs(&self) -> &SSRC2ClockRate

Get the output SSRC to clock rate mapping.

Source

pub fn with_output_ssrcs<T>(self, ssrcs: T) -> Self
where T: IntoIterator<Item = (u32, u32)>,

Set the output SSRCs along with their clock rates.

The clock rate is used for generating RTCP sender reports. The method accepts an iterator of (ssrc, clock_rate) tuples.

Note that if the clock rate for a given SSRC is not specified here, the default clock rate will be used instead when generating sender reports. This may lead to incorrect reports if the actual clock rate differs from the default one.

Source

pub fn max_rtcp_packet_size(&self) -> usize

Get the maximum RTCP packet size.

Source

pub fn with_max_rtcp_packet_size(self, size: usize) -> Self

Set the maximum RTCP packet size.

Limiting the maximum RTCP packet size helps avoid IP packet fragmentation. The default limit is 1200 bytes. This should be safe for UDP transport in IPv4/IPv6 networks with typical MTU sizes in the Internet environment.

Trait Implementations§

Source§

impl Clone for RtpTransceiverOptions

Source§

fn clone(&self) -> RtpTransceiverOptions

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Default for RtpTransceiverOptions

Source§

fn default() -> Self

Returns the “default value” for a type. 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 = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V