[libcamera-devel,0/3] libcamera: Add new Camera devices property
mbox series

Message ID 20230511224830.356416-1-kieran.bingham@ideasonboard.com
Headers show
Series
  • libcamera: Add new Camera devices property
Related show

Message

Kieran Bingham May 11, 2023, 10:48 p.m. UTC
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.

Kieran Bingham (4):
  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 |  65 +++++++++
 include/libcamera/internal/meson.build      |   1 +
 src/libcamera/camera_manager.cpp            | 143 +++++++-------------
 src/libcamera/pipeline_handler.cpp          |  16 ++-
 src/libcamera/property_ids.yaml             |   8 ++
 6 files changed, 134 insertions(+), 103 deletions(-)
 create mode 100644 include/libcamera/internal/camera_manager.h

Comments

Kieran Bingham May 11, 2023, 10:55 p.m. UTC | #1
Sorry everyone, two patch sets in one folder.

Oh what a mess.
Reposting a 'real' v2...

Please disregard this thread.
--
Kieran


Quoting Kieran Bingham (2023-05-11 23:48:23)
> 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.
> 
> Kieran Bingham (4):
>   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 |  65 +++++++++
>  include/libcamera/internal/meson.build      |   1 +
>  src/libcamera/camera_manager.cpp            | 143 +++++++-------------
>  src/libcamera/pipeline_handler.cpp          |  16 ++-
>  src/libcamera/property_ids.yaml             |   8 ++
>  6 files changed, 134 insertions(+), 103 deletions(-)
>  create mode 100644 include/libcamera/internal/camera_manager.h
> 
> -- 
> 2.34.1
>