mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-17 01:15:06 +03:00
libcamera: ipa_manager: Remove singleton requirement
The IPAManager class implements a singleton pattern due to the need of accessing the instance in a static member function. The function now takes a pointer to a PipelineHandler, which we can use to access the CameraManager, and from there, the IPAManager. Add accessors to the internal API to expose the CameraManager from the PipelineHandler, and the IPAManager from the CameraManager. This requires allocating the IPAManager dynamically to avoid a loop in includes. Use those accessors to replace the IPAManager singleton. Update the IPA interface unit test to instantiate a CameraManager instead of an IPAManager and ProcessManager, to reflect the new way that the IPAManager is accessed. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
6f1df8d606
commit
1045522af9
7 changed files with 33 additions and 23 deletions
|
@ -70,6 +70,8 @@ public:
|
|||
|
||||
const char *name() const { return name_; }
|
||||
|
||||
CameraManager *cameraManager() const { return manager_; }
|
||||
|
||||
protected:
|
||||
void registerCamera(std::shared_ptr<Camera> camera);
|
||||
void hotplugMediaDevice(MediaDevice *media);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue