|
Ream v0.1.0-1
C++ graphics library for Linux
|
Description of a DMA-BUF backed buffer. More...
#include <RDMABufferInfo.h>
Public Member Functions | |
| bool | isValid () const noexcept |
| Validates the buffer description. | |
| std::optional< RDMABufferInfo > | dup () const noexcept |
| Creates a copy of this DMA info, duplicating all file descriptors. | |
| void | closeFds () noexcept |
| Closes all plane file descriptors. | |
Public Attributes | |
| Int32 | height |
| Buffer dimensions in pixels. | |
| RFormat | format |
| DRM FourCC pixel format. | |
| RModifier | modifier |
| DRM format modifier describing the memory layout. | |
| int | planeCount |
| Number of valid planes (1 to 4). | |
| UInt32 | offset [4] {} |
| Byte offset of each plane within its file descriptor. | |
| UInt32 | stride [4] {} |
| Byte stride (pitch) of each plane. | |
| int | fd [4] { -1, -1, -1, -1 } |
| File descriptor backing each plane (-1 if unused). | |
Description of a DMA-BUF backed buffer.
Holds the dimensions, DRM format/modifier and per-plane file descriptors, offsets and strides needed to import or share a buffer across APIs (e.g. GBM, EGL, DRM KMS). Supports up to 4 planes.
|
inlinenoexcept |
Validates the buffer description.
Checks the dimensions, format, plane count and per-plane file descriptors, logging an error describing the first problem found.
true if the description is well-formed, false otherwise.
|
inlinenoexcept |
Creates a copy of this DMA info, duplicating all file descriptors.
RDMABufferInfo with duplicated file descriptors, or std::nullopt on failure or if the buffer is invalid.
|
inlinenoexcept |
Closes all plane file descriptors.
| Int32 height |
Buffer dimensions in pixels.
| RFormat format |
DRM FourCC pixel format.
| RModifier modifier |
DRM format modifier describing the memory layout.
| int planeCount |
Number of valid planes (1 to 4).
| UInt32 offset[4] {} |
Byte offset of each plane within its file descriptor.
| UInt32 stride[4] {} |
Byte stride (pitch) of each plane.
| int fd[4] { -1, -1, -1, -1 } |
File descriptor backing each plane (-1 if unused).