[v1,14/33] libcamera: converter_v4l2_m2m: Add debug logging for formats
diff mbox series

Message ID 20250930122726.1837524-15-stefan.klug@ideasonboard.com
State New
Headers show
Series
  • Full dewarper support on imx8mp
Related show

Commit Message

Stefan Klug Sept. 30, 2025, 12:26 p.m. UTC
Getting the requested input/output format is crucial for debugging. Add
log statements for that.

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
---
 src/libcamera/converter/converter_v4l2_m2m.cpp | 2 ++
 1 file changed, 2 insertions(+)

Comments

Kieran Bingham Sept. 30, 2025, 1:42 p.m. UTC | #1
Quoting Stefan Klug (2025-09-30 13:26:35)
> Getting the requested input/output format is crucial for debugging. Add
> log statements for that.
> 

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

> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
> ---
>  src/libcamera/converter/converter_v4l2_m2m.cpp | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/libcamera/converter/converter_v4l2_m2m.cpp b/src/libcamera/converter/converter_v4l2_m2m.cpp
> index 82e6d56e3d5c..43379b31881d 100644
> --- a/src/libcamera/converter/converter_v4l2_m2m.cpp
> +++ b/src/libcamera/converter/converter_v4l2_m2m.cpp
> @@ -111,6 +111,7 @@ int V4L2M2MConverter::V4L2M2MStream::configure(const StreamConfiguration &inputC
>         format.planesCount = 1;
>         format.planes[0].bpl = inputCfg.stride;
>  
> +       LOG(Converter, Debug) << "Set input format to: " << format;
>         int ret = m2m_->output()->setFormat(&format);
>         if (ret < 0) {
>                 LOG(Converter, Error)
> @@ -133,6 +134,7 @@ int V4L2M2MConverter::V4L2M2MStream::configure(const StreamConfiguration &inputC
>         format.fourcc = videoFormat;
>         format.size = outputCfg.size;
>  
> +       LOG(Converter, Debug) << "Set output format to: " << format;
>         ret = m2m_->capture()->setFormat(&format);
>         if (ret < 0) {
>                 LOG(Converter, Error)
> -- 
> 2.48.1
>

Patch
diff mbox series

diff --git a/src/libcamera/converter/converter_v4l2_m2m.cpp b/src/libcamera/converter/converter_v4l2_m2m.cpp
index 82e6d56e3d5c..43379b31881d 100644
--- a/src/libcamera/converter/converter_v4l2_m2m.cpp
+++ b/src/libcamera/converter/converter_v4l2_m2m.cpp
@@ -111,6 +111,7 @@  int V4L2M2MConverter::V4L2M2MStream::configure(const StreamConfiguration &inputC
 	format.planesCount = 1;
 	format.planes[0].bpl = inputCfg.stride;
 
+	LOG(Converter, Debug) << "Set input format to: " << format;
 	int ret = m2m_->output()->setFormat(&format);
 	if (ret < 0) {
 		LOG(Converter, Error)
@@ -133,6 +134,7 @@  int V4L2M2MConverter::V4L2M2MStream::configure(const StreamConfiguration &inputC
 	format.fourcc = videoFormat;
 	format.size = outputCfg.size;
 
+	LOG(Converter, Debug) << "Set output format to: " << format;
 	ret = m2m_->capture()->setFormat(&format);
 	if (ret < 0) {
 		LOG(Converter, Error)