[libcamera-devel,v3,08/14] libcamera: controls: Add a set of initial controls

Message ID 20190630233817.10130-9-laurent.pinchart@ideasonboard.com
State Superseded
Headers show
Series
  • libcamera Controls
Related show

Commit Message

Laurent Pinchart June 30, 2019, 11:38 p.m. UTC
Add an initial set of controls to demonstrate how controls are defined.

Proper documentation for each control is missing.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 include/libcamera/control_ids.h |  6 +++++
 src/libcamera/controls.cpp      | 42 +++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+)

Patch

diff --git a/include/libcamera/control_ids.h b/include/libcamera/control_ids.h
index d0e700da9844..75b6a2d5cafe 100644
--- a/include/libcamera/control_ids.h
+++ b/include/libcamera/control_ids.h
@@ -13,6 +13,12 @@ 
 namespace libcamera {
 
 enum ControlId {
+	AwbEnable,
+	Brightness,
+	Contrast,
+	Saturation,
+	ManualExposure,
+	ManualGain,
 };
 
 } /* namespace libcamera */
diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp
index 17e09fc7f153..0fac6f69d2b7 100644
--- a/src/libcamera/controls.cpp
+++ b/src/libcamera/controls.cpp
@@ -179,6 +179,48 @@  std::string ControlValue::toString() const
  * Control Identifiers
  */
 
+/**
+ * \var AwbEnable
+ * ControlType: Bool
+ *
+ * Enables or disables the AWB. See also \a libcamera::ControlId::ManualGain
+ */
+
+/**
+ * \var Brightness
+ * ControlType: Integer
+ *
+ * Specify a fixed brightness parameter.
+ */
+
+/**
+ * \var Contrast
+ * ControlType: Integer
+ *
+ * Specify a fixed constrast parameter.
+ */
+
+/**
+ * \var Saturation
+ * ControlType: Integer
+ *
+ * Specify a fixed saturation parameter.
+ */
+
+/**
+ * \var ManualExposure
+ * ControlType: Integer
+ *
+ * Specify a fixed exposure time in milli-seconds
+ */
+
+/**
+ * \var ManualGain
+ * ControlType: Integer
+ *
+ * Specify a fixed gain parameter
+ */
+
 /**
  * \struct ControlIdentifier
  * \brief Describes a ControlId with control specific constant meta-data.