[libcamera-devel] [PATCH 5/7] android: camera_hal_manager: Use CameraHalConfig
Niklas Söderlund
niklas.soderlund at ragnatech.se
Thu Mar 25 23:36:40 CET 2021
Hi Jacopo,
Thanks for your work.
On 2021-03-24 12:25:25 +0100, Jacopo Mondi wrote:
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
With a commit message added, something simple as,
Store the HAL configuration in the camera manager.
Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> ---
> 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
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
--
Regards,
Niklas Söderlund
More information about the libcamera-devel
mailing list