summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2020-04-20 10:32:45 +0200
committerJacopo Mondi <jacopo@jmondi.org>2020-04-26 17:12:42 +0200
commit96653be72831e9d26e5d6076ebb6be98a51a3124 (patch)
tree4a14e2efb82c703c0db676cb73b384991a7aca55 /src
parent66a1928a0a7a14c19f10d8fd09980258912f515e (diff)
libcamera: geometry: Rename Rectangle fields
The Rectangle class members that represents the rectangle horizontal and vertical sizes are named 'w' and 'h', in contrast with the Size and SizeRange classes which use 'width' and 'height', resulting in having to look at class definition every time to know which names to use. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/geometry.cpp8
-rw-r--r--src/libcamera/pipeline/ipu3/ipu3.cpp4
-rw-r--r--src/libcamera/v4l2_subdevice.cpp8
-rw-r--r--src/libcamera/v4l2_videodevice.cpp8
4 files changed, 14 insertions, 14 deletions
diff --git a/src/libcamera/geometry.cpp b/src/libcamera/geometry.cpp
index 13f642be..fd78cf2c 100644
--- a/src/libcamera/geometry.cpp
+++ b/src/libcamera/geometry.cpp
@@ -40,12 +40,12 @@ namespace libcamera {
*/
/**
- * \var Rectangle::w
+ * \var Rectangle::width
* \brief The distance between the left and right sides
*/
/**
- * \var Rectangle::h
+ * \var Rectangle::height
* \brief The distance between the top and bottom sides
*/
@@ -57,7 +57,7 @@ const std::string Rectangle::toString() const
{
std::stringstream ss;
- ss << "(" << x << "x" << y << ")/" << w << "x" << h;
+ ss << "(" << x << "x" << y << ")/" << width << "x" << height;
return ss.str();
}
@@ -69,7 +69,7 @@ const std::string Rectangle::toString() const
bool operator==(const Rectangle &lhs, const Rectangle &rhs)
{
return lhs.x == rhs.x && lhs.y == rhs.y &&
- lhs.w == rhs.w && lhs.h == rhs.h;
+ lhs.width == rhs.width && lhs.height == rhs.height;
}
/**
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 36ac571a..b4590015 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -1132,8 +1132,8 @@ int ImgUDevice::configureInput(const Size &size,
Rectangle rect = {
.x = 0,
.y = 0,
- .w = inputFormat->size.width,
- .h = inputFormat->size.height,
+ .width = inputFormat->size.width,
+ .height = inputFormat->size.height,
};
ret = imgu_->setCrop(PAD_INPUT, &rect);
if (ret)
diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
index c28e591b..5a479a96 100644
--- a/src/libcamera/v4l2_subdevice.cpp
+++ b/src/libcamera/v4l2_subdevice.cpp
@@ -355,8 +355,8 @@ int V4L2Subdevice::setSelection(unsigned int pad, unsigned int target,
sel.r.left = rect->x;
sel.r.top = rect->y;
- sel.r.width = rect->w;
- sel.r.height = rect->h;
+ sel.r.width = rect->width;
+ sel.r.height = rect->height;
int ret = ioctl(VIDIOC_SUBDEV_S_SELECTION, &sel);
if (ret < 0) {
@@ -368,8 +368,8 @@ int V4L2Subdevice::setSelection(unsigned int pad, unsigned int target,
rect->x = sel.r.left;
rect->y = sel.r.top;
- rect->w = sel.r.width;
- rect->h = sel.r.height;
+ rect->width = sel.r.width;
+ rect->height = sel.r.height;
return 0;
}
diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
index 18a71e4f..fae4f078 100644
--- a/src/libcamera/v4l2_videodevice.cpp
+++ b/src/libcamera/v4l2_videodevice.cpp
@@ -1127,8 +1127,8 @@ int V4L2VideoDevice::setSelection(unsigned int target, Rectangle *rect)
sel.r.left = rect->x;
sel.r.top = rect->y;
- sel.r.width = rect->w;
- sel.r.height = rect->h;
+ sel.r.width = rect->width;
+ sel.r.height = rect->height;
int ret = ioctl(VIDIOC_S_SELECTION, &sel);
if (ret < 0) {
@@ -1139,8 +1139,8 @@ int V4L2VideoDevice::setSelection(unsigned int target, Rectangle *rect)
rect->x = sel.r.left;
rect->y = sel.r.top;
- rect->w = sel.r.width;
- rect->h = sel.r.height;
+ rect->width = sel.r.width;
+ rect->height = sel.r.height;
return 0;
}