summaryrefslogtreecommitdiff
path: root/include/libcamera/camera.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-07-12 09:37:51 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-07-14 16:00:40 +0300
commit33d3c4e2046044ec595ac2cb7ee7db4011e83fb7 (patch)
treea1a07feaa20308e0a34a36f5edc01566b8c4b43a /include/libcamera/camera.h
parent185fe3d4b4d1264b2d72f8c92d17e248092efc46 (diff)
libcamera: request: Add cookie to make request tracking easier
Applications often have to map requests queued to a camera to external resources. To make this easy, add a 64-bit integer cookie to the Request class that is set when the request is created and can be retrieved at any time, especially in the request completion handler. The cookie is completely transparent for libcamera and is never modified. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'include/libcamera/camera.h')
-rw-r--r--include/libcamera/camera.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h
index 6d693d9a..21fac550 100644
--- a/include/libcamera/camera.h
+++ b/include/libcamera/camera.h
@@ -10,6 +10,7 @@
#include <map>
#include <memory>
#include <set>
+#include <stdint.h>
#include <string>
#include <libcamera/controls.h>
@@ -93,7 +94,7 @@ public:
int allocateBuffers();
int freeBuffers();
- Request *createRequest();
+ Request *createRequest(uint64_t cookie = 0);
int queueRequest(Request *request);
int start();