diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-01-03 13:10:37 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-01-21 11:13:49 +0200 |
commit | f3695e9b09ce4a88d6e0480d9e5058673af34a49 (patch) | |
tree | 804d52f7b54c2add621f317fd13529d1d27bb17b /src/libcamera/include/pipeline_handler.h | |
parent | 32bf7ef239c1310fba638f35046b0f7eb13b32bf (diff) |
libcamera: camera_manager: Register cameras with the camera manager
Cameras are listed through a double indirection, first iterating over
all available pipeline handlers, and then listing the cameras they each
support. To simplify the API make the pipeline handlers register the
cameras with the camera manager directly, which lets the camera manager
easily expose the list of all available cameras.
The PipelineHandler API gets simplified as the handlers don't need to
expose the list of cameras they have created.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/libcamera/include/pipeline_handler.h')
-rw-r--r-- | src/libcamera/include/pipeline_handler.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libcamera/include/pipeline_handler.h b/src/libcamera/include/pipeline_handler.h index e976aaa1..f05f201f 100644 --- a/src/libcamera/include/pipeline_handler.h +++ b/src/libcamera/include/pipeline_handler.h @@ -15,6 +15,7 @@ namespace libcamera { +class CameraManager; class DeviceEnumerator; class PipelineHandler @@ -22,10 +23,7 @@ class PipelineHandler public: virtual ~PipelineHandler() { }; - virtual bool match(DeviceEnumerator *enumerator) = 0; - - virtual unsigned int count() = 0; - virtual Camera *camera(unsigned int id) = 0; + virtual bool match(CameraManager *manager, DeviceEnumerator *enumerator) = 0; }; class PipelineHandlerFactory |