libcamera: allocator: Add FrameBufferAllocator to help applications allocate buffers
The FrameBuffer interface is based on the idea that all buffers are allocated externally to libcamera and are only used by it. This is meant to create a simpler API centered around usage of buffers, regardless of where they come from. Linux however lacks a centralized allocator at the moment, and not all users of libcamera are expected to use another device that could provide suitable buffers for the camera. This patch thus adds a helper class to allocate buffers internally in libcamera, in a way that matches the needs of the FrameBuffer-based API. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
e9e6135d97
commit
eb4030f6c0
6 changed files with 286 additions and 1 deletions
|
@ -20,6 +20,7 @@
|
|||
namespace libcamera {
|
||||
|
||||
class Buffer;
|
||||
class FrameBufferAllocator;
|
||||
class PipelineHandler;
|
||||
class Request;
|
||||
|
||||
|
@ -126,6 +127,10 @@ private:
|
|||
|
||||
bool disconnected_;
|
||||
State state_;
|
||||
|
||||
/* Needed to update allocator_ and to read state_ and activeStreams_. */
|
||||
friend class FrameBufferAllocator;
|
||||
FrameBufferAllocator *allocator_;
|
||||
};
|
||||
|
||||
} /* namespace libcamera */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue