pub struct FramePool(/* private fields */);Expand description
Picture buffers handed back to be filled again: the big byte buffers a hardware decoder copies each picture into.
A fresh 50 MB buffer for every 8K picture costs more than the copy into it: the system hands over new pages that are faulted in and zeroed on first touch (measured on Linux, about 10 ms a picture against 2 ms for the copy). A decoder that takes its buffers from here, and a player that gives each picture’s buffers back once it is off the screen, reuse a few buffers for the whole film. Cheap to clone; every clone is the same pool. It keeps at most a handful of buffers; the rest are freed.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Forget for FramePool
impl Freeze for FramePool
impl RefUnwindSafe for FramePool
impl Send for FramePool
impl Sync for FramePool
impl Unpin for FramePool
impl UnsafeUnpin for FramePool
impl UnwindSafe for FramePool
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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