summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/android/camera_device.cpp15
-rw-r--r--src/android/camera_device.h1
-rw-r--r--src/android/camera_stream.cpp16
-rw-r--r--src/android/camera_stream.h2
4 files changed, 16 insertions, 18 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) {
diff --git a/src/android/camera_device.h b/src/android/camera_device.h
index e6c192c2..4905958e 100644
--- a/src/android/camera_device.h
+++ b/src/android/camera_device.h
@@ -24,7 +24,6 @@
#include "libcamera/internal/log.h"
#include "libcamera/internal/message.h"
-#include "camera_buffer.h"
#include "camera_metadata.h"
#include "camera_stream.h"
#include "camera_worker.h"
diff --git a/src/android/camera_stream.cpp b/src/android/camera_stream.cpp
index 611ec0d1..b2f03b50 100644
--- a/src/android/camera_stream.cpp
+++ b/src/android/camera_stream.cpp
@@ -7,6 +7,7 @@
#include "camera_stream.h"
+#include "camera_buffer.h"
#include "camera_device.h"
#include "camera_metadata.h"
#include "jpeg/post_processor_jpeg.h"
@@ -96,15 +97,24 @@ int CameraStream::configure()
}
int CameraStream::process(const libcamera::FrameBuffer &source,
- libcamera::MappedBuffer *destination,
+ buffer_handle_t camera3Dest,
const CameraMetadata &requestMetadata,
CameraMetadata *resultMetadata)
{
if (!postProcessor_)
return 0;
- return postProcessor_->process(source, destination,
- requestMetadata, resultMetadata);
+ /*
+ * \todo Buffer mapping and processing should be moved to a
+ * separate thread.
+ */
+ CameraBuffer dest(camera3Dest, PROT_READ | PROT_WRITE);
+ if (!dest.isValid()) {
+ LOG(HAL, Error) << "Failed to map android blob buffer";
+ return -EINVAL;
+ }
+
+ return postProcessor_->process(source, &dest, requestMetadata, resultMetadata);
}
FrameBuffer *CameraStream::getBuffer()
diff --git a/src/android/camera_stream.h b/src/android/camera_stream.h
index fc242b2a..f68fdd3a 100644
--- a/src/android/camera_stream.h
+++ b/src/android/camera_stream.h
@@ -120,7 +120,7 @@ public:
int configure();
int process(const libcamera::FrameBuffer &source,
- libcamera::MappedBuffer *destination,
+ buffer_handle_t camera3Dest,
const CameraMetadata &requestMetadata,
CameraMetadata *resultMetadata);
libcamera::FrameBuffer *getBuffer();