Struct cros_codecs::utils::UserPtrSurface
source · pub struct UserPtrSurface {
pub buffers: Vec<*mut u8>,
pub mem_layout: Layout,
pub layout: SurfaceLayout,
}
Expand description
A structure that holds user-allocated memory for a surface as well as its layout.
Fields§
§buffers: Vec<*mut u8>
§mem_layout: Layout
§layout: SurfaceLayout
Implementations§
source§impl UserPtrSurface
impl UserPtrSurface
sourcepub fn new_nv12(size: Resolution) -> Self
pub fn new_nv12(size: Resolution) -> Self
Allocate enough memory to back a NV12 surface of size
dimension.
Trait Implementations§
source§impl Debug for UserPtrSurface
impl Debug for UserPtrSurface
source§impl Drop for UserPtrSurface
impl Drop for UserPtrSurface
source§impl ExternalBufferDescriptor for UserPtrSurface
impl ExternalBufferDescriptor for UserPtrSurface
source§const MEMORY_TYPE: MemoryType = libva::MemoryType::UserPtr
const MEMORY_TYPE: MemoryType = libva::MemoryType::UserPtr
Memory type to set for
VASurfaceAttribMemoryType
.§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 RefUnwindSafe for UserPtrSurface
impl !Send for UserPtrSurface
impl !Sync for UserPtrSurface
impl Unpin for UserPtrSurface
impl UnwindSafe for UserPtrSurface
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