libcamera: pipeline: simple: Add stride support

Report the stride when configuring the camera. The stride is retrieved
from the capture device first, and overridden by the converter if used.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Laurent Pinchart
2020-05-19 19:46:15 +03:00
parent 09eeec1520
commit 5331051c35
3 changed files with 13 additions and 9 deletions
+3 -2
View File
@@ -549,12 +549,13 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)
return -EINVAL;
}
cfg.stride = captureFormat.planes[0].bpl;
/* Configure the converter if required. */
useConverter_ = config->needConversion();
if (useConverter_) {
int ret = converter_->configure(pipeConfig.pixelFormat,
cfg.pixelFormat, cfg.size);
int ret = converter_->configure(pipeConfig.pixelFormat, &cfg);
if (ret < 0) {
LOG(SimplePipeline, Error)
<< "Unable to configure converter";