[libcamera-devel] [RFC PATCH 6/7] libcamera: camera_lens: add method to get a list of volatile controls
Matthias Fend
matthias.fend at emfend.at
Thu Feb 2 12:12:51 CET 2023
This method reads all v4l2 controls marked as volatile from the underlying
v4l2 subdevice.
Signed-off-by: Matthias Fend <matthias.fend at emfend.at>
---
include/libcamera/internal/camera_lens.h | 1 +
src/libcamera/camera_lens.cpp | 9 +++++++++
2 files changed, 10 insertions(+)
diff --git a/include/libcamera/internal/camera_lens.h b/include/libcamera/internal/camera_lens.h
index f5212ea7..9aa0b84a 100644
--- a/include/libcamera/internal/camera_lens.h
+++ b/include/libcamera/internal/camera_lens.h
@@ -34,6 +34,7 @@ public:
const ControlInfoMap &controls() const;
ControlList getControls(const std::vector<uint32_t> &ids);
+ ControlList getVolatileControls();
protected:
std::string logPrefix() const override;
diff --git a/src/libcamera/camera_lens.cpp b/src/libcamera/camera_lens.cpp
index ddcda232..5bace1e7 100644
--- a/src/libcamera/camera_lens.cpp
+++ b/src/libcamera/camera_lens.cpp
@@ -165,4 +165,13 @@ ControlList CameraLens::getControls(const std::vector<uint32_t> &ids)
return subdev_->getControls(ids);
}
+ControlList CameraLens::getVolatileControls()
+{
+ std::vector<uint32_t> ids;
+
+ ids = subdev_->getVolatileControlIds();
+
+ return subdev_->getControls(ids);
+}
+
} /* namespace libcamera */
--
2.25.1
More information about the libcamera-devel
mailing list