11 fprintf(stderr, "Usage: nageru [OPTION]...\n");
12 fprintf(stderr, "\n");
13 fprintf(stderr, " -h, --help print usage information\n");
14 fprintf(stderr, " -c, --num-cards set number of input cards (default 2)\n");
15 fprintf(stderr, " -t, --theme=FILE choose theme (default theme.lua)\n");
16 fprintf(stderr, " -v, --va-display=SPEC VA-API device for H.264 encoding\n");
17 fprintf(stderr, " ($DISPLAY spec or /dev/dri/render* path)\n");
18 fprintf(stderr, " --http-uncompressed-video send uncompressed NV12 video to HTTP clients\n");
19 fprintf(stderr, " --flat-audio start with most audio processing turned off\n");
22 void parse_flags(int argc, char * const argv[])
24 static const option long_options[] = {
25 { "help", no_argument, 0, 'h' },
26 { "num-cards", required_argument, 0, 'c' },
27 { "theme", required_argument, 0, 't' },
28 { "va-display", required_argument, 0, 1000 },
29 { "http-uncompressed-video", no_argument, 0, 1001 },
30 { "flat-audio", no_argument, 0, 1002 },
35 int c = getopt_long(argc, argv, "c:t:", long_options, &option_index);
42 global_flags.num_cards = atoi(optarg);
45 global_flags.theme_filename = optarg;
48 global_flags.va_display = optarg;
51 global_flags.uncompressed_video_to_http = true;
54 global_flags.flat_audio = true;
60 fprintf(stderr, "Unknown option '%s'\n", argv[option_index]);
61 fprintf(stderr, "\n");