void vbi_cmd(int ch, char *optarg) { char *value, *subs; bool found_off = false; v4l2_format *fmt = &vbi_fmt; switch (ch) { case OptSetSlicedVbiOutFormat: case OptTrySlicedVbiOutFormat: fmt = &vbi_fmt_out; /* fall through */ case OptSetSlicedVbiFormat: case OptTrySlicedVbiFormat: fmt->fmt.sliced.service_set = 0; subs = optarg; while (*subs != '\0') { static const char *const subopts[] = { "off", "teletext", "cc", "wss", "vps", NULL }; switch (parse_subopt(&subs, subopts, &value)) { case 0: found_off = true; break; case 1: fmt->fmt.sliced.service_set |= V4L2_SLICED_TELETEXT_B; break; case 2: fmt->fmt.sliced.service_set |= V4L2_SLICED_CAPTION_525; break; case 3: fmt->fmt.sliced.service_set |= V4L2_SLICED_WSS_625; break; case 4: fmt->fmt.sliced.service_set |= V4L2_SLICED_VPS; break; default: vbi_usage(); break; } } if (found_off && fmt->fmt.sliced.service_set) { fprintf(stderr, "Sliced VBI mode 'off' cannot be combined with other modes\n"); vbi_usage(); exit(1); } break; } }
static void usage_all(void) { common_usage(); tuner_usage(); io_usage(); stds_usage(); vidcap_usage(); vidout_usage(); overlay_usage(); vbi_usage(); sdr_usage(); selection_usage(); misc_usage(); streaming_usage(); edid_usage(); }