summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2019-11-20 16:36:34 +0100
committerJacopo Mondi <jacopo@jmondi.org>2020-02-14 16:27:42 +0100
commitf8951ee720a817c4802189ee3a5bc26a2fc5794d (patch)
tree8895d913295b1521b179c105c4d2b869ba22164f
parent025149b050a4814d0600c0da88fbcc2181a5f226 (diff)
libcamera: camera: Add Camera properties
Add a method to the Camera class to retrieve the Camera properties registered by the pipeline handler. While at it, reword the Camera::controls() operation documentation to specify that the camera control information are constant during the camera lifetime not their value, while the camera properties value are the actually static information. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
-rw-r--r--include/libcamera/camera.h1
-rw-r--r--src/libcamera/camera.cpp16
2 files changed, 16 insertions, 1 deletions
diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h
index c37319ed..c453b952 100644
--- a/include/libcamera/camera.h
+++ b/include/libcamera/camera.h
@@ -86,6 +86,7 @@ public:
int release();
const ControlInfoMap &controls();
+ const ControlList &properties();
const std::set<Stream *> &streams() const;
std::unique_ptr<CameraConfiguration> generateConfiguration(const StreamRoles &roles);
diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
index 44f2d71b..63b1f772 100644
--- a/src/libcamera/camera.cpp
+++ b/src/libcamera/camera.cpp
@@ -652,7 +652,8 @@ int Camera::release()
/**
* \brief Retrieve the list of controls supported by the camera
*
- * Camera controls remain constant through the lifetime of the camera.
+ * The list of controls supported by the camera and their associated
+ * constraints remain constant through the lifetime of the Camera object.
*
* \context This function is \threadsafe.
*
@@ -664,6 +665,19 @@ const ControlInfoMap &Camera::controls()
}
/**
+ * \brief Retrieve the list of properties of the camera
+ *
+ * Camera properties are static information that describe the capabilities of
+ * the camera. They remain constant through the lifetime of the Camera object.
+ *
+ * \return A ControlList of properties supported by the camera
+ */
+const ControlList &Camera::properties()
+{
+ return p_->pipe_->properties(this);
+}
+
+/**
* \brief Retrieve all the camera's stream information
*
* Retrieve all of the camera's static stream information. The static