X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=futatabi%2Fmain.cpp;h=3b6f8e3044b804d637bff98f026b1795db9aaace;hb=51a4b5d7f6121fac9a7e1440018e196750c14088;hp=486bcfff213654bf409691ac4212bd4acdaaa44c;hpb=e0d676aec4f44252170da8e1c8824421ac6976ff;p=nageru diff --git a/futatabi/main.cpp b/futatabi/main.cpp index 486bcff..3b6f8e3 100644 --- a/futatabi/main.cpp +++ b/futatabi/main.cpp @@ -71,6 +71,7 @@ vector frames[MAX_STREAMS]; // Under frame_mu. vector frame_filenames; // Under frame_mu. atomic metric_received_frames[MAX_STREAMS]{{0}}; +Summary metric_received_frame_size_bytes; namespace { @@ -211,7 +212,9 @@ int main(int argc, char **argv) } avformat_network_init(); + global_metrics.set_prefix("futatabi"); global_httpd = new HTTPD; + global_metrics.remove("num_connected_multicam_clients"); QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); @@ -459,6 +462,7 @@ void record_thread_func() for (unsigned i = 0; i < MAX_STREAMS; ++i) { global_metrics.add("received_frames", {{ "stream", to_string(i) }}, &metric_received_frames[i]); } + global_metrics.add("received_frame_size_bytes", &metric_received_frame_size_bytes); if (global_flags.stream_source.empty() || global_flags.stream_source == "/dev/null") { // Save the user from some repetitive messages. @@ -498,6 +502,7 @@ void record_thread_func() } ++metric_received_frames[pkt.stream_index]; + metric_received_frame_size_bytes.count_event(pkt.size); // Convert pts to our own timebase. AVRational stream_timebase = format_ctx->streams[pkt.stream_index]->time_base;