From b9bf9514eb7b08220763d7d72c3b1b83bdfe6ab0 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Thu, 27 Jun 2019 15:33:04 +0100 Subject: libcamera: camera: Provide a list of ControlInfo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extend the Camera class to expose the controls it supports. Each pipeline should generate a list of controls supported by each camera it creates. These are represented by a ControlInfoMap, and an associated ControlList of default values. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi Reviewed-by: Niklas Söderlund --- src/libcamera/camera.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/libcamera/camera.cpp') diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index 617ea99c..592dfd39 100644 --- a/src/libcamera/camera.cpp +++ b/src/libcamera/camera.cpp @@ -548,6 +548,18 @@ int Camera::release() return 0; } +/** + * \brief Retrieve the list of controls supported by the camera + * + * Camera controls remain constant through the lifetime of the camera. + * + * \return A ControlInfoMap listing the controls supported by the camera + */ +const ControlInfoMap &Camera::controls() +{ + return pipe_->controls(this); +} + /** * \brief Retrieve all the camera's stream information * -- cgit v1.2.1