[libcamera-devel,1/5] libcamera: pipeline: simple: Improve debug message on config failure
diff mbox series

Message ID 20220504132154.9681-2-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • libcamera: pipeline: simple: Support scaling on the camea sensor
Related show

Commit Message

Laurent Pinchart May 4, 2022, 1:21 p.m. UTC
When pipeline configuration fails, print the format returned by the
kernel in addition to the one requested by libcamera, to ease debugging.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/libcamera/pipeline/simple/simple.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index 76bd228b5aba..22efc8f498dc 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -939,7 +939,8 @@  int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)
 	    captureFormat.size != pipeConfig->captureSize) {
 		LOG(SimplePipeline, Error)
 			<< "Unable to configure capture in "
-			<< pipeConfig->captureSize << "-" << videoFormat;
+			<< pipeConfig->captureSize << "-" << videoFormat
+			<< " (got " << captureFormat << ")";
 		return -EINVAL;
 	}