From f3695e9b09ce4a88d6e0480d9e5058673af34a49 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 3 Jan 2019 13:10:37 +0200 Subject: libcamera: camera_manager: Register cameras with the camera manager MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Niklas Söderlund Reviewed-by: Jacopo Mondi --- test/list-cameras.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/list-cameras.cpp b/test/list-cameras.cpp index e2026c99..fdbbda09 100644 --- a/test/list-cameras.cpp +++ b/test/list-cameras.cpp @@ -7,6 +7,7 @@ #include +#include #include #include "test.h" @@ -29,8 +30,8 @@ protected: { unsigned int count = 0; - for (auto name : cm->list()) { - cout << "- " << name << endl; + for (Camera *camera : cm->cameras()) { + cout << "- " << camera->name() << endl; count++; } -- cgit v1.2.1