From 4502635b721ae5d8c36ab98a04879ae73da51ca3 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 26 Dec 2020 23:45:04 +0200 Subject: libcamera: pipeline: simple: converter: Differentiate input and output buffers count The number of buffers on the input and output of the converter don't necessarily need to match. Use the buffer count from the input and output configuration respectively. This removes the need to pass the buffer count to the start() function, which brings it closer to the pipeline handler API. Signed-off-by: Laurent Pinchart Tested-by: Phi-Bang Nguyen Reviewed-by: Kieran Bingham Reviewed-by: Paul Elder --- src/libcamera/pipeline/simple/simple.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libcamera/pipeline/simple/simple.cpp') diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp index 2f6dff16..4a1f2052 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp @@ -607,6 +607,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c) inputCfg.pixelFormat = pipeConfig.pixelFormat; inputCfg.size = pipeConfig.captureSize; inputCfg.stride = captureFormat.planes[0].bpl; + inputCfg.bufferCount = cfg.bufferCount; ret = converter_->configure(inputCfg, cfg); if (ret < 0) { @@ -660,7 +661,7 @@ int SimplePipelineHandler::start(Camera *camera, [[maybe_unused]] const ControlL } if (useConverter_) { - ret = converter_->start(count); + ret = converter_->start(); if (ret < 0) { stop(camera); return ret; -- cgit v1.2.1