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 --- include/libcamera/camera.h | 3 +++ include/libcamera/controls.h | 2 ++ 2 files changed, 5 insertions(+) (limited to 'include') diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h index fb2f7ba3..6d693d9a 100644 --- a/include/libcamera/camera.h +++ b/include/libcamera/camera.h @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -83,6 +84,8 @@ public: int acquire(); int release(); + const ControlInfoMap &controls(); + const std::set &streams() const; std::unique_ptr generateConfiguration(const StreamRoles &roles); int configure(CameraConfiguration *config); diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h index 22061559..18293c94 100644 --- a/include/libcamera/controls.h +++ b/include/libcamera/controls.h @@ -99,6 +99,8 @@ static inline bool operator!=(const ControlInfo &lhs, const ControlId &rhs) return !(lhs == rhs); } +using ControlInfoMap = std::unordered_map; + class ControlList { private: -- cgit v1.2.1