[libcamera-devel,11/16] android: capabilities: Print output stream list
diff mbox series

Message ID 20210827120757.110615-12-jacopo@jmondi.org
State Superseded
Headers show
Series
  • IPU3 control info update and HAL frame durations
Related show

Commit Message

Jacopo Mondi Aug. 27, 2021, 12:07 p.m. UTC
Add a debug statement to print out the list of collected output stream
and their characteristics.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 src/android/camera_capabilities.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Paul Elder Sept. 1, 2021, 7:26 a.m. UTC | #1
Hi Jacopo,

On Fri, Aug 27, 2021 at 02:07:52PM +0200, Jacopo Mondi wrote:
> Add a debug statement to print out the list of collected output stream

s/stream/streams/

> and their characteristics.
> 
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
> ---
>  src/android/camera_capabilities.cpp | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
> index c1ce63018aa8..484242d0ad81 100644
> --- a/src/android/camera_capabilities.cpp
> +++ b/src/android/camera_capabilities.cpp
> @@ -1277,6 +1277,13 @@ int CameraCapabilities::initializeStaticMetadata()
>  		availableStreamConfigurations.push_back(entry.resolution.height);
>  		availableStreamConfigurations.push_back(
>  			ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT);
> +
> +		LOG(HAL, Debug)
> +			<< "Output Stream:" << utils::hex(entry.androidFormat)
> +			<< "(" << entry.resolution.width << "x"

Would s/:/: / and s/(/ (/ look better?


Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>

> +			<< entry.resolution.height << ")["
> +			<< entry.minFrameDurationNsec << "]"
> +			<< "@" << fps;
>  	}
>  	staticMetadata_->addEntry(ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS,
>  				  availableStreamConfigurations);
> -- 
> 2.32.0
>
Umang Jain Sept. 1, 2021, 8:55 a.m. UTC | #2
Hi Jacopo,

On 8/27/21 5:37 PM, Jacopo Mondi wrote:
> Add a debug statement to print out the list of collected output stream
> and their characteristics.
>
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>


Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>

> ---
>   src/android/camera_capabilities.cpp | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
> index c1ce63018aa8..484242d0ad81 100644
> --- a/src/android/camera_capabilities.cpp
> +++ b/src/android/camera_capabilities.cpp
> @@ -1277,6 +1277,13 @@ int CameraCapabilities::initializeStaticMetadata()
>   		availableStreamConfigurations.push_back(entry.resolution.height);
>   		availableStreamConfigurations.push_back(
>   			ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT);
> +
> +		LOG(HAL, Debug)
> +			<< "Output Stream:" << utils::hex(entry.androidFormat)
> +			<< "(" << entry.resolution.width << "x"
> +			<< entry.resolution.height << ")["
> +			<< entry.minFrameDurationNsec << "]"
> +			<< "@" << fps;
>   	}
>   	staticMetadata_->addEntry(ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS,
>   				  availableStreamConfigurations);

Patch
diff mbox series

diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
index c1ce63018aa8..484242d0ad81 100644
--- a/src/android/camera_capabilities.cpp
+++ b/src/android/camera_capabilities.cpp
@@ -1277,6 +1277,13 @@  int CameraCapabilities::initializeStaticMetadata()
 		availableStreamConfigurations.push_back(entry.resolution.height);
 		availableStreamConfigurations.push_back(
 			ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT);
+
+		LOG(HAL, Debug)
+			<< "Output Stream:" << utils::hex(entry.androidFormat)
+			<< "(" << entry.resolution.width << "x"
+			<< entry.resolution.height << ")["
+			<< entry.minFrameDurationNsec << "]"
+			<< "@" << fps;
 	}
 	staticMetadata_->addEntry(ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS,
 				  availableStreamConfigurations);