summaryrefslogtreecommitdiff
path: root/src/android/camera_request.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/camera_request.h')
-rw-r--r--src/android/camera_request.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/android/camera_request.h b/src/android/camera_request.h
index db13f624..a030febf 100644
--- a/src/android/camera_request.h
+++ b/src/android/camera_request.h
@@ -29,6 +29,16 @@ public:
Error,
};
+ struct StreamBuffer {
+ camera3_stream_buffer_t buffer;
+ /*
+ * FrameBuffer instances created by wrapping a camera3 provided
+ * dmabuf are emplaced in this vector of unique_ptr<> for
+ * lifetime management.
+ */
+ std::unique_ptr<libcamera::FrameBuffer> frameBuffer;
+ };
+
Camera3RequestDescriptor(libcamera::Camera *camera,
const camera3_capture_request_t *camera3Request);
~Camera3RequestDescriptor();
@@ -36,8 +46,9 @@ public:
bool isPending() const { return status_ == Status::Pending; }
uint32_t frameNumber_ = 0;
- std::vector<camera3_stream_buffer_t> buffers_;
- std::vector<std::unique_ptr<libcamera::FrameBuffer>> frameBuffers_;
+
+ std::vector<StreamBuffer> buffers_;
+
CameraMetadata settings_;
std::unique_ptr<CaptureRequest> request_;
std::unique_ptr<CameraMetadata> resultMetadata_;