summaryrefslogtreecommitdiff
path: root/test/camera/configuration_set.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-04-30 21:16:28 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-04-30 22:18:42 +0300
commita2dddf7c26df3307b9d4554c25387a00687a6234 (patch)
treebe4004bb072d39d471ee790069e3f74d1cd5bbe0 /test/camera/configuration_set.cpp
parentbaad55d00975f8931d51c333def20472457dc943 (diff)
libcamera: Use the Size class through libcamera
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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'test/camera/configuration_set.cpp')
-rw-r--r--test/camera/configuration_set.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/camera/configuration_set.cpp b/test/camera/configuration_set.cpp
index 5ac2a7a9..0c932bc1 100644
--- a/test/camera/configuration_set.cpp
+++ b/test/camera/configuration_set.cpp
@@ -64,8 +64,8 @@ protected:
* the default configuration of the VIMC camera is known to
* work.
*/
- sconf->width *= 2;
- sconf->height *= 2;
+ sconf->size.width *= 2;
+ sconf->size.height *= 2;
if (camera_->configureStreams(conf)) {
cout << "Failed to set modified configuration" << endl;
return TestFail;
@@ -74,8 +74,7 @@ protected:
/*
* Test that setting an invalid configuration fails.
*/
- sconf->width = 0;
- sconf->height = 0;
+ sconf->size = { 0, 0 };
if (!camera_->configureStreams(conf)) {
cout << "Invalid configuration incorrectly accepted" << endl;
return TestFail;