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>2021-09-09 14:01:14 +0100
commit9445243a4e5371e7270f6598aab96eabf31f950d (patch)
tree69a1b452b69c5b1ee61bae3952e52ff0544c8ea6
parent40bef01de0ed1159d99d8e6ec8edfcc025eb74a7 (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 19cac475..c3fb9360 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 != V4L2PixelFormat::fromPixelFormat(cfg.pixelFormat))
+ format.fourcc != V4L2PixelFormat::fromPixelFormat(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());