[libcamera-devel] [PATCH v3 4/8] libcamera: v4l2_subdevice: Update crop/compose rectangle
Jacopo Mondi
jacopo at jmondi.org
Tue Feb 26 17:26:37 CET 2019
Update the crop/compose rectangle provided to setCrop()/setCompose()
methods with the rectangle sizes set by the device driver after a
S_SELECTION ioctl operation.
Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
src/libcamera/v4l2_subdevice.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
index f81a521f9e2a..a043a07ff156 100644
--- a/src/libcamera/v4l2_subdevice.cpp
+++ b/src/libcamera/v4l2_subdevice.cpp
@@ -385,6 +385,11 @@ int V4L2Subdevice::setSelection(unsigned int pad, unsigned int target,
return ret;
}
+ rect->y = sel.r.left;
+ rect->x = sel.r.top;
+ rect->w = sel.r.width;
+ rect->h = sel.r.height;
+
return 0;
}
--
2.20.1
More information about the libcamera-devel
mailing list