pub struct JitterBuffer { /* private fields */ }Expand description
Jitter buffer for smoothing network packet delivery timing.
Implementations§
Source§impl JitterBuffer
impl JitterBuffer
pub fn new(delay_ms: u64, max_size: usize) -> Self
pub fn push(&mut self, timestamp_ms: u64, data: Vec<u8>)
pub fn drain_ready(&mut self, current_time_ms: u64) -> Vec<Vec<u8>>
pub fn set_delay(&mut self, delay_ms: u64)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn clear(&mut self)
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