libcamera: v4l2_device: Simplify usage of getControls()
The V4L2Device::getControls() function takes a ControlList that needs to be pre-populated with dummy entries for the controls that need to be read. This is a cumbersome API, especially when reading a single control. Make it nicer by passing the list of V4L2 controls as a vector of control IDs, and returning a ControlList. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
@@ -43,7 +43,7 @@ public:
|
||||
int setFormat(V4L2SubdeviceFormat *format);
|
||||
|
||||
const ControlInfoMap &controls() const;
|
||||
int getControls(ControlList *ctrls);
|
||||
ControlList getControls(const std::vector<uint32_t> &ids);
|
||||
int setControls(ControlList *ctrls);
|
||||
|
||||
const ControlList &properties() const { return properties_; }
|
||||
|
||||
Reference in New Issue
Block a user