From 1abdcf803d9cfc8df15361fbbd627654f1eb82c9 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 19 Oct 2021 17:17:53 +0530 Subject: android: camera_device: Build capture_result dynamically The camera3_capture_result_t is only needed to convey capture results to the camera service through the process_capture_result() callback. There's no need to store it in the Camera3RequestDescriptor. Build it dynamically in CameraDevice::sendCaptureResults() instead. This requires storing the result metadata created in CameraDevice::requestComplete() in the Camera3RequestDescriptor. A side effect of this change is that the request metadata lifetime will match the Camera3RequestDescriptor instead of being destroyed at the end of requestComplete(). This will be needed to support asynchronous post-processing, where the request completion will be signaled to the camera service asynchronously from requestComplete(). Signed-off-by: Laurent Pinchart Signed-off-by: Umang Jain Reviewed-by: Hirokazu Honda Reviewed-by: Jacopo Mondi --- src/android/camera_request.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/android/camera_request.h') diff --git a/src/android/camera_request.h b/src/android/camera_request.h index 79dfdb58..db13f624 100644 --- a/src/android/camera_request.h +++ b/src/android/camera_request.h @@ -40,8 +40,8 @@ public: std::vector> frameBuffers_; CameraMetadata settings_; std::unique_ptr request_; + std::unique_ptr resultMetadata_; - camera3_capture_result_t captureResult_ = {}; Status status_ = Status::Pending; private: -- cgit v1.2.1