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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user