pipeline: simple: Improve debug log in validate()
diff mbox series

Message ID 20250722102538.52706-1-uajain@igalia.com
State New
Headers show
Series
  • pipeline: simple: Improve debug log in validate()
Related show

Commit Message

Umang Jain July 22, 2025, 10:25 a.m. UTC
Improve the debug log while adjusting the StreamConfiguration's
pixel format. The log should clearly indicate the requested pixel
format and the adjusted pixel format.

Signed-off-by: Umang Jain <uajain@igalia.com>
---
 src/libcamera/pipeline/simple/simple.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Kieran Bingham July 22, 2025, 10:34 a.m. UTC | #1
Quoting Umang Jain (2025-07-22 11:25:38)
> Improve the debug log while adjusting the StreamConfiguration's
> pixel format. The log should clearly indicate the requested pixel
> format and the adjusted pixel format.
> 
> Signed-off-by: Umang Jain <uajain@igalia.com>

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> ---
>  src/libcamera/pipeline/simple/simple.cpp | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
> index efb07051..492da967 100644
> --- a/src/libcamera/pipeline/simple/simple.cpp
> +++ b/src/libcamera/pipeline/simple/simple.cpp
> @@ -1204,7 +1204,9 @@ CameraConfiguration::Status SimpleCameraConfiguration::validate()
>  
>                 PixelFormat pixelFormat = *it;
>                 if (cfg.pixelFormat != pixelFormat) {
> -                       LOG(SimplePipeline, Debug) << "Adjusting pixel format";
> +                       LOG(SimplePipeline, Debug)
> +                               << "Adjusting pixel format from "
> +                               << cfg.pixelFormat << " to " << pixelFormat;
>                         cfg.pixelFormat = pixelFormat;
>                         status = Adjusted;
>                 }
> -- 
> 2.50.0
>

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index efb07051..492da967 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -1204,7 +1204,9 @@  CameraConfiguration::Status SimpleCameraConfiguration::validate()
 
 		PixelFormat pixelFormat = *it;
 		if (cfg.pixelFormat != pixelFormat) {
-			LOG(SimplePipeline, Debug) << "Adjusting pixel format";
+			LOG(SimplePipeline, Debug)
+				<< "Adjusting pixel format from "
+				<< cfg.pixelFormat << " to " << pixelFormat;
 			cfg.pixelFormat = pixelFormat;
 			status = Adjusted;
 		}