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");
20 fprintf(stderr, " --no-flush-pbos do not explicitly signal texture data uploads\n");
21 fprintf(stderr, " (will give display corruption, but makes it\n");
22 fprintf(stderr, " possible to run with apitrace in real time)\n");
25 void parse_flags(int argc, char * const argv[])
27 static const option long_options[] = {
28 { "help", no_argument, 0, 'h' },
29 { "num-cards", required_argument, 0, 'c' },
30 { "theme", required_argument, 0, 't' },
31 { "va-display", required_argument, 0, 1000 },
32 { "http-uncompressed-video", no_argument, 0, 1001 },
33 { "flat-audio", no_argument, 0, 1002 },
34 { "no-flush-pbos", no_argument, 0, 1003 },
39 int c = getopt_long(argc, argv, "c:t:", long_options, &option_index);
46 global_flags.num_cards = atoi(optarg);
49 global_flags.theme_filename = optarg;
52 global_flags.va_display = optarg;
55 global_flags.uncompressed_video_to_http = true;
58 global_flags.flat_audio = true;
61 global_flags.flush_pbos = false;
67 fprintf(stderr, "Unknown option '%s'\n", argv[option_index]);
68 fprintf(stderr, "\n");