pub struct JitterBuffer { /* private fields */ }Expand description
Bounded reorder buffer over RTP sequence numbers (see JITTER_DEPTH).
Implementations§
Source§impl JitterBuffer
impl JitterBuffer
Sourcepub fn new() -> Self
pub fn new() -> Self
A jitter buffer with the default JITTER_DEPTH.
Sourcepub fn with_depth(depth: usize) -> Self
pub fn with_depth(depth: usize) -> Self
A jitter buffer with an explicit reorder depth (>= 1).
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Clear all buffered packets and playout state. Used when the RTP SSRC
changes mid-call — the new stream’s sequence numbers are unrelated to the
old one, so without a reset the new (low) seqs would be dropped as “late”
against the stale last_released, causing an audible dropout. Call
drain first if the old stream’s trailing audio must be kept.
Trait Implementations§
Source§impl Debug for JitterBuffer
impl Debug for JitterBuffer
Auto Trait Implementations§
impl Freeze for JitterBuffer
impl RefUnwindSafe for JitterBuffer
impl Send for JitterBuffer
impl Sync for JitterBuffer
impl Unpin for JitterBuffer
impl UnsafeUnpin for JitterBuffer
impl UnwindSafe for JitterBuffer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more