From 30ca0fbd77544ed35391d382a3adc93eb371ffe4 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sat, 2 Jun 2012 14:07:51 +0200 Subject: [PATCH] v4l2-ctl: Make --help output fit in 80 columns Signed-off-by: Hans de Goede --- utils/v4l2-ctl/v4l2-ctl.cpp | 86 ++++++++++++++++++++++++++------------------- 1 file changed, 49 insertions(+), 37 deletions(-) diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp index 9fbeacf..2df49b7 100644 --- a/utils/v4l2-ctl/v4l2-ctl.cpp +++ b/utils/v4l2-ctl/v4l2-ctl.cpp @@ -367,15 +367,15 @@ static void usage_common(void) " -C, --get-ctrl=[,...]\n" " get the value of the controls [VIDIOC_G_EXT_CTRLS]\n" " -c, --set-ctrl==[,=...]\n" - " set the controls to the values specified [VIDIOC_S_EXT_CTRLS]\n" + " set the value of the controls [VIDIOC_S_EXT_CTRLS]\n" " -D, --info show driver info [VIDIOC_QUERYCAP]\n" " -d, --device= use device instead of /dev/video0\n" " if is a single digit, then /dev/video is used\n" " -h, --help display this help message\n" " -l, --list-ctrls display all controls and their values [VIDIOC_QUERYCTRL]\n" " -L, --list-ctrls-menus\n" - " display all controls, their values and the menus [VIDIOC_QUERYMENU]\n" - " -w, --wrapper use the libv4l2 wrapper library.\n" + " display all controls and their menus [VIDIOC_QUERYMENU]\n" + " -w, --wrapper use the libv4l2 wrapper library.\n" " --list-devices list all v4l devices\n" " --log-status log the board status in the kernel log [VIDIOC_LOG_STATUS]\n" " --get-priority query the current access priority [VIDIOC_G_PRIORITY]\n" @@ -383,7 +383,7 @@ static void usage_common(void) " set the new access priority [VIDIOC_S_PRIORITY]\n" " is 1 (background), 2 (interactive) or 3 (record)\n" " --silent only set the result code, do not print any messages\n" - " --sleep= sleep for seconds, call QUERYCAP and close the file handle\n" + " --sleep= sleep , call QUERYCAP and close the file handle\n" " --verbose turn on verbose ioctl status reporting\n" ); } @@ -415,7 +415,7 @@ static void usage_tuner(void) " perform a hardware frequency seek [VIDIOC_S_HW_FREQ_SEEK]\n" " dir is 0 (seek downward) or 1 (seek upward)\n" " wrap is 0 (do not wrap around) or 1 (wrap around)\n" - " spacing is 0 (use default seek resolution) or sets the seek resolution\n", + " spacing sets the seek resolution (use 0 for default)\n", tcap2bands(-1).c_str()); } @@ -453,22 +453,22 @@ static void usage_stds(void) " query the video standard [VIDIOC_G_STD]\n" " -s, --set-standard=\n" " set the video standard to [VIDIOC_S_STD]\n" - " can be a numerical v4l2_std value, or it can be one of:\n" - " pal-X (X = B/G/H/N/Nc/I/D/K/M/60) or just 'pal' (V4L2_STD_PAL)\n" - " ntsc-X (X = M/J/K) or just 'ntsc' (V4L2_STD_NTSC)\n" - " secam-X (X = B/G/H/D/K/L/Lc) or just 'secam' (V4L2_STD_SECAM)\n" + " a numerical v4l2_std value, or one of:\n" + " pal or pal-X (X = B/G/H/N/Nc/I/D/K/M/60) (V4L2_STD_PAL)\n" + " ntsc or ntsc-X (X = M/J/K) (V4L2_STD_NTSC)\n" + " secam or secam-X (X = B/G/H/D/K/L/Lc) (V4L2_STD_SECAM)\n" " --get-detected-standard\n" " display detected input video standard [VIDIOC_QUERYSTD]\n" - " --list-dv-presets list supported digital video presets [VIDIOC_ENUM_DV_PRESETS]\n" + " --list-dv-presets list supported dv presets [VIDIOC_ENUM_DV_PRESETS]\n" " --set-dv-preset=\n" " set the digital video preset to [VIDIOC_S_DV_PRESET]\n" " --get-dv-preset query the digital video preset in use [VIDIOC_G_DV_PRESET]\n" - " --query-dv-preset query the detected digital video preset [VIDIOC_QUERY_DV_PRESET]\n" - " --list-dv-timings list the standard supported digital video timings [VIDIOC_ENUM_DV_TIMINGS]\n" + " --query-dv-preset query the detected dv preset [VIDIOC_QUERY_DV_PRESET]\n" + " --list-dv-timings list supp. standard dv timings [VIDIOC_ENUM_DV_TIMINGS]\n" " --set-dv-bt-timings\n" " no arguments: use the output of VIDIOC_QUERY_DV_PRESET\n" - " index=: use the index as provided by --list-dv-presets\n" - " or give a fully specified timings:\n" + " index=: use the index as provided by\n" + " --list-dv-presets, or give a fully specified timings:\n" " width=,height=,interlaced=<0/1>,\n" " polarities=,pixelclock=,\n" " hfp=,hs=,\n" @@ -477,11 +477,12 @@ static void usage_stds(void) " il_vfp=,\n" " il_vs=,\n" " il_vbp=,\n" - " set the digital video timings according to the BT 656/1120 standard [VIDIOC_S_DV_TIMINGS]\n" + " set the digital video timings according to the BT 656/1120\n" + " standard [VIDIOC_S_DV_TIMINGS]\n" " --get-dv-timings get the digital video timings in use [VIDIOC_G_DV_TIMINGS]\n" - " --query-dv-timings query the detected digital video timings [VIDIOC_QUERY_DV_TIMINGS]\n" + " --query-dv-timings query the detected dv timings [VIDIOC_QUERY_DV_TIMINGS]\n" " --get-dv-timings-cap\n" - " get the digital video timings capabilities [VIDIOC_DV_TIMINGS_CAP]\n" + " get the dv timings capabilities [VIDIOC_DV_TIMINGS_CAP]\n" ); } @@ -490,7 +491,8 @@ static void usage_vidcap(void) printf("\nVideo Capture Formats options:\n" " --list-formats display supported video formats [VIDIOC_ENUM_FMT]\n" " --list-formats-mplane\n" - " display supported video multi-planar formats [VIDIOC_ENUM_FMT]\n" + " display supported video multi-planar formats\n" + " [VIDIOC_ENUM_FMT]\n" " --list-formats-ext display supported video formats including frame sizes\n" " and intervals\n" " --list-formats-ext-mplane\n" @@ -515,10 +517,12 @@ static void usage_vidcap(void) " pixelformat is either the format index as reported by\n" " --list-formats, or the fourcc value as a string\n" " --get-fmt-video-mplane\n" - " query the video capture format through the multi-planar API [VIDIOC_G_FMT]\n" + " query the video capture format through the multi-planar API\n" + " [VIDIOC_G_FMT]\n" " --set-fmt-video-mplane\n" " --try-fmt-video-mplane=width=,height=,pixelformat=\n" - " set/try the video capture format using the multi-planar API [VIDIOC_S/TRY_FMT]\n" + " set/try the video capture format using the multi-planar API\n" + " [VIDIOC_S/TRY_FMT]\n" " pixelformat is either the format index as reported by\n" " --list-formats-mplane, or the fourcc value as a string\n" ); @@ -536,12 +540,15 @@ static void usage_vidout(void) " pixelformat is either the format index as reported by\n" " --list-formats-out, or the fourcc value as a string\n" " --list-formats-out-mplane\n" - " display supported video output multi-planar formats [VIDIOC_ENUM_FMT]\n" + " display supported video output multi-planar formats\n" + " [VIDIOC_ENUM_FMT]\n" " --get-fmt-video-out-mplane\n" - " query the video output format using the multi-planar API [VIDIOC_G_FMT]\n" + " query the video output format using the multi-planar API\n" + " [VIDIOC_G_FMT]\n" " --set-fmt-video-out-mplane\n" " --try-fmt-video-out-mplane=width=,height=,pixelformat=\n" - " set/try the video output format with the multi-planar API [VIDIOC_S/TRY_FMT]\n" + " set/try the video output format with the multi-planar API\n" + " [VIDIOC_S/TRY_FMT]\n" " pixelformat is either the format index as reported by\n" " --list-formats-out-mplane, or the fourcc value as a string\n" ); @@ -561,13 +568,14 @@ static void usage_overlay(void) " --set-fmt-output-overlay\n" " --try-fmt-output-overlay=chromakey=,global_alpha=,\n" " top=,left=,width=,height=,field=\n" - " set/try the video or video output overlay format [VIDIOC_S/TRY_FMT]\n" - " can be one of:\n" - " any, none, top, bottom, interlaced, seq_tb, seq_bt, alternate,\n" - " interlaced_tb, interlaced_bt\n" + " set/try the video or video output overlay format\n" + " [VIDIOC_S/TRY_FMT], can be one of:\n" + " any, none, top, bottom, interlaced, seq_tb, seq_bt,\n" + " alternate, interlaced_tb, interlaced_bt\n" " --get-fbuf query the overlay framebuffer data [VIDIOC_G_FBUF]\n" - " --set-fbuf=chromakey=<0/1>,global_alpha=<0/1>,local_alpha=<0/1>,local_inv_alpha=<0/1>\n" + " --set-fbuf=chromakey=,global_alpha=,local_alpha=,local_inv_alpha=\n" " set the overlay framebuffer [VIDIOC_S_FBUF]\n" + " b = 0 or 1\n" ); } @@ -575,9 +583,11 @@ static void usage_vbi(void) { printf("\nVBI Formats options:\n" " --get-sliced-vbi-cap\n" - " query the sliced VBI capture capabilities [VIDIOC_G_SLICED_VBI_CAP]\n" + " query the sliced VBI capture capabilities\n" + " [VIDIOC_G_SLICED_VBI_CAP]\n" " --get-sliced-vbi-out-cap\n" - " query the sliced VBI output capabilities [VIDIOC_G_SLICED_VBI_CAP]\n" + " query the sliced VBI output capabilities\n" + " [VIDIOC_G_SLICED_VBI_CAP]\n" " -B, --get-fmt-sliced-vbi\n" " query the sliced VBI capture format [VIDIOC_G_FMT]\n" " --get-fmt-sliced-vbi-out\n" @@ -586,9 +596,10 @@ static void usage_vbi(void) " --try-fmt-sliced-vbi\n" " --set-fmt-sliced-vbi-out\n" " --try-fmt-sliced-vbi-out=\n" - " set/try the sliced VBI capture/output format to [VIDIOC_S/TRY_FMT]\n" - " is a comma separated list of:\n" - " off: turn off sliced VBI (cannot be combined with other modes)\n" + " set/try the sliced VBI capture/output format to \n" + " [VIDIOC_S/TRY_FMT], is a comma separated list of:\n" + " off: turn off sliced VBI (cannot be combined with\n" + " other modes)\n" " teletext: teletext (PAL/SECAM)\n" " cc: closed caption (NTSC)\n" " wss: widescreen signal (PAL/SECAM)\n" @@ -606,17 +617,18 @@ static void usage_crop(void) " --set-crop=top=,left=,width=,height=\n" " set the video capture crop window [VIDIOC_S_CROP]\n" " --get-cropcap-output\n" - " query the crop capabilities for video output [VIDIOC_CROPCAP]\n" + " query crop capabilities for video output [VIDIOC_CROPCAP]\n" " --get-crop-output query the video output crop window [VIDIOC_G_CROP]\n" " --set-crop-output=top=,left=,width=,height=\n" " set the video output crop window [VIDIOC_S_CROP]\n" " --get-cropcap-overlay\n" - " query the crop capabilities for video overlay [VIDIOC_CROPCAP]\n" + " query crop capabilities for video overlay [VIDIOC_CROPCAP]\n" " --get-crop-overlay query the video overlay crop window [VIDIOC_G_CROP]\n" " --set-crop-overlay=top=,left=,width=,height=\n" " set the video overlay crop window [VIDIOC_S_CROP]\n" " --get-cropcap-output-overlay\n" - " query the crop capabilities for video output overlays [VIDIOC_CROPCAP]\n" + " query the crop capabilities for video output overlays\n" + " [VIDIOC_CROPCAP]\n" " --get-crop-output-overlay\n" " query the video output overlay crop window [VIDIOC_G_CROP]\n" " --set-crop-output-overlay=top=,left=,width=,height=\n" @@ -644,7 +656,7 @@ static void usage_misc(void) " --get-jpeg-comp query the JPEG compression [VIDIOC_G_JPEGCOMP]\n" " --set-jpeg-comp=quality=,markers=,comment=,app=\n" " set the JPEG compression [VIDIOC_S_JPEGCOMP]\n" - " is the app segment: 0-9 or a-f, is the actual string.\n" + " is the app segment: 0-9/a-f, is the actual string.\n" " is a colon separated list of:\n" " dht: Define Huffman Tables\n" " dqt: Define Quantization Tables\n" -- 2.7.4