summaryrefslogtreecommitdiff
path: root/src/libcamera/v4l2_videodevice.cpp
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/libcamera/v4l2_videodevice.cpp
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/libcamera/v4l2_videodevice.cpp')
-rw-r--r--src/libcamera/v4l2_videodevice.cpp8
1 files changed, 4 insertions, 4 deletions
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;
}