[libcamera-devel] [PATCH v2 2/2] android: Log stream types using PixelFormat::toString()
Hirokazu Honda
hiroh at chromium.org
Thu Nov 25 14:15:41 CET 2021
Hi Umang, thank you for the patch.
On Thu, Nov 25, 2021 at 10:12 PM Umang Jain <umang.jain at ideasonboard.com> wrote:
>
> Log stream types using PixelFormat::toString() instead of hex values,
> since that is more human readable.
>
> Signed-off-by: Umang Jain <umang.jain at ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh at chromium.org>
> ---
> src/android/camera_capabilities.cpp | 5 +++--
> src/android/camera_device.cpp | 2 +-
> 2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
> index f357902e..71f302c4 100644
> --- a/src/android/camera_capabilities.cpp
> +++ b/src/android/camera_capabilities.cpp
> @@ -713,7 +713,8 @@ int CameraCapabilities::initializeStreamConfigurations()
> LOG(HAL, Debug) << "Collected stream configuration map: ";
> for (const auto &entry : streamConfigurations_)
> LOG(HAL, Debug) << "{ " << entry.resolution.toString() << " - "
> - << utils::hex(entry.androidFormat) << " }";
> + << toPixelFormat(entry.androidFormat).toString()
> + << " }";
>
> return 0;
> }
> @@ -1303,7 +1304,7 @@ int CameraCapabilities::initializeStaticMetadata()
> minFrameDurations.push_back(entry.minFrameDurationNsec);
>
> LOG(HAL, Debug)
> - << "Output Stream: " << utils::hex(entry.androidFormat)
> + << "Output Stream: " << toPixelFormat(entry.androidFormat).toString()
> << " (" << entry.resolution.toString() << ")["
> << entry.minFrameDurationNsec << "]"
> << "@" << fps;
> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> index ad4bf07c..cc6dccc1 100644
> --- a/src/android/camera_device.cpp
> +++ b/src/android/camera_device.cpp
> @@ -566,7 +566,7 @@ int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list)
> << ", direction: " << directionToString(stream->stream_type)
> << ", width: " << stream->width
> << ", height: " << stream->height
> - << ", format: " << utils::hex(stream->format)
> + << ", format: " << format.toString()
> << ", rotation: " << rotationToString(stream->rotation)
> #if defined(OS_CHROMEOS)
> << ", crop_rotate_scale_degrees: "
> --
> 2.31.0
>
More information about the libcamera-devel
mailing list