pub struct JitterBuffer<T> { /* private fields */ }Implementations§
Source§impl<T> JitterBuffer<T>
impl<T> JitterBuffer<T>
pub fn new(decoder: Box<dyn Decodable<Frame = T>>) -> Self
Sourcepub fn buffered_frames_len(&self) -> usize
pub fn buffered_frames_len(&self) -> usize
Returns the current number of frames buffered and waiting in the jitter buffer.
Sourcepub fn insert_frame(&mut self, frame: VideoFrame, arrival_time_ms: u128)
pub fn insert_frame(&mut self, frame: VideoFrame, arrival_time_ms: u128)
The main entry point for a new frame arriving from the network.
Sourcepub fn find_and_move_continuous_frames(&mut self, current_time_ms: u128)
pub fn find_and_move_continuous_frames(&mut self, current_time_ms: u128)
Checks the buffered frames and moves any continuous frames to the decodable queue.
Sourcepub fn is_waiting_for_keyframe(&self) -> bool
pub fn is_waiting_for_keyframe(&self) -> bool
Checks if the jitter buffer is currently waiting for a keyframe to continue.
Sourcepub fn drop_all_frames(&mut self)
pub fn drop_all_frames(&mut self)
Removes all frames from the buffer. Used when a keyframe arrives and the buffer is full.
pub fn get_jitter_estimate_ms(&self) -> f64
pub fn get_target_playout_delay_ms(&self) -> f64
pub fn get_dropped_frames_count(&self) -> u64
Auto Trait Implementations§
impl<T> Freeze for JitterBuffer<T>
impl<T> !RefUnwindSafe for JitterBuffer<T>
impl<T> Send for JitterBuffer<T>
impl<T> Sync for JitterBuffer<T>
impl<T> Unpin for JitterBuffer<T>
impl<T> UnsafeUnpin for JitterBuffer<T>
impl<T> !UnwindSafe for JitterBuffer<T>
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