summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2023-05-11 22:44:49 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2023-06-17 22:52:32 +0100
commit75ddd20209c9630b1956b2d783ffb63f9dbaabc9 (patch)
treef0c3ec085b80984caba753ae6a003c9de80b4149 /include
parent7144fe6f9cdddb69caa33eb753bc173adcb2ad06 (diff)
libcamera: camera_manager: Move {add,remove}Camera to internal
The CameraManager exposes addCamera and removeCamera as public API calls, while they should never be called from an application. These calls are only expected to be used by PipelineHandlers to update the CameraManager that a new Camera has been created and allow the Camera Manager to expose it to applications. Remove the public calls and update the private implementations such that they can be used directly by the PipelineHandler through the internal CameraManager::Private provided by the Extensible class. Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Tested-by: Ashok Sidipotu <ashok.sidipotu@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/camera_manager.h4
-rw-r--r--include/libcamera/internal/camera_manager.h2
2 files changed, 1 insertions, 5 deletions
diff --git a/include/libcamera/camera_manager.h b/include/libcamera/camera_manager.h
index 4b1fb756..9767acc4 100644
--- a/include/libcamera/camera_manager.h
+++ b/include/libcamera/camera_manager.h
@@ -34,10 +34,6 @@ public:
std::shared_ptr<Camera> get(const std::string &id);
std::shared_ptr<Camera> get(dev_t devnum);
- void addCamera(std::shared_ptr<Camera> camera,
- const std::vector<dev_t> &devnums);
- void removeCamera(std::shared_ptr<Camera> camera);
-
static const std::string &version() { return version_; }
Signal<std::shared_ptr<Camera>> cameraAdded;
diff --git a/include/libcamera/internal/camera_manager.h b/include/libcamera/internal/camera_manager.h
index 8220a654..72ea9dcc 100644
--- a/include/libcamera/internal/camera_manager.h
+++ b/include/libcamera/internal/camera_manager.h
@@ -37,7 +37,7 @@ public:
int start();
void addCamera(std::shared_ptr<Camera> camera,
const std::vector<dev_t> &devnums) LIBCAMERA_TSA_EXCLUDES(mutex_);
- void removeCamera(Camera *camera) LIBCAMERA_TSA_EXCLUDES(mutex_);
+ void removeCamera(std::shared_ptr<Camera> camera) LIBCAMERA_TSA_EXCLUDES(mutex_);
protected:
void run() override;