summaryrefslogtreecommitdiff
path: root/src/android/camera3_hal.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-01-20 01:09:34 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-02-13 13:23:23 +0200
commitda3f50ee9cdb6896b365357b0d35577344f72ba4 (patch)
tree4e3b31244adeb18f0458992153ab77ce47dd1c93 /src/android/camera3_hal.cpp
parent8a8502ec0ea5e64a0c44eb18aac0ecd4b6771e6b (diff)
android: Remove internal thread
Now that libcamera creates threads internally and doesn't rely on an application-provided event loop, remove the thread from the Android Camera HAL layer. The CameraProxy class becomes meaningless, remove it and communicate directly from the CameraHalManager to the CameraDevice. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/android/camera3_hal.cpp')
-rw-r--r--src/android/camera3_hal.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp
index 8d2629ca..d6fc1ecc 100644
--- a/src/android/camera3_hal.cpp
+++ b/src/android/camera3_hal.cpp
@@ -7,8 +7,8 @@
#include <hardware/camera_common.h>
+#include "camera_device.h"
#include "camera_hal_manager.h"
-#include "camera_proxy.h"
#include "log.h"
using namespace libcamera;
@@ -71,14 +71,14 @@ static int hal_dev_open(const hw_module_t *module, const char *name,
LOG(HAL, Debug) << "Open camera " << name;
int id = atoi(name);
- CameraProxy *proxy = cameraManager.open(id, module);
- if (!proxy) {
+ CameraDevice *camera = cameraManager.open(id, module);
+ if (!camera) {
LOG(HAL, Error)
<< "Failed to open camera module '" << id << "'";
return -ENODEV;
}
- *device = &proxy->camera3Device()->common;
+ *device = &camera->camera3Device()->common;
return 0;
}