summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2019-06-27 15:33:04 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-07-02 16:59:28 +0300
commitb9bf9514eb7b08220763d7d72c3b1b83bdfe6ab0 (patch)
treececfe4629242b616c0ce16e5e3461d122156d247 /include
parent20d5640ca49c76c89be5bebcc00981942c7a9c19 (diff)
libcamera: camera: Provide a list of ControlInfo
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 <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/camera.h3
-rw-r--r--include/libcamera/controls.h2
2 files changed, 5 insertions, 0 deletions
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 <set>
#include <string>
+#include <libcamera/controls.h>
#include <libcamera/request.h>
#include <libcamera/signal.h>
#include <libcamera/stream.h>
@@ -83,6 +84,8 @@ public:
int acquire();
int release();
+ const ControlInfoMap &controls();
+
const std::set<Stream *> &streams() const;
std::unique_ptr<CameraConfiguration> 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<ControlId, ControlInfo>;
+
class ControlList
{
private: