[libcamera-devel] [PATCH 2/2] libcamera: pipeline: vivid: Print diagnostic on configuration failure
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Tue Nov 3 14:30:42 CET 2020
In case the setFormat() call on the video device fails to match the
configuration, print both the requested and actual configurations to
ease debugging.
Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
src/libcamera/pipeline/vivid/vivid.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/libcamera/pipeline/vivid/vivid.cpp b/src/libcamera/pipeline/vivid/vivid.cpp
index bf8f82af981f..a0ccbd1e711e 100644
--- a/src/libcamera/pipeline/vivid/vivid.cpp
+++ b/src/libcamera/pipeline/vivid/vivid.cpp
@@ -181,8 +181,13 @@ int PipelineHandlerVivid::configure(Camera *camera, CameraConfiguration *config)
return ret;
if (format.size != cfg.size ||
- format.fourcc != data->video_->toV4L2PixelFormat(cfg.pixelFormat))
+ format.fourcc != data->video_->toV4L2PixelFormat(cfg.pixelFormat)) {
+ LOG(VIVID, Error)
+ << "Requested " << cfg.toString() << ", got "
+ << format.size.toString() << "-"
+ << format.fourcc.toString();
return -EINVAL;
+ }
/* Set initial controls specific to VIVID */
ControlList controls(data->video_->controls());
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list