X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=kaeru.cpp;h=168cf1d6033b40801992186cb92fea47fca08729;hb=c094b73565559282001764edfbf0f4926d3197fb;hp=7049552c6e6a25d9e4c68d8ad214c76f320a0c97;hpb=6cc9c75d39b08080d8bfd6ac8f3375e150adfa38;p=nageru diff --git a/kaeru.cpp b/kaeru.cpp index 7049552..168cf1d 100644 --- a/kaeru.cpp +++ b/kaeru.cpp @@ -50,7 +50,7 @@ int write_packet(void *opaque, uint8_t *buf, int buf_size, AVIODataMarkerType ty stream_mux_header.append((char *)buf, buf_size); httpd->set_header(stream_mux_header); } else { - httpd->add_data((char *)buf, buf_size, type == AVIO_DATA_MARKER_SYNC_POINT); + httpd->add_data((char *)buf, buf_size, type == AVIO_DATA_MARKER_SYNC_POINT, time, AVRational{ AV_TIME_BASE, 1 }); } return buf_size; } @@ -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); } @@ -206,9 +206,9 @@ int main(int argc, char *argv[]) video.start_bm_capture(); video.change_rate(2.0); // Be sure never to really fall behind, but also don't dump huge amounts of stuff onto x264. - BasicStats basic_stats(/*verbose=*/false); + BasicStats basic_stats(/*verbose=*/false, /*use_opengl=*/false); global_basic_stats = &basic_stats; - httpd.start(9095); + httpd.start(global_flags.http_port); signal(SIGUSR1, adjust_bitrate); signal(SIGUSR2, adjust_bitrate);