[libcamera-devel] [PATCH v2 4/6] android: camera_hal_manager: Use CameraHalConfig
Hirokazu Honda
hiroh at chromium.org
Tue Mar 30 04:14:50 CEST 2021
Hi, Jacopo, thanks for the patch.
On Tue, Mar 30, 2021 at 9:15 AM Laurent Pinchart
<laurent.pinchart at ideasonboard.com> wrote:
>
> Hi Jacopo,
>
> Thank you for the patch.
>
> On Mon, Mar 29, 2021 at 05:28:05PM +0200, Jacopo Mondi wrote:
> > Store the HAL configuration in the camera manager.
> >
> > Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> > Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>
Reviewed-by: Hirokazu Honda <hiroh at chromium.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 bf3fcda75237..f79789b5bfb8 100644
> > --- a/src/android/camera_hal_manager.cpp
> > +++ b/src/android/camera_hal_manager.cpp
> > @@ -39,13 +39,17 @@ CameraHalManager::~CameraHalManager() = default;
> >
> > int CameraHalManager::init()
> > {
> > + int ret = halConfig_.open();
> > + if (ret)
> > + return ret;
> > +
> > cameraManager_ = std::make_unique<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 d9bf27989965..af1581da6579 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);
> >
> > std::unique_ptr<libcamera::CameraManager> cameraManager_;
> > + CameraHalConfig halConfig_;
> >
> > const camera_module_callbacks_t *callbacks_;
> > std::vector<std::unique_ptr<CameraDevice>> cameras_;
>
> --
> Regards,
>
> Laurent Pinchart
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
More information about the libcamera-devel
mailing list