]> git.sesse.net Git - nageru/blobdiff - nageru/flags.cpp
Remove/hide some SRT flags if not compiling with SRT.
[nageru] / nageru / flags.cpp
index 8634fe701e201ac1fed8cd4d6edc2fde4a492fd3..3c1575589b6a33169e1f922c9eb726fd55218188 100644 (file)
@@ -162,7 +162,7 @@ void usage(Program program)
                fprintf(stderr, "      --midi-mapping=FILE         start with the given MIDI controller mapping (implies --multichannel)\n");
                fprintf(stderr, "      --default-hdmi-input        default to HDMI over SDI inputs for cards that have both\n");
                fprintf(stderr, "      --fake-cards-audio          make fake (disconnected) cards output a simple tone\n");
-               fprintf(stderr, "      --v4l-output DEVICE         send video (no audio) to V4L2 output/loopback\n");
+               fprintf(stderr, "      --v4l-output=DEVICE         send video (no audio) to V4L2 output/loopback\n");
                fprintf(stderr, "      --http-x264-video           send x264-compressed video to HTTP clients\n");
                fprintf(stderr, "      --record-x264-video         store x264-compressed video to disk (implies --http-x264-video,\n");
                fprintf(stderr, "                                    removes the need for working VA-API encoding)\n");
@@ -203,9 +203,11 @@ void usage(Program program)
                DEFAULT_AUDIO_OUTPUT_BIT_RATE / 1000);
        fprintf(stderr, "      --http-port=PORT            which port to use for the built-in HTTP server\n");
        fprintf(stderr, "                                  (default is %d)\n", DEFAULT_HTTPD_PORT);
+#ifdef HAVE_SRT
        fprintf(stderr, "      --srt-port=PORT             which port to use for receiving SRT streams\n");
        fprintf(stderr, "                                  (default is %d)\n", DEFAULT_SRT_PORT);
        fprintf(stderr, "      --no-srt                    disable receiving SRT streams\n");
+#endif
        if (program == PROGRAM_KAERU) {
                fprintf(stderr, "      --no-transcode-video        copy encoded video raw from the source stream\n");
                fprintf(stderr, "                                    (experimental, must be H.264)\n");
@@ -300,8 +302,10 @@ void parse_flags(Program program, int argc, char * const argv[])
                { "http-audio-codec", required_argument, 0, OPTION_HTTP_AUDIO_CODEC },
                { "http-audio-bitrate", required_argument, 0, OPTION_HTTP_AUDIO_BITRATE },
                { "http-port", required_argument, 0, OPTION_HTTP_PORT },
+#ifdef HAVE_SRT
                { "srt-port", required_argument, 0, OPTION_SRT_PORT },
-               { "no-srt", no_argument, 0, OPTION_NO_SRT },
+#endif
+               { "no-srt", no_argument, 0, OPTION_NO_SRT },  // We silently allow this even without HAVE_SRT.
                { "no-transcode-video", no_argument, 0, OPTION_NO_TRANSCODE_VIDEO },
                { "no-transcode-audio", no_argument, 0, OPTION_NO_TRANSCODE_AUDIO },
                { "disable-audio", no_argument, 0, OPTION_DISABLE_AUDIO },
@@ -434,9 +438,11 @@ void parse_flags(Program program, int argc, char * const argv[])
                case OPTION_HTTP_PORT:
                        global_flags.http_port = atoi(optarg);
                        break;
+#ifdef HAVE_SRT
                case OPTION_SRT_PORT:
                        global_flags.srt_port = atoi(optarg);
                        break;
+#endif
                case OPTION_NO_SRT:
                        global_flags.srt_port = -1;
                        break;