pub struct MemoryMappedFrameBuffer<T: AsFrameBuffer> { /* private fields */ }
Expand description
FrameBuffer wrapper, which exposes internal file descriptors as memory mapped [&u8] plane slices.
Implementations§
source§impl<T: AsFrameBuffer> MemoryMappedFrameBuffer<T>
impl<T: AsFrameBuffer> MemoryMappedFrameBuffer<T>
sourcepub fn new(fb: T) -> Result<Self, MemoryMappedFrameBufferError>
pub fn new(fb: T) -> Result<Self, MemoryMappedFrameBufferError>
Memory map framebuffer, which implements AsFrameBuffer.
This might fail if framebuffer has invalid plane sizes/offsets or if [libc::mmap] fails itself.
Trait Implementations§
source§impl<T: AsFrameBuffer> AsFrameBuffer for MemoryMappedFrameBuffer<T>
impl<T: AsFrameBuffer> AsFrameBuffer for MemoryMappedFrameBuffer<T>
source§unsafe fn ptr(&self) -> NonNull<libcamera_framebuffer_t>
unsafe fn ptr(&self) -> NonNull<libcamera_framebuffer_t>
Returns raw framebuffer used by libcamera. Read more
source§fn metadata(&self) -> Option<Immutable<FrameMetadataRef<'_>>>
fn metadata(&self) -> Option<Immutable<FrameMetadataRef<'_>>>
Returns framebuffer metadata information. Read more
source§fn planes(&self) -> Immutable<FrameBufferPlanesRef<'_>>
fn planes(&self) -> Immutable<FrameBufferPlanesRef<'_>>
Provides access to framebuffer data by exposing file descriptors, offsets and lengths of the planes.
source§impl<T: AsFrameBuffer> Drop for MemoryMappedFrameBuffer<T>
impl<T: AsFrameBuffer> Drop for MemoryMappedFrameBuffer<T>
impl<T: AsFrameBuffer> Send for MemoryMappedFrameBuffer<T>
Auto Trait Implementations§
impl<T> Freeze for MemoryMappedFrameBuffer<T>where
T: Freeze,
impl<T> RefUnwindSafe for MemoryMappedFrameBuffer<T>where
T: RefUnwindSafe,
impl<T> !Sync for MemoryMappedFrameBuffer<T>
impl<T> Unpin for MemoryMappedFrameBuffer<T>where
T: Unpin,
impl<T> UnwindSafe for MemoryMappedFrameBuffer<T>where
T: UnwindSafe,
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