libcamera: pipeline: simple: converter: Improve error message

When the configuration of the converter fails due to format mismatch,
the error messages only indicates that a failure occurred. Improve it to
ease debugging by printing the requested and obtained formats.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
This commit is contained in:
Laurent Pinchart
2021-06-26 03:22:04 +03:00
parent 535820fe51
commit 12809ff171

View File

@@ -64,7 +64,9 @@ int SimpleConverter::Stream::configure(const StreamConfiguration &inputCfg,
if (format.fourcc != videoFormat || format.size != inputCfg.size ||
format.planes[0].bpl != inputCfg.stride) {
LOG(SimplePipeline, Error)
<< "Input format not supported";
<< "Input format not supported (requested "
<< inputCfg.size.toString() << "-" << videoFormat.toString()
<< ", got " << format.toString() << ")";
return -EINVAL;
}