libcamera: v4l2_controls: Use the ControlRange class for control info

Use the ControlRange class to express the range of a V4L2 control,
replacing the open-coded minimum and maximum fields in the
V4L2ControlInfo class.

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:
Laurent Pinchart
2019-09-28 17:36:05 +03:00
parent 186ae04c0c
commit 28535ea1a2
4 changed files with 14 additions and 17 deletions
+2 -4
View File
@@ -30,8 +30,7 @@ public:
size_t size() const { return size_; }
const std::string &name() const { return name_; }
int64_t min() const { return min_; }
int64_t max() const { return max_; }
const ControlRange &range() const { return range_; }
private:
unsigned int id_;
@@ -39,8 +38,7 @@ private:
size_t size_;
std::string name_;
int64_t min_;
int64_t max_;
ControlRange range_;
};
using V4L2ControlInfoMap = std::map<unsigned int, V4L2ControlInfo>;