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:
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user