From patchwork Wed Dec 4 13:21:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 2394 Return-Path: Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 752B361D27 for ; Wed, 4 Dec 2019 14:21:25 +0100 (CET) Received: from uno.lan (93-34-114-233.ip49.fastwebnet.it [93.34.114.233]) (Authenticated sender: jacopo@jmondi.org) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 1902124000E; Wed, 4 Dec 2019 13:21:24 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Wed, 4 Dec 2019 14:21:06 +0100 Message-Id: <20191204132106.21582-11-jacopo@jmondi.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191204132106.21582-1-jacopo@jmondi.org> References: <20191204132106.21582-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 10/10] DO NOT MERGE: Reports camera properties in cam X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2019 13:21:25 -0000 Running cam -l lists the camera properties registered by the pipeline handler. In example, for the VIMC pipelinehandler: Available cameras: 1: Integrated Camera: Integrated C 2: VIMC Sensor B Rotation: 0 Location: 0 Signed-off-by: Jacopo Mondi --- src/cam/main.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/cam/main.cpp b/src/cam/main.cpp index a38cca959aca..8d37754773af 100644 --- a/src/cam/main.cpp +++ b/src/cam/main.cpp @@ -11,6 +11,7 @@ #include #include +#include #include "capture.h" #include "event_loop.h" @@ -309,6 +310,16 @@ int CamApp::run() for (const std::shared_ptr &cam : cm_->cameras()) { std::cout << index << ": " << cam->name() << std::endl; index++; + + const ControlList &properties = cam->properties(); + for (const auto &prop : properties) { + auto it = properties::properties.find(prop.first); + if (it == properties::properties.end()) + continue; + + std::cout << it->second->name() << ": " << + prop.second.get() << "\n"; + } } }