pub struct RtpTransceiverOptions { /* private fields */ }Expand description
RTP transceiver options.
Implementations§
Source§impl RtpTransceiverOptions
impl RtpTransceiverOptions
Sourcepub fn primary_sender_ssrc(&self) -> u32
pub fn primary_sender_ssrc(&self) -> u32
Get the primary sender SSRC.
Sourcepub fn with_primary_sender_ssrc(self, ssrc: u32) -> Self
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.
Sourcepub fn reordering_buffer_depth(&self) -> usize
pub fn reordering_buffer_depth(&self) -> usize
Get depth of the reordering buffer for incoming RTP packets.
Sourcepub fn with_reordering_buffer_depth(self, depth: usize) -> Self
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.
Sourcepub fn default_clock_rate(&self) -> u32
pub fn default_clock_rate(&self) -> u32
Get the default clock rate for SSRCs without an explicit clock rate.
Sourcepub fn with_default_clock_rate(self, clock_rate: u32) -> Self
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.
Sourcepub fn input_ssrc_mode(&self) -> SSRCMode
pub fn input_ssrc_mode(&self) -> SSRCMode
Get the input SSRC handling mode.
Sourcepub fn with_input_ssrc_mode(self, mode: SSRCMode) -> Self
pub fn with_input_ssrc_mode(self, mode: SSRCMode) -> Self
Set the input SSRC handling mode.
The default mode is SSRCMode::Any.
Sourcepub fn max_input_ssrcs(&self) -> Option<usize>
pub fn max_input_ssrcs(&self) -> Option<usize>
Get the maximum number of input SSRCs to track.
Sourcepub fn with_max_input_ssrcs(self, max: Option<usize>) -> Self
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.
Sourcepub fn input_ssrcs(&self) -> &SSRC2ClockRate
pub fn input_ssrcs(&self) -> &SSRC2ClockRate
Get the input SSRC to clock rate mapping.
Sourcepub fn with_input_ssrcs<T>(self, ssrcs: T) -> Self
pub fn with_input_ssrcs<T>(self, ssrcs: T) -> Self
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.
Sourcepub fn output_ssrcs(&self) -> &SSRC2ClockRate
pub fn output_ssrcs(&self) -> &SSRC2ClockRate
Get the output SSRC to clock rate mapping.
Sourcepub fn with_output_ssrcs<T>(self, ssrcs: T) -> Self
pub fn with_output_ssrcs<T>(self, ssrcs: T) -> Self
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.
Sourcepub fn max_rtcp_packet_size(&self) -> usize
pub fn max_rtcp_packet_size(&self) -> usize
Get the maximum RTCP packet size.
Sourcepub fn with_max_rtcp_packet_size(self, size: usize) -> Self
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
impl Clone for RtpTransceiverOptions
Source§fn clone(&self) -> RtpTransceiverOptions
fn clone(&self) -> RtpTransceiverOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more