summaryrefslogtreecommitdiff
path: root/test/v4l2_videodevice
diff options
context:
space:
mode:
Diffstat (limited to 'test/v4l2_videodevice')
-rw-r--r--test/v4l2_videodevice/buffer_sharing.cpp9
-rw-r--r--test/v4l2_videodevice/capture_async.cpp9
2 files changed, 8 insertions, 10 deletions
diff --git a/test/v4l2_videodevice/buffer_sharing.cpp b/test/v4l2_videodevice/buffer_sharing.cpp
index cc724b22..da052f34 100644
--- a/test/v4l2_videodevice/buffer_sharing.cpp
+++ b/test/v4l2_videodevice/buffer_sharing.cpp
@@ -117,11 +117,10 @@ protected:
capture_->bufferReady.connect(this, &BufferSharingTest::captureBufferReady);
output_->bufferReady.connect(this, &BufferSharingTest::outputBufferReady);
- /* Queue all the buffers to the capture device. */
- for (Buffer &buffer : pool_.buffers()) {
- if (capture_->queueBuffer(&buffer))
- return TestFail;
- }
+ std::vector<std::unique_ptr<Buffer>> buffers;
+ buffers = capture_->queueAllBuffers();
+ if (buffers.empty())
+ return TestFail;
ret = capture_->streamOn();
if (ret) {
diff --git a/test/v4l2_videodevice/capture_async.cpp b/test/v4l2_videodevice/capture_async.cpp
index cea4fffb..4909f71a 100644
--- a/test/v4l2_videodevice/capture_async.cpp
+++ b/test/v4l2_videodevice/capture_async.cpp
@@ -46,11 +46,10 @@ protected:
capture_->bufferReady.connect(this, &CaptureAsyncTest::receiveBuffer);
- /* Queue all the buffers to the device. */
- for (Buffer &b : pool_.buffers()) {
- if (capture_->queueBuffer(&b))
- return TestFail;
- }
+ std::vector<std::unique_ptr<Buffer>> buffers;
+ buffers = capture_->queueAllBuffers();
+ if (buffers.empty())
+ return TestFail;
ret = capture_->streamOn();
if (ret)