From: Steinar H. Gunderson Date: Fri, 4 Aug 2023 22:37:36 +0000 (+0200) Subject: Remove/hide some SRT flags if not compiling with SRT. X-Git-Tag: 2.3.0~31 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;ds=sidebyside;h=5daa0e14eb6a76331a96b70760a16d3093da96a3;p=nageru Remove/hide some SRT flags if not compiling with SRT. --- diff --git a/nageru/flags.cpp b/nageru/flags.cpp index 0a2776f..3c15755 100644 --- a/nageru/flags.cpp +++ b/nageru/flags.cpp @@ -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;