libcamera
v0.3.1+12-19bbca3c
Supporting cameras in Linux since 2019
|
Base class for FrameBuffer private data. More...
Public Member Functions | |
Private (const std::vector< Plane > &planes, uint64_t cookie=0) | |
Construct a FrameBuffer::Private instance. More... | |
virtual | ~Private () |
FrameBuffer::Private destructor. | |
void | setRequest (Request *request) |
Set the request this buffer belongs to. More... | |
bool | isContiguous () const |
Check if the frame buffer stores planes contiguously in memory. More... | |
Fence * | fence () const |
Retrieve a const pointer to the Fence. More... | |
void | setFence (std::unique_ptr< Fence > fence) |
Move a fence in this buffer. More... | |
void | cancel () |
Marks the buffer as cancelled. More... | |
FrameMetadata & | metadata () |
Retrieve the dynamic metadata. More... | |
Public Member Functions inherited from libcamera::Extensible::Private | |
Private () | |
Construct an instance of an Extensible class private data. | |
Base class for FrameBuffer private data.
The FrameBuffer::Private class stores all private data associated with a framebuffer. It implements the d-pointer design pattern to hide core FrameBuffer data from the public API, and exposes utility functions to pipeline handlers.
libcamera::FrameBuffer::Private::Private | ( | const std::vector< Plane > & | planes, |
uint64_t | cookie = 0 |
||
) |
Construct a FrameBuffer::Private instance.
[in] | planes | The frame memory planes |
[in] | cookie | Cookie |
|
inline |
Marks the buffer as cancelled.
If a buffer is not used by a request, it shall be marked as cancelled to indicate that the metadata is invalid.
|
inline |
Retrieve a const pointer to the Fence.
This function does only return a reference to the the fence and does not change its ownership. The fence is stored in the FrameBuffer and can only be reset with FrameBuffer::releaseFence() in case the buffer has completed with error due to a Fence wait failure.
If buffer with a Fence completes with errors due to a failure in handling the fence, applications are responsible for releasing the Fence before calling Request::addBuffer() again.
|
inline |
Check if the frame buffer stores planes contiguously in memory.
Multi-planar frame buffers can store their planes contiguously in memory, or split them into discontiguous memory areas. This function checks in which of these two categories the frame buffer belongs.
|
inline |
Retrieve the dynamic metadata.
|
inline |
Move a fence in this buffer.
[in] | fence | The Fence |
This function associates a Fence with this Framebuffer. The intended caller is the Request::addBuffer() function.
Once a FrameBuffer is associated with a Fence, the FrameBuffer will only be made available to the hardware device once the Fence has been correctly signalled.
If the FrameBuffer completes successfully the core releases the Fence and the Buffer can be reused immediately. If handling of the Fence fails during the request preparation, the Fence is not released and is left in the FrameBuffer. It is applications responsibility to correctly release the fence and handle it opportunely before using the buffer again.
|
inline |
Set the request this buffer belongs to.
[in] | request | Request to set |
For buffers added to requests by applications, this function is called by Request::addBuffer() or Request::reuse(). For buffers internal to pipeline handlers, it is called by the pipeline handlers themselves.