]> git.sesse.net Git - nageru/blobdiff - flags.cpp
Allow symlinked frame files. Useful for testing.
[nageru] / flags.cpp
index 1a4c08e5bfc25cbfb37324ebb048594751f35f8f..4c7537093982671a4775f0b20d7bd7b7c6d0b569 100644 (file)
--- a/flags.cpp
+++ b/flags.cpp
@@ -14,7 +14,8 @@ Flags global_flags;
 // Long options that have no corresponding short option.
 enum LongOption {
        OPTION_HELP = 1000,
-       OPTION_SLOW_DOWN_INPUT = 1001
+       OPTION_SLOW_DOWN_INPUT = 1001,
+       OPTION_HTTP_PORT = 1002
 };
 
 void usage()
@@ -29,6 +30,7 @@ void usage()
        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, "  -d, --working-directory DIR     where to store frames and database\n");
+       fprintf(stderr, "      --http-port PORT            which port to listen on for output\n");
 }
 
 void parse_flags(int argc, char * const argv[])
@@ -38,6 +40,7 @@ void parse_flags(int argc, char * const argv[])
                { "slow-down-input", no_argument, 0, OPTION_SLOW_DOWN_INPUT },
                { "interpolation-quality", required_argument, 0, 'q' },
                { "working-directory", required_argument, 0, 'd' },
+               { "http-port", required_argument, 0, OPTION_HTTP_PORT },
                { 0, 0, 0, 0 }
        };
        for ( ;; ) {
@@ -57,6 +60,9 @@ void parse_flags(int argc, char * const argv[])
                case 'd':
                        global_flags.working_directory = optarg;
                        break;
+               case OPTION_HTTP_PORT:
+                       global_flags.http_port = atoi(optarg);
+                       break;
                case OPTION_HELP:
                        usage();
                        exit(0);