pub struct RedAudioBuilder { /* private fields */ }Expand description
Builder for RedAudioInterceptor.
Implementations§
Source§impl RedAudioBuilder
impl RedAudioBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
One earlier primary per packet, payloads of at most
RED_AUDIO_DEFAULT_MAX_PAYLOAD_SIZE octets, sent in RED when the remote side prefers
it (AudioRedundancy::WhenPreferred).
Sourcepub fn with_audio_redundancy(self, audio_redundancy: AudioRedundancy) -> Self
pub fn with_audio_redundancy(self, audio_redundancy: AudioRedundancy) -> Self
When a local stream that negotiated RED is sent in RED; see AudioRedundancy.
Sourcepub fn with_redundancy(self, redundancy: usize) -> Self
pub fn with_redundancy(self, redundancy: usize) -> Self
How many earlier primaries each RED packet carries (0 sends RED packets with the primary alone).
Sourcepub fn with_max_payload_size(self, max_payload_size: usize) -> Self
pub fn with_max_payload_size(self, max_payload_size: usize) -> Self
The largest RED payload built; redundant blocks that would exceed it are left out.
Sourcepub fn with_redundancy_on_loss(self, redundancy_on_loss: bool) -> Self
pub fn with_redundancy_on_loss(self, redundancy_on_loss: bool) -> Self
Under AudioRedundancy::WhenPreferred, also send a stream that negotiated RED, and
whose remote side did not prefer it, in RED while the loss its receiver reports is at
least RED_AUDIO_LOSS_ON (smoothed), back to the primary under half of it (RFC 8854
sections 5, 7 and 8). Off by default: see the module documentation.
Sourcepub fn build(self) -> RedAudioInterceptor
pub fn build(self) -> RedAudioInterceptor
The interceptor.