[PATCH v2 2/2] apps: cam: Print control array sizes
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed Sep 11 18:29:25 CEST 2024
Hi Paul,
Thank you for the patch.
On Wed, Sep 11, 2024 at 06:24:00PM +0200, Paul Elder wrote:
> Now that controls can be queried for array information, print it in
> --list-controls when applicable.
>
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
> Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
>
> ---
> No change in v2
> ---
> src/apps/cam/camera_session.cpp | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/src/apps/cam/camera_session.cpp b/src/apps/cam/camera_session.cpp
> index 37de6c9f3..9c7f84993 100644
> --- a/src/apps/cam/camera_session.cpp
> +++ b/src/apps/cam/camera_session.cpp
> @@ -169,6 +169,11 @@ void CameraSession::listControls() const
> std::cout << " - " << id->enumToString(val) << " (" << val << ")" << std::endl;
> }
> }
> +
> + if (id->isArray()) {
> + std::size_t size = id->size();
> + std::cout << " Size: " << (size == std::numeric_limits<std::size_t>::max() ? "n" : std::to_string(size)) << std::endl;
Too long. With that fixed,
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> + }
> }
> }
>
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list