summaryrefslogtreecommitdiff
path: root/src/android/camera_device.cpp
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2021-02-24 12:50:40 +0100
committerJacopo Mondi <jacopo@jmondi.org>2021-03-03 09:50:13 +0100
commita725baf4b33320a71f03474627c9bf19cdafc4ed (patch)
treefe357c9c50066f43f71cd18ad995f56fbffbbfe1 /src/android/camera_device.cpp
parentd5473c962618f29e3f2f971b794a7fc770afc9bd (diff)
android: Move buffer mapping to CameraStream
The destination buffer for the post-processing component is currently first mapped in the CameraDevice class and then passed to CameraStream which simply calls the post-processor interface. Move the mapping to CameraStream::process() to tie the buffer mapping to the lifetime of the CameraBuffer instance. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/android/camera_device.cpp')
-rw-r--r--src/android/camera_device.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 1c3b0f56..ae01c362 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -1857,19 +1857,8 @@ void CameraDevice::requestComplete(Request *request)
continue;
}
- /*
- * \todo Buffer mapping and compression should be moved to a
- * separate thread.
- */
-
- CameraBuffer dest(*descriptor->buffers_[i].buffer,
- PROT_READ | PROT_WRITE);
- if (!dest.isValid()) {
- LOG(HAL, Error) << "Failed to map android blob buffer";
- continue;
- }
-
- int ret = cameraStream->process(*src, &dest,
+ int ret = cameraStream->process(*src,
+ *descriptor->buffers_[i].buffer,
descriptor->settings_,
resultMetadata.get());
if (ret) {