pub struct PtsFrameQueue { /* private fields */ }Expand description
Bounded presentation-timestamp-ordered decoded frame queue supporting B-frame reordering and generation-tagged seek draining.
Implementations§
Source§impl PtsFrameQueue
Bounded PTS-ordered insertion, seek-generation draining, and due-frame retrieval for PtsFrameQueue.
impl PtsFrameQueue
Bounded PTS-ordered insertion, seek-generation draining, and due-frame retrieval for PtsFrameQueue.
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Sourcepub fn push_ordered(
&mut self,
frame: DecodedVideoFrame,
) -> Option<DecodedVideoFrame>
pub fn push_ordered( &mut self, frame: DecodedVideoFrame, ) -> Option<DecodedVideoFrame>
Inserts frame in ascending pts_us order (reordering B-frames automatically), returning Some(frame) if the bounded queue is full.
§Arguments
&Self- Mutable PTS queue.DecodedVideoFrame- Frame to insert.
§Returns
Option<DecodedVideoFrame>-Nonewhen inserted, orSome(frame)when queue is at bounded capacity.
Sourcepub fn peek_front_pts_us(&self) -> Option<i64>
pub fn peek_front_pts_us(&self) -> Option<i64>
Sourcepub fn has_stale_generation(&self, active_generation: u64) -> bool
pub fn has_stale_generation(&self, active_generation: u64) -> bool
Sourcepub fn drain_stale_generations(
&mut self,
active_generation: u64,
pool: &VideoFramePool,
) -> usize
pub fn drain_stale_generations( &mut self, active_generation: u64, pool: &VideoFramePool, ) -> usize
Sourcepub fn clear_and_recycle(&mut self, pool: &VideoFramePool)
pub fn clear_and_recycle(&mut self, pool: &VideoFramePool)
Drains all queued frames and recycles any CPU-pooled buffers back into pool while preserving queue capacity.
§Arguments
&Self- Mutable PTS queue.&VideoFramePool- Pool receiving recycled CPU buffers.
Source§impl PtsFrameQueue
impl PtsFrameQueue
pub fn get_capacity(&self) -> usize
pub fn get_mut_capacity(&mut self) -> &mut usize
pub fn set_capacity(&mut self, val: usize) -> &mut Self
pub fn get_frames(&self) -> &VecDeque<DecodedVideoFrame>
pub fn get_mut_frames(&mut self) -> &mut VecDeque<DecodedVideoFrame>
pub fn set_frames(&mut self, val: VecDeque<DecodedVideoFrame>) -> &mut Self
pub fn get_stale_generation_drops(&self) -> u64
pub fn get_mut_stale_generation_drops(&mut self) -> &mut u64
pub fn set_stale_generation_drops(&mut self, val: u64) -> &mut Self
Trait Implementations§
Source§impl Clone for PtsFrameQueue
impl Clone for PtsFrameQueue
Source§impl Debug for PtsFrameQueue
impl Debug for PtsFrameQueue
Auto Trait Implementations§
impl Forget for PtsFrameQueue
impl Freeze for PtsFrameQueue
impl Move for PtsFrameQueue
impl RefUnwindSafe for PtsFrameQueue
impl Send for PtsFrameQueuewhere
RawVecInner: Send,
impl Sync for PtsFrameQueuewhere
RawVecInner: Sync,
impl Unpin for PtsFrameQueue
impl UnsafeUnpin for PtsFrameQueue
impl UnwindSafe for PtsFrameQueuewhere
RawVecInner: UnwindSafe,
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