Message ID | 20250728115556.2886082-6-paul.elder@ideasonboard.com |
---|---|
State | Superseded |
Headers | show |
Series |
|
Related | show |
Hi 2025. 07. 28. 13:55 keltezéssel, Paul Elder írta: > Add to the CameraManager a LayerManager member. This allows us to have > one LayerManager that handles loading all the layer shared objects, and > then each Camera can access the layer via the LayerManager via through > the CameraManager. > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > --- > New in v2 > --- > include/libcamera/internal/camera_manager.h | 3 +++ > src/libcamera/camera_manager.cpp | 2 ++ > 2 files changed, 5 insertions(+) > > diff --git a/include/libcamera/internal/camera_manager.h b/include/libcamera/internal/camera_manager.h > index 0150ca61f7de..ef5b0688de23 100644 > --- a/include/libcamera/internal/camera_manager.h > +++ b/include/libcamera/internal/camera_manager.h > @@ -25,6 +25,7 @@ namespace libcamera { > class Camera; > class DeviceEnumerator; > class IPAManager; > +class LayerManager; > class PipelineHandlerFactoryBase; > > class CameraManager::Private : public Extensible::Private, public Thread > @@ -39,6 +40,7 @@ public: > void removeCamera(std::shared_ptr<Camera> camera) LIBCAMERA_TSA_EXCLUDES(mutex_); > > IPAManager *ipaManager() const { return ipaManager_.get(); } > + LayerManager *layerManager() const { return layerManager_.get(); } > > protected: > void run() override; > @@ -66,6 +68,7 @@ private: > > std::unique_ptr<IPAManager> ipaManager_; > ProcessManager processManager_; > + std::unique_ptr<LayerManager> layerManager_; Could it be made a direct member without `unique_ptr`? Regards, Barnabás Pőcze > }; > > } /* namespace libcamera */ > diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp > index f81794bfd6fe..35c8ed036502 100644 > --- a/src/libcamera/camera_manager.cpp > +++ b/src/libcamera/camera_manager.cpp > @@ -15,6 +15,7 @@ > > #include "libcamera/internal/camera.h" > #include "libcamera/internal/device_enumerator.h" > +#include "libcamera/internal/layer_manager.h" > #include "libcamera/internal/ipa_manager.h" > #include "libcamera/internal/pipeline_handler.h" > > @@ -41,6 +42,7 @@ CameraManager::Private::Private() > : initialized_(false) > { > ipaManager_ = std::make_unique<IPAManager>(); > + layerManager_ = std::make_unique<LayerManager>(); > } > > int CameraManager::Private::start()
diff --git a/include/libcamera/internal/camera_manager.h b/include/libcamera/internal/camera_manager.h index 0150ca61f7de..ef5b0688de23 100644 --- a/include/libcamera/internal/camera_manager.h +++ b/include/libcamera/internal/camera_manager.h @@ -25,6 +25,7 @@ namespace libcamera { class Camera; class DeviceEnumerator; class IPAManager; +class LayerManager; class PipelineHandlerFactoryBase; class CameraManager::Private : public Extensible::Private, public Thread @@ -39,6 +40,7 @@ public: void removeCamera(std::shared_ptr<Camera> camera) LIBCAMERA_TSA_EXCLUDES(mutex_); IPAManager *ipaManager() const { return ipaManager_.get(); } + LayerManager *layerManager() const { return layerManager_.get(); } protected: void run() override; @@ -66,6 +68,7 @@ private: std::unique_ptr<IPAManager> ipaManager_; ProcessManager processManager_; + std::unique_ptr<LayerManager> layerManager_; }; } /* namespace libcamera */ diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp index f81794bfd6fe..35c8ed036502 100644 --- a/src/libcamera/camera_manager.cpp +++ b/src/libcamera/camera_manager.cpp @@ -15,6 +15,7 @@ #include "libcamera/internal/camera.h" #include "libcamera/internal/device_enumerator.h" +#include "libcamera/internal/layer_manager.h" #include "libcamera/internal/ipa_manager.h" #include "libcamera/internal/pipeline_handler.h" @@ -41,6 +42,7 @@ CameraManager::Private::Private() : initialized_(false) { ipaManager_ = std::make_unique<IPAManager>(); + layerManager_ = std::make_unique<LayerManager>(); } int CameraManager::Private::start()