X-Git-Url: https://git.sesse.net/?p=nageru;a=blobdiff_plain;f=kaeru.cpp;h=6d98cce1791992a47df17663b77d5159169061fd;hp=dd91239c7b0e081cc706eedfd90c3e7bcdd6d313;hb=9e47a2f661b9d292598ef0277e507458e3dad62f;hpb=f53bc097f57c9875a5c43c43bea5fa596e0bf99f diff --git a/kaeru.cpp b/kaeru.cpp index dd91239..6d98cce 100644 --- a/kaeru.cpp +++ b/kaeru.cpp @@ -149,10 +149,10 @@ void adjust_bitrate(int signal) } else if (signal == SIGUSR2) { new_bitrate -= 100; if (new_bitrate < 100) { - fprintf(stderr, "Ignoring SIGUSR1, can't decrease bitrate below 100 kbit/sec (currently at %d kbit/sec)\n", + fprintf(stderr, "Ignoring SIGUSR2, can't decrease bitrate below 100 kbit/sec (currently at %d kbit/sec)\n", global_flags.x264_bitrate); } else { - fprintf(stderr, "Decreasing bitrate to %d kbit/sec due to SIGUSR1.\n", new_bitrate); + fprintf(stderr, "Decreasing bitrate to %d kbit/sec due to SIGUSR2.\n", new_bitrate); global_flags.x264_bitrate = new_bitrate; global_x264_encoder->change_bitrate(new_bitrate); } @@ -182,12 +182,10 @@ int main(int argc, char *argv[]) assert(oformat != nullptr); unique_ptr audio_encoder; - if (global_flags.transcode_audio) { - if (global_flags.stream_audio_codec_name.empty()) { - audio_encoder.reset(new AudioEncoder(AUDIO_OUTPUT_CODEC_NAME, DEFAULT_AUDIO_OUTPUT_BIT_RATE, oformat)); - } else { - audio_encoder.reset(new AudioEncoder(global_flags.stream_audio_codec_name, global_flags.stream_audio_codec_bitrate, oformat)); - } + if (global_flags.stream_audio_codec_name.empty()) { + audio_encoder.reset(new AudioEncoder(AUDIO_OUTPUT_CODEC_NAME, DEFAULT_AUDIO_OUTPUT_BIT_RATE, oformat)); + } else { + audio_encoder.reset(new AudioEncoder(global_flags.stream_audio_codec_name, global_flags.stream_audio_codec_bitrate, oformat)); } unique_ptr x264_encoder(new X264Encoder(oformat)); @@ -210,7 +208,7 @@ int main(int argc, char *argv[]) BasicStats basic_stats(/*verbose=*/false); global_basic_stats = &basic_stats; - httpd.start(9095); + httpd.start(global_flags.http_port); signal(SIGUSR1, adjust_bitrate); signal(SIGUSR2, adjust_bitrate);