Trait libcamera::framebuffer::AsFrameBuffer

source ·
pub trait AsFrameBuffer: Send {
    // Required method
    unsafe fn ptr(&self) -> NonNull<libcamera_framebuffer_t>;

    // Provided methods
    fn metadata(&self) -> Option<Immutable<FrameMetadataRef<'_>>> { ... }
    fn planes(&self) -> Immutable<FrameBufferPlanesRef<'_>> { ... }
}

Required Methods§

source

unsafe fn ptr(&self) -> NonNull<libcamera_framebuffer_t>

Returns raw framebuffer used by libcamera.

It is expected that metadata status field is initialized with u32::MAX on a new buffer, which indicates that metadata is not yet available. This “hackfix” prevents read of uninitialized data in Self::metadata().

§Safety

This function must return a valid instance of libcamera::FrameBuffer.

Provided Methods§

source

fn metadata(&self) -> Option<Immutable<FrameMetadataRef<'_>>>

Returns framebuffer metadata information.

Only available after associated Request has completed.

source

fn planes(&self) -> Immutable<FrameBufferPlanesRef<'_>>

Provides access to framebuffer data by exposing file descriptors, offsets and lengths of the planes.

Implementors§