pub struct LentBuffer { /* private fields */ }Expand description
A buffer of an encoder’s input pool lent for one frame. Dropping it unsubmitted gives it and its place among the encoder’s frames in flight back.
Implementations§
Source§impl LentBuffer
impl LentBuffer
Sourcepub fn new(
surface: *mut c_void,
generation: u64,
most_out: usize,
owner: Box<dyn Any + Send>,
) -> Self
pub fn new( surface: *mut c_void, generation: u64, most_out: usize, owner: Box<dyn Any + Send>, ) -> Self
A lent surface (the platform’s buffer, such as a CVPixelBufferRef) of pool
generation, out of at most most_out the encoder has out at once; owner holds the
buffer and is the lender’s to take back.
Sourcepub const fn generation(&self) -> u64
pub const fn generation(&self) -> u64
The pool it came from: a replaced encoder session has a new pool and a new generation.
Sourcepub const fn most_out(&self) -> usize
pub const fn most_out(&self) -> usize
The most buffers the encoder has out at once, lent or encoding.
Sourcepub fn into_owner(self) -> Box<dyn Any + Send>
pub fn into_owner(self) -> Box<dyn Any + Send>
What holds the buffer, for the lender that made it.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for LentBuffer
impl !Sync for LentBuffer
impl !UnwindSafe for LentBuffer
impl Forget for LentBuffer
impl Freeze for LentBuffer
impl Move for LentBuffer
impl Send for LentBuffer
impl Unpin for LentBuffer
impl UnsafeUnpin for LentBuffer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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