summaryrefslogtreecommitdiff
path: root/test/camera/buffer_import.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/camera/buffer_import.cpp')
-rw-r--r--test/camera/buffer_import.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp
index 9cac19d8..bbc5a25c 100644
--- a/test/camera/buffer_import.cpp
+++ b/test/camera/buffer_import.cpp
@@ -155,7 +155,16 @@ public:
}
bool done() const { return done_; }
- const V4L2DeviceFormat &format() const { return format_; }
+
+ PixelFormat format() const
+ {
+ return video_->toPixelFormat(format_.fourcc);
+ }
+
+ const Size &size() const
+ {
+ return format_.size;
+ }
Signal<uint64_t, int> requestReady;
@@ -314,11 +323,9 @@ protected:
return TestFail;
}
- const V4L2DeviceFormat &format = sink_.format();
-
StreamConfiguration &cfg = config->at(0);
- cfg.size = format.size;
- cfg.pixelFormat = format.fourcc;
+ cfg.size = sink_.size();
+ cfg.pixelFormat = sink_.format();
cfg.bufferCount = CAMERA_BUFFER_COUNT;
cfg.memoryType = ExternalMemory;