From a2dddf7c26df3307b9d4554c25387a00687a6234 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 30 Apr 2019 21:16:28 +0300 Subject: libcamera: Use the Size class through libcamera MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Several of our structures include width and height fields that model a size while we have a Size class for that purpose. Use the Size class through libcamera, and give it a toString() method like other geometry and format classes. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/libcamera/camera_sensor.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/libcamera/camera_sensor.cpp') diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp index 8f2eab56..2b9d8fa5 100644 --- a/src/libcamera/camera_sensor.cpp +++ b/src/libcamera/camera_sensor.cpp @@ -234,8 +234,7 @@ V4L2SubdeviceFormat CameraSensor::getFormat(const std::vector &mbu return format; } - format.width = bestSize->width; - format.height = bestSize->height; + format.size = *bestSize; return format; } -- cgit v1.2.1