pub struct UserPtrFrame {
pub buffers: Vec<*mut u8>,
pub mem_layout: Layout,
pub layout: FrameLayout,
}
Expand description
A structure that holds user-allocated memory for a frame as well as its layout.
Fields§
§buffers: Vec<*mut u8>
§mem_layout: Layout
§layout: FrameLayout
Implementations§
Source§impl UserPtrFrame
impl UserPtrFrame
Sourcepub fn new_nv12(size: Resolution) -> Self
pub fn new_nv12(size: Resolution) -> Self
Allocate enough memory to back a NV12 frame of size
dimension.
pub fn alloc(layout: FrameLayout, buffer_size: usize) -> Self
Trait Implementations§
Source§impl Debug for UserPtrFrame
impl Debug for UserPtrFrame
Source§impl Drop for UserPtrFrame
impl Drop for UserPtrFrame
Source§impl ExternalBufferDescriptor for UserPtrFrame
impl ExternalBufferDescriptor for UserPtrFrame
Source§const MEMORY_TYPE: MemoryType = libva::MemoryType::UserPtr
const MEMORY_TYPE: MemoryType = libva::MemoryType::UserPtr
Memory type to set for
VASurfaceAttribMemoryType
.Source§type DescriptorAttribute = _VASurfaceAttribExternalBuffers
type DescriptorAttribute = _VASurfaceAttribExternalBuffers
Type of the descriptor to be set with
VASurfaceAttribExternalBuffers
.Source§fn va_surface_attribute(&mut self) -> Self::DescriptorAttribute
fn va_surface_attribute(&mut self) -> Self::DescriptorAttribute
Returns the
Self::DescriptorAttribute
instance allowing this memory to be imported
into VAAPI.Auto Trait Implementations§
impl Freeze for UserPtrFrame
impl RefUnwindSafe for UserPtrFrame
impl !Send for UserPtrFrame
impl !Sync for UserPtrFrame
impl Unpin for UserPtrFrame
impl UnwindSafe for UserPtrFrame
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