libcamera: pipeline: Register device numbers with camera

Register the identified device numbers with each camera as the
SystemDevices property.

This facilitates camera daemons or other systems to identify which
devices are being managed by libcamera, and can prevent duplication of
camera resources.

As the SystemDevices property now provides this list of devices, use it
directly from within the CameraManager when adding a Camera rather than
passing it through the internal API.

Tested-by: Ashok Sidipotu <ashok.sidipotu@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Kieran Bingham 2023-05-03 21:45:35 +01:00
parent 1de9518f51
commit b9113a8626
3 changed files with 20 additions and 9 deletions

View file

@ -35,8 +35,7 @@ public:
Private();
int start();
void addCamera(std::shared_ptr<Camera> camera,
const std::vector<dev_t> &devnums) LIBCAMERA_TSA_EXCLUDES(mutex_);
void addCamera(std::shared_ptr<Camera> camera) LIBCAMERA_TSA_EXCLUDES(mutex_);
void removeCamera(std::shared_ptr<Camera> camera) LIBCAMERA_TSA_EXCLUDES(mutex_);
protected: