mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-22 08:05:06 +03:00
libcamera: controls: Use explicit 32-bit integer types
Make the control API more explicit when dealing with integer controls by specifying the size. We already do so for 64-bit integers, using int64_t and ControlTypeInteger64, do the same for 32-bit integers. 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:
parent
224ef9776a
commit
dd37ef784e
7 changed files with 46 additions and 44 deletions
|
@ -21,7 +21,7 @@ class Camera;
|
|||
enum ControlType {
|
||||
ControlTypeNone,
|
||||
ControlTypeBool,
|
||||
ControlTypeInteger,
|
||||
ControlTypeInteger32,
|
||||
ControlTypeInteger64,
|
||||
};
|
||||
|
||||
|
@ -30,7 +30,7 @@ class ControlValue
|
|||
public:
|
||||
ControlValue();
|
||||
ControlValue(bool value);
|
||||
ControlValue(int value);
|
||||
ControlValue(int32_t value);
|
||||
ControlValue(int64_t value);
|
||||
|
||||
ControlType type() const { return type_; };
|
||||
|
@ -48,7 +48,7 @@ private:
|
|||
|
||||
union {
|
||||
bool bool_;
|
||||
int integer_;
|
||||
int32_t integer32_;
|
||||
int64_t integer64_;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue