This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:
Subject: v4l2-ctl: make format enumeration output more compact Author: Hans Verkuil <hans.verk...@cisco.com> Date: Tue Jul 3 10:02:37 2018 +0200 Enumerating formats gave a quite verbose output. Make it more concise while still reporting the same information. Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> utils/v4l2-ctl/v4l2-ctl-vidcap.cpp | 12 +++++------- utils/v4l2-ctl/v4l2-ctl.cpp | 12 +++++------- 2 files changed, 10 insertions(+), 14 deletions(-) --- http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=f3fada8812631fe8227de3217b78ad43c6642c70 diff --git a/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp b/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp index 8067cc33e161..25fc26596b14 100644 --- a/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp @@ -139,14 +139,13 @@ static void print_video_formats_ext(int fd, __u32 type) fmt.index = 0; fmt.type = type; + printf("\tType: %s\n\n", buftype2s(type).c_str()); while (test_ioctl(fd, VIDIOC_ENUM_FMT, &fmt) >= 0) { - printf("\tIndex : %d\n", fmt.index); - printf("\tType : %s\n", buftype2s(type).c_str()); - printf("\tPixel Format: '%s'", fcc2s(fmt.pixelformat).c_str()); + printf("\t[%d]: '%s' (%s", fmt.index, fcc2s(fmt.pixelformat).c_str(), + fmt.description); if (fmt.flags) - printf(" (%s)", fmtdesc2s(fmt.flags).c_str()); - printf("\n"); - printf("\tName : %s\n", fmt.description); + printf(", %s", fmtdesc2s(fmt.flags).c_str()); + printf(")\n"); frmsize.pixel_format = fmt.pixelformat; frmsize.index = 0; while (test_ioctl(fd, VIDIOC_ENUM_FRAMESIZES, &frmsize) >= 0) { @@ -163,7 +162,6 @@ static void print_video_formats_ext(int fd, __u32 type) } frmsize.index++; } - printf("\n"); fmt.index++; } } diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp index 55b52b9b3e4e..ea62c01ed717 100644 --- a/utils/v4l2-ctl/v4l2-ctl.cpp +++ b/utils/v4l2-ctl/v4l2-ctl.cpp @@ -514,15 +514,13 @@ void print_video_formats(int fd, __u32 type) memset(&fmt, 0, sizeof(fmt)); fmt.type = type; + printf("\tType: %s\n\n", buftype2s(type).c_str()); while (test_ioctl(fd, VIDIOC_ENUM_FMT, &fmt) >= 0) { - printf("\tIndex : %d\n", fmt.index); - printf("\tType : %s\n", buftype2s(type).c_str()); - printf("\tPixel Format: '%s'", fcc2s(fmt.pixelformat).c_str()); + printf("\t[%d]: '%s' (%s", fmt.index, fcc2s(fmt.pixelformat).c_str(), + fmt.description); if (fmt.flags) - printf(" (%s)", fmtdesc2s(fmt.flags).c_str()); - printf("\n"); - printf("\tName : %s\n", fmt.description); - printf("\n"); + printf(", %s", fmtdesc2s(fmt.flags).c_str()); + printf(")\n"); fmt.index++; } } _______________________________________________ linuxtv-commits mailing list linuxtv-commits@linuxtv.org https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits