[libcamera-devel] [PATCH v4 0/5] libcamera: Add new Camera devices property

Kieran Bingham kieran.bingham at ideasonboard.com
Thu Jun 15 19:26:03 CEST 2023


It can be beneficial to allow reporting the devices used by a camera to
facilitate de-duplication of resources when handling cameras from a
centralised infrastructure such as PipeWire.

Expose a new property on all cameras which reports a list of dev_t
values representing devices used by the camera.

Pipelines supported by media-controller will automatically register an
entry for any video node present in the media graphs registered with the
Pipeline Handler..

As part of supporting this, we move the addCamera and removeCamera
public API calls from the CameraManager class away into an internal
implementation of the CameraManager with the use of the Extensible
class.

This series also now converts include/libcamera/internal/request.h to
use #pragma once which was missed during the original conversions and
noticed as I referenced it when creating
include/libcamera/internal/camera_manager.h.


v4:
 - Fix includes
 - Fix sort order of header in meson.build
 - Fix doxygen file references
 - Report that different cameras may report identical devices
 - Rename to SystemDevices

Kieran Bingham (5):
  libcamera: internal: request: convert to pragma once
  libcamera: camera_manager: Move private implementation to internal
  libcamera: camera_manager: Move {add,remove}Camera to internal
  libcamera: properties: Provide a Devices camera property
  libcamera: pipeline: Register device numbers with camera

 include/libcamera/camera_manager.h          |   4 -
 include/libcamera/internal/camera_manager.h |  69 +++++++++
 include/libcamera/internal/meson.build      |   1 +
 include/libcamera/internal/request.h        |   6 +-
 src/libcamera/camera_manager.cpp            | 154 +++++++-------------
 src/libcamera/pipeline_handler.cpp          |  16 +-
 src/libcamera/property_ids.yaml             |   9 ++
 7 files changed, 147 insertions(+), 112 deletions(-)
 create mode 100644 include/libcamera/internal/camera_manager.h

-- 
2.34.1



More information about the libcamera-devel mailing list