@@ -29,6 +29,8 @@ public:
ControlList getControls(const std::vector<uint32_t> &ids);
int setControls(ControlList *ctrls);
+ const struct v4l2_query_ext_ctrl *controlInfo(uint32_t id) const;
+
const std::string &deviceNode() const { return deviceNode_; }
std::string devicePath() const;
@@ -353,6 +353,21 @@ int V4L2Device::setControls(ControlList *ctrls)
return ret;
}
+/**
+ * \brief Retrieve the v4l2_query_ext_ctrl information for the given control
+ * \param[in] id The V4L2 control id
+ * \return A pointer to the v4l2_query_ext_ctrl structure for the given
+ * control, or a null pointer if not found
+ */
+const struct v4l2_query_ext_ctrl *V4L2Device::controlInfo(uint32_t id) const
+{
+ const auto it = controlInfo_.find(id);
+ if (it == controlInfo_.end())
+ return nullptr;
+
+ return &it->second;
+}
+
/**
* \brief Retrieve the device path in sysfs
*