summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/vimc.cpp
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2019-02-07 20:56:08 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2019-02-13 15:50:09 +0000
commit03fcc154eb0599e02276c9f64fce46b643104e20 (patch)
treebbfc93f26253b149263ab057bc79a44c5f3866e8 /src/libcamera/pipeline/vimc.cpp
parent3e354b00b43fc9fe71972ba2adfcc5883b924cad (diff)
libcamera: v4l2_device: Simplify exportBuffers()
exportBuffers() can only operate on an existing BufferPool allocation. The pool identifies its size through its .count() method. Passing a count in to the exportBuffers() call is redundant and can be incorrect if the value is not the same as the BufferPool size. Simplify the function and remove the unnecessary argument, correcting all uses throughout the code base. While we're here, remove the createBuffers() helper from the V4L2DeviceTest which only served to obfuscate which pool the buffers were being allocated for. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/vimc.cpp')
-rw-r--r--src/libcamera/pipeline/vimc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp
index 46840a4f..543ff212 100644
--- a/src/libcamera/pipeline/vimc.cpp
+++ b/src/libcamera/pipeline/vimc.cpp
@@ -101,7 +101,7 @@ int PipelineHandlerVimc::allocateBuffers(Camera *camera, Stream *stream)
LOG(VIMC, Debug) << "Requesting " << cfg.bufferCount << " buffers";
- return video_->exportBuffers(cfg.bufferCount, &stream->bufferPool());
+ return video_->exportBuffers(&stream->bufferPool());
}
int PipelineHandlerVimc::freeBuffers(Camera *camera, Stream *stream)