[libcamera-devel] [PATCH 5/7] android: camera_hal_manager: Use CameraHalConfig
Jacopo Mondi
jacopo at jmondi.org
Wed Mar 24 12:25:25 CET 2021
Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
src/android/camera_hal_manager.cpp | 6 +++++-
src/android/camera_hal_manager.h | 3 +++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp
index aeff14bdc14f..a19f80edede8 100644
--- a/src/android/camera_hal_manager.cpp
+++ b/src/android/camera_hal_manager.cpp
@@ -47,13 +47,17 @@ CameraHalManager::~CameraHalManager()
int CameraHalManager::init()
{
+ int ret = halConfig_.open();
+ if (ret)
+ return ret;
+
cameraManager_ = new CameraManager();
/* Support camera hotplug. */
cameraManager_->cameraAdded.connect(this, &CameraHalManager::cameraAdded);
cameraManager_->cameraRemoved.connect(this, &CameraHalManager::cameraRemoved);
- int ret = cameraManager_->start();
+ ret = cameraManager_->start();
if (ret) {
LOG(HAL, Error) << "Failed to start camera manager: "
<< strerror(-ret);
diff --git a/src/android/camera_hal_manager.h b/src/android/camera_hal_manager.h
index 24bf716c9f9d..cb333293a441 100644
--- a/src/android/camera_hal_manager.h
+++ b/src/android/camera_hal_manager.h
@@ -19,6 +19,8 @@
#include <libcamera/camera_manager.h>
+#include "camera_hal_config.h"
+
class CameraDevice;
class CameraHalManager
@@ -50,6 +52,7 @@ private:
CameraDevice *cameraDeviceFromHalId(unsigned int id);
libcamera::CameraManager *cameraManager_;
+ CameraHalConfig halConfig_;
const camera_module_callbacks_t *callbacks_;
std::vector<std::shared_ptr<CameraDevice>> cameras_;
--
2.30.0
More information about the libcamera-devel
mailing list