+ player_thread = thread(&Player::thread_func, this, file_avctx);
+
+ if (stream_output == HTTPD_STREAM_OUTPUT) {
+ global_metrics.add("http_output_frames", { { "type", "original" }, { "reason", "edge_frame_or_no_interpolation" } }, &metric_original_frame);
+ global_metrics.add("http_output_frames", { { "type", "faded" }, { "reason", "edge_frame_or_no_interpolation" } }, &metric_faded_frame);
+ global_metrics.add("http_output_frames", { { "type", "original" }, { "reason", "snapped" } }, &metric_original_snapped_frame);
+ global_metrics.add("http_output_frames", { { "type", "faded" }, { "reason", "snapped" } }, &metric_faded_snapped_frame);
+ global_metrics.add("http_output_frames", { { "type", "interpolated" } }, &metric_interpolated_frame);
+ global_metrics.add("http_output_frames", { { "type", "interpolated_faded" } }, &metric_interpolated_faded_frame);
+ global_metrics.add("http_output_frames", { { "type", "refresh" } }, &metric_refresh_frame);
+ global_metrics.add("http_dropped_frames", { { "type", "interpolated" } }, &metric_dropped_interpolated_frame);
+ global_metrics.add("http_dropped_frames", { { "type", "unconditional" } }, &metric_dropped_unconditional_frame);
+
+ vector<double> quantiles{ 0.01, 0.1, 0.25, 0.5, 0.75, 0.9, 0.99 };
+ metric_player_ahead_seconds.init(quantiles, 60.0);
+ global_metrics.add("player_ahead_seconds", &metric_player_ahead_seconds);
+ }