summaryrefslogtreecommitdiff
path: root/src/cam/capture.h
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2020-09-23 19:05:41 +0900
committerPaul Elder <paul.elder@ideasonboard.com>2020-10-12 11:32:40 +0900
commitc753223ad6b90550fae31aedd79fbedc13da2e75 (patch)
tree957c83eb734fbfc633fd3a0a39c8339695323fe4 /src/cam/capture.h
parent05cdef27ab766a199a256c73ef4b338ce4f4dac5 (diff)
libcamera, android, cam, gstreamer, qcam, v4l2: Reuse Request
Allow reuse of the Request object by implementing reuse(). This means the applications now have the responsibility of freeing the Request objects, so make all libcamera users (cam, qcam, v4l2-compat, gstreamer, android) do so. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/cam/capture.h')
-rw-r--r--src/cam/capture.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cam/capture.h b/src/cam/capture.h
index 0aebdac9..45e5e8a9 100644
--- a/src/cam/capture.h
+++ b/src/cam/capture.h
@@ -9,6 +9,7 @@
#include <memory>
#include <stdint.h>
+#include <vector>
#include <libcamera/buffer.h>
#include <libcamera/camera.h>
@@ -43,6 +44,8 @@ private:
EventLoop *loop_;
unsigned int captureCount_;
unsigned int captureLimit_;
+
+ std::vector<std::unique_ptr<libcamera::Request>> requests_;
};
#endif /* __CAM_CAPTURE_H__ */