X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=futatabi%2Fflags.cpp;h=aefde273aa64fdbc32504ff2658e743faa6a09d9;hb=931727fc4cccafc84023a053a6eff174b5ea8190;hp=1c606b13e53d62b97d556e2b8eb34f2dc8137bd8;hpb=ffe2343de3fe982cc52a449b13f01137819ed42d;p=nageru diff --git a/futatabi/flags.cpp b/futatabi/flags.cpp index 1c606b1..aefde27 100644 --- a/futatabi/flags.cpp +++ b/futatabi/flags.cpp @@ -16,7 +16,9 @@ int flow_initialized_interpolation_quality; enum LongOption { OPTION_HELP = 1000, OPTION_SLOW_DOWN_INPUT = 1001, - OPTION_HTTP_PORT = 1002 + OPTION_HTTP_PORT = 1002, + OPTION_TALLY_URL = 1003, + OPTION_CUE_POINT_PADDING = 1004 }; void usage() @@ -35,8 +37,10 @@ void usage() fprintf(stderr, " 2 = default (realtime 720p on fast embedded GPUs)\n"); fprintf(stderr, " 3 = good (realtime 720p on GTX 970 or so)\n"); fprintf(stderr, " 4 = best (not realtime on any current GPU)\n"); + fprintf(stderr, " --cue-point-padding SECS move cue-in/cue-out N seconds earlier/later on set\n"); fprintf(stderr, " -d, --working-directory DIR where to store frames and database\n"); fprintf(stderr, " --http-port PORT which port to listen on for output\n"); + fprintf(stderr, " --tally-url URL URL to get tally color from (polled every 100 ms)\n"); } void parse_flags(int argc, char * const argv[]) @@ -50,6 +54,8 @@ void parse_flags(int argc, char * const argv[]) { "interpolation-quality", required_argument, 0, 'q' }, { "working-directory", required_argument, 0, 'd' }, { "http-port", required_argument, 0, OPTION_HTTP_PORT }, + { "tally-url", required_argument, 0, OPTION_TALLY_URL }, + { "cue-point-padding", required_argument, 0, OPTION_CUE_POINT_PADDING }, { 0, 0, 0, 0 } }; for ( ;; ) { @@ -91,6 +97,13 @@ void parse_flags(int argc, char * const argv[]) case OPTION_HTTP_PORT: global_flags.http_port = atoi(optarg); break; + case OPTION_TALLY_URL: + global_flags.tally_url = optarg; + break; + case OPTION_CUE_POINT_PADDING: + global_flags.cue_point_padding_seconds = atof(optarg); + global_flags.cue_point_padding_set = true; + break; case OPTION_HELP: usage(); exit(0); @@ -107,4 +120,9 @@ void parse_flags(int argc, char * const argv[]) usage(); exit(1); } + if (global_flags.cue_point_padding_seconds < 0.0) { + fprintf(stderr, "Cue point padding cannot be negative.\n"); + usage(); + exit(1); + } }