diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-11-03 15:30:42 +0200 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2021-12-08 14:56:21 +0000 |
commit | e408c430b96ef72b25eeb9d9c47b86fca896506b (patch) | |
tree | c5c7ce9d4753b9d16198e03747401f5303d8a121 | |
parent | 1462c5687ec4368f8cb3dfa2646d3b1c65124d54 (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.cpp | 7 |
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()); |