pub struct FrameQueue { /* private fields */ }Expand description
PTS-ordered staging queue for incoming frames.
Frames are pushed in any order and popped in strictly ascending PTS order. Submitting a frame with a PTS that already exists in the queue is an error.
Implementations§
Source§impl FrameQueue
impl FrameQueue
Sourcepub fn push(&mut self, frame: QueuedFrame) -> CodecResult<()>
pub fn push(&mut self, frame: QueuedFrame) -> CodecResult<()>
Push a frame. Returns an error if a frame with the same PTS is already queued.
Sourcepub fn pop(&mut self) -> Option<QueuedFrame>
pub fn pop(&mut self) -> Option<QueuedFrame>
Pop the frame with the lowest PTS, or None if the queue is empty.
Sourcepub fn drain_ordered(&mut self) -> Vec<QueuedFrame>
pub fn drain_ordered(&mut self) -> Vec<QueuedFrame>
Drain all frames in ascending PTS order.
Trait Implementations§
Source§impl Debug for FrameQueue
impl Debug for FrameQueue
Source§impl Default for FrameQueue
impl Default for FrameQueue
Source§fn default() -> FrameQueue
fn default() -> FrameQueue
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FrameQueue
impl RefUnwindSafe for FrameQueue
impl Send for FrameQueue
impl Sync for FrameQueue
impl Unpin for FrameQueue
impl UnsafeUnpin for FrameQueue
impl UnwindSafe for FrameQueue
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more