@@ -148,6 +148,8 @@ private:
std::unique_ptr<V4L2Subdevice> crossbar_;
std::vector<Pipe> pipes_;
+
+ static constexpr unsigned int kBufferSlotCount = 16;
};
/* -----------------------------------------------------------------------------
@@ -820,9 +822,8 @@ int PipelineHandlerISI::start(Camera *camera,
for (const auto &stream : data->enabledStreams_) {
Pipe *pipe = pipeFromStream(camera, stream);
- const StreamConfiguration &config = stream->configuration();
- int ret = pipe->capture->importBuffers(config.bufferCount);
+ int ret = pipe->capture->importBuffers(kBufferSlotCount);
if (ret)
return ret;
Instead of using bufferCount as the number of V4L2 buffer slots to reserve in the isi pipeline handler, use a reasonably high constant: 16. Overallocating isn't a problem as buffer slots are cheap. Having too few, on the other hand, could degrade performance. It is expected that this number will be more than enough for most, if not all, use cases. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> --- New in v10 --- src/libcamera/pipeline/imx8-isi/imx8-isi.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)