diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-11-03 15:30:42 +0200 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2022-11-01 18:09:18 +0000 |
commit | 9c5af1f556d8823539af481fe4409454b9d6aff2 (patch) | |
tree | a1bd60eb9ccf5c382d405f2c31b33a2cc6e56a4e /src | |
parent | 2d578dc4c0e22a7647baa2a640722845ad35ab97 (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>
Diffstat (limited to 'src')
-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 b17a403b..64d9aaef 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()); |