From patchwork Wed Dec 23 18:45:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 10712 X-Patchwork-Delegate: jacopo@jmondi.org Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 0A77DC0F1A for ; Wed, 23 Dec 2020 18:45:13 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DB45561D64; Wed, 23 Dec 2020 19:45:12 +0100 (CET) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4D25D619E2 for ; Wed, 23 Dec 2020 19:45:09 +0100 (CET) X-Originating-IP: 2.224.242.101 Received: from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 1071C20004 for ; Wed, 23 Dec 2020 18:45:08 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Wed, 23 Dec 2020 19:45:15 +0100 Message-Id: <20201223184516.58791-5-jacopo@jmondi.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201223184516.58791-1-jacopo@jmondi.org> References: <20201223184516.58791-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 4/5] libcamera: camera_sensor: Add controls() method 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add a controls() method to retrieve the map of libcamera controls registered by the CameraSensor class. Signed-off-by: Jacopo Mondi Reviewed-by: Paul Elder --- include/libcamera/internal/camera_sensor.h | 1 + src/libcamera/camera_sensor.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h index 841c7f4bef0f..10877b9d1d9d 100644 --- a/include/libcamera/internal/camera_sensor.h +++ b/include/libcamera/internal/camera_sensor.h @@ -62,6 +62,7 @@ public: int setControls(ControlList *ctrls); const ControlList &properties() const { return properties_; } + const ControlInfoMap &controls() const { return controls_; } int sensorInfo(CameraSensorInfo *info) const; protected: diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp index fa85484f6186..e95a254c03cc 100644 --- a/src/libcamera/camera_sensor.cpp +++ b/src/libcamera/camera_sensor.cpp @@ -652,6 +652,12 @@ ControlList CameraSensor::getControls(const std::vector &ids) * \return The list of camera sensor properties */ +/** + * \fn CameraSensor::controls() + * \brief Retrieve the camera sensor controls info + * \return The map of camera sensor controls info + */ + /** * \brief Write controls to the sensor * \param[in] ctrls The list of controls to write