libcamera  v0.0.0
Supporting cameras in Linux since 2019
Public Attributes | List of all members
libcamera::FrameBuffer::Plane Struct Reference

A memory region to store a single plane of a frame. More...

Public Attributes

FileDescriptor fd
 The dmabuf file descriptor.
 
unsigned int length
 The plane length in bytes.
 

Detailed Description

A memory region to store a single plane of a frame.

Planar pixel formats use multiple memory regions to store the different colour components of a frame. The Plane structure describes such a memory region by a dmabuf file descriptor and a length. A FrameBuffer then contains one or multiple planes, depending on the pixel format of the frames it is meant to store.

To support DMA access, planes are associated with dmabuf objects represented by FileDescriptor handles. The Plane class doesn't handle mapping of the memory to the CPU, but applications and IPAs may use the dmabuf file descriptors to map the plane memory with mmap() and access its contents.

Todo:
Once we have a Kernel API which can express offsets within a plane this structure shall be extended to contain this information. See commit 83148ce8be55e for initial documentation of this feature.

The documentation for this struct was generated from the following files: