summaryrefslogtreecommitdiff
path: root/src/android/camera_device.cpp
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2021-01-21 18:59:24 +0900
committerPaul Elder <paul.elder@ideasonboard.com>2021-01-27 12:07:17 +0900
commita6de3f0203c5d338a2a86ff049d55907a12e04c5 (patch)
treec7863b1a9609075138c13c50c7f276d97f07adc3 /src/android/camera_device.cpp
parent1264628d3c92dedfcee32caed776e2beaad74a2a (diff)
android: camera_device: Cache request metadata
The settings in an android capture request may be null, in which case the settings from the most recently submitted capture request should be used. Cache the request settings to achieve this. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/android/camera_device.cpp')
-rw-r--r--src/android/camera_device.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 8ea74233..82bf0d3a 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -1696,6 +1696,16 @@ int CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reques
*/
Camera3RequestDescriptor *descriptor =
new Camera3RequestDescriptor(camera_.get(), camera3Request);
+ /*
+ * \todo The Android request model is incremental, settings passed in
+ * previous requests are to be effective until overridden explicitly in
+ * a new request. Do we need to cache settings incrementally here, or is
+ * it handled by the Android camera service ?
+ */
+ if (camera3Request->settings)
+ lastSettings_ = camera3Request->settings;
+ else
+ descriptor->settings_ = lastSettings_;
LOG(HAL, Debug) << "Queueing Request to libcamera with "
<< descriptor->numBuffers_ << " HAL streams";