diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-11-03 15:30:42 +0200 |
---|---|---|
committer | Barnabás Pőcze <pobrn@protonmail.com> | 2025-02-21 16:20:40 +0100 |
commit | 8dc4f3d1ad194b0e26a78e871766ede6dc3e1810 (patch) | |
tree | 95e721900c23014d2669874d568f777cc443595b | |
parent | f510994b3fcbe79525eb028360b088ff7f255472 (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 3c4755a6..6371d7ae 100644 --- a/src/libcamera/pipeline/vivid/vivid.cpp +++ b/src/libcamera/pipeline/vivid/vivid.cpp @@ -188,8 +188,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 << ", got " + << format.size << "-" + << format.fourcc; return -EINVAL; + } /* Set initial controls specific to VIVID */ ControlList controls(data->video_->controls()); |