pub struct XrReportBuilder { /* private fields */ }Expand description
Builder for XrReportInterceptor.
use rtci_interceptor::{Registry, Slot, XrReportBuilder};
let chain = Registry::new()
.with(Slot::ExtendedReports, XrReportBuilder::new().build())
.build();Implementations§
Source§impl XrReportBuilder
impl XrReportBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
A builder with the defaults: one report a second, blocks as negotiated, Gmin 16.
Sourcepub fn with_interval(self, interval: Duration) -> Self
pub fn with_interval(self, interval: Duration) -> Self
How often the blocks are written.
Sourcepub fn with_formats<S: Into<String>>(
self,
formats: impl IntoIterator<Item = S>,
) -> Self
pub fn with_formats<S: Into<String>>( self, formats: impl IntoIterator<Item = S>, ) -> Self
Send these xr-formats for every remote stream, whatever was negotiated (RFC 3611
section 5.1 allows blocks agreed on outside the signalling).
Sourcepub fn with_gmin(self, gmin: u8) -> Self
pub fn with_gmin(self, gmin: u8) -> Self
The Gmin of the burst model (RFC 3611 section 4.7.2). 0 is taken as the default 16 (section 4.7.6: “Gmin MUST NOT be zero”).
Sourcepub fn with_jitter_buffer(self, jitter_buffer: JitterBufferMetrics) -> Self
pub fn with_jitter_buffer(self, jitter_buffer: JitterBufferMetrics) -> Self
The application’s jitter buffer, reported in the VoIP Metrics block.
Sourcepub fn with_sender_ssrc(self, ssrc: u32) -> Self
pub fn with_sender_ssrc(self, ssrc: u32) -> Self
The SSRC the reports are sent from. Left unset: the first local stream’s, or a random one while there is none.
Sourcepub fn with_max_block_size(self, octets: usize) -> Self
pub fn with_max_block_size(self, octets: usize) -> Self
The largest size, in octets, of a Loss RLE, Duplicate RLE or Packet Receipt Times
block (RFC 3611 section 7); a smaller size a stream’s xr-format gives wins. Thinning
(section 4.1) brings a block under it. DEFAULT_MAX_BLOCK_SIZE unless set; at least
the 16 octets of a block with one entry.
Sourcepub fn with_jitter_buffer_discards(
self,
discards: &JitterBufferDiscards,
) -> Self
pub fn with_jitter_buffer_discards( self, discards: &JitterBufferDiscards, ) -> Self
The discards of the jitter buffer the streams are played out of, for the VoIP Metrics
block’s discard rate (RFC 3611 section 4.7.1): the same handle given to the engine’s
jitter buffer (JitterBufferBuilder::with_discard_count,
AdaptiveJitterBufferBuilder::with_discard_count).
Without one the discard rate is 0: nothing in the chain discards.
Sourcepub fn build(self) -> XrReportInterceptor
pub fn build(self) -> XrReportInterceptor
Build the interceptor.
Sourcepub fn build_with_handle(self, handle: &XrReportHandle) -> XrReportInterceptor
pub fn build_with_handle(self, handle: &XrReportHandle) -> XrReportInterceptor
Build the interceptor, taking what the application gives through handle (the call
quality figures, RFC 3611 section 4.7.5).