#[non_exhaustive]pub enum VideoFrameStorage {
Cpu {
data: Bytes,
},
Gpu(GpuBufferHandle),
}Expand description
Where pixel data lives.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Cpu
CPU-accessible tightly packed or planar bytes (may imply copy into HW).
Prefer VideoFrameStorage::Gpu on hot encode paths. Using CPU storage
with a HW encoder typically requires upload — backends must document that.
Fields
§
data: BytesPlane bytes (layout implied by PixelFormat).
Gpu(GpuBufferHandle)
GPU texture / surface — Zero-Copy when the backend accepts the variant.
Trait Implementations§
Source§impl Clone for VideoFrameStorage
impl Clone for VideoFrameStorage
Source§fn clone(&self) -> VideoFrameStorage
fn clone(&self) -> VideoFrameStorage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VideoFrameStorage
impl Debug for VideoFrameStorage
impl Eq for VideoFrameStorage
Source§impl PartialEq for VideoFrameStorage
impl PartialEq for VideoFrameStorage
impl StructuralPartialEq for VideoFrameStorage
Auto Trait Implementations§
impl !Freeze for VideoFrameStorage
impl RefUnwindSafe for VideoFrameStorage
impl Send for VideoFrameStorage
impl Sync for VideoFrameStorage
impl Unpin for VideoFrameStorage
impl UnsafeUnpin for VideoFrameStorage
impl UnwindSafe for VideoFrameStorage
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