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 <laurent.pinchart@ideasonboard.com>
Tested-by: Phi-Bang Nguyen <pnguyen@baylibre.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
This commit is contained in:
Laurent Pinchart
2020-12-26 23:45:04 +02:00
parent 3e743ee8eb
commit 4502635b72
3 changed files with 12 additions and 5 deletions
+2 -1
View File
@@ -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;