pub struct JitterBufferDiscards { /* private fields */ }Expand description
The packets each remote stream’s jitter buffer discarded, shared by a jitter buffer and the
XR generator: give the same handle to JitterBufferBuilder::with_discard_count (or
AdaptiveJitterBufferBuilder::with_discard_count) and to
XrReportBuilder::with_jitter_buffer_discards, and the VoIP Metrics block’s discard rate
is the buffer’s (RFC 3611 section 4.7.1). Without it the generator reports 0, which is
true only when nothing in the chain discards.
Counted per SSRC since the stream was bound: packets that arrived after their turn to be played out had passed, that a full buffer dropped, and that a stream restart (a timestamp discontinuity) dropped unplayed. A second copy of a packet, held or already played out, is not counted (“excluding duplicate packet discards”).
use rtci_interceptor::{
JitterBufferBuilder, JitterBufferDiscards, Registry, Slot, XrReportBuilder,
};
let discards = JitterBufferDiscards::new();
let chain = Registry::new()
.with(
Slot::ExtendedReports,
XrReportBuilder::new().with_jitter_buffer_discards(&discards).build(),
)
.with(
Slot::JitterBuffer,
JitterBufferBuilder::new().with_discard_count(&discards).build(),
)
.build();
assert_eq!(0, discards.discarded(0x1234));