libcamera: request: Add Fence to Request::addBuffer()

Add an optional fence parameter to Request::addBuffer() to allow
associating a Fence with a FrameBuffer.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Jacopo Mondi
2021-12-11 17:53:40 +01:00
parent 7a34707bfd
commit a645898af5
2 changed files with 34 additions and 2 deletions
+3 -1
View File
@@ -17,6 +17,7 @@
#include <libcamera/base/signal.h>
#include <libcamera/controls.h>
#include <libcamera/fence.h>
namespace libcamera {
@@ -51,7 +52,8 @@ public:
ControlList &controls() { return *controls_; }
ControlList &metadata() { return *metadata_; }
const BufferMap &buffers() const { return bufferMap_; }
int addBuffer(const Stream *stream, FrameBuffer *buffer);
int addBuffer(const Stream *stream, FrameBuffer *buffer,
std::unique_ptr<Fence> fence = nullptr);
FrameBuffer *findBuffer(const Stream *stream) const;
uint32_t sequence() const;