summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-11-03 15:30:42 +0200
committerKieran Bingham <kieran.bingham@ideasonboard.com>2023-06-29 11:40:25 +0100
commit89f3eea5c4f4ef4b429dbc36172f85848171ac9d (patch)
treed48bcae86c8a60c9066f2339bebab18e05b1641e
parent3fcd71595638e25e1c4f496e173c89a48e337612 (diff)
libcamera: pipeline: vivid: Print diagnostic on configuration failure
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@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--src/libcamera/pipeline/vivid/vivid.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/vivid/vivid.cpp b/src/libcamera/pipeline/vivid/vivid.cpp
index 93bb8177..62b8f3c4 100644
--- a/src/libcamera/pipeline/vivid/vivid.cpp
+++ b/src/libcamera/pipeline/vivid/vivid.cpp
@@ -195,8 +195,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());