summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/camera.h2
-rw-r--r--include/libcamera/request.h7
2 files changed, 8 insertions, 1 deletions
diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h
index a2ee4e7e..79ff8d6b 100644
--- a/include/libcamera/camera.h
+++ b/include/libcamera/camera.h
@@ -96,7 +96,7 @@ public:
std::unique_ptr<CameraConfiguration> generateConfiguration(const StreamRoles &roles = {});
int configure(CameraConfiguration *config);
- Request *createRequest(uint64_t cookie = 0);
+ std::unique_ptr<Request> createRequest(uint64_t cookie = 0);
int queueRequest(Request *request);
int start();
diff --git a/include/libcamera/request.h b/include/libcamera/request.h
index 5976ac50..655b1324 100644
--- a/include/libcamera/request.h
+++ b/include/libcamera/request.h
@@ -31,6 +31,11 @@ public:
RequestCancelled,
};
+ enum ReuseFlag {
+ Default = 0,
+ ReuseBuffers = (1 << 0),
+ };
+
using BufferMap = std::map<const Stream *, FrameBuffer *>;
Request(Camera *camera, uint64_t cookie = 0);
@@ -38,6 +43,8 @@ public:
Request &operator=(const Request &) = delete;
~Request();
+ void reuse(ReuseFlag flags = Default);
+
ControlList &controls() { return *controls_; }
ControlList &metadata() { return *metadata_; }
const BufferMap &buffers() const { return bufferMap_; }