]> git.sesse.net Git - nageru/blobdiff - mixer.h
Remove old card metrics when reinitializing cards.
[nageru] / mixer.h
diff --git a/mixer.h b/mixer.h
index dd44f74bd74906b88c622dd8ff5e819d703daf87..9b14dc233a241ed6ed3b30e82323c96dc14cbf45 100644 (file)
--- a/mixer.h
+++ b/mixer.h
@@ -88,7 +88,7 @@ public:
                been_at_safe_point_since_last_starvation = false;
        }
 
-       void register_metrics(const std::string &card_name);
+       void register_metrics(const std::vector<std::pair<std::string, std::string>> &labels);
 
        void update_policy(unsigned queue_length);  // Call before picking out a frame, so 0 means starvation.
        unsigned get_safe_queue_length() const { return safe_queue_length; }
@@ -455,6 +455,8 @@ private:
                int last_timecode = -1;  // Unwrapped.
 
                // Metrics.
+               std::vector<std::pair<std::string, std::string>> labels;
+               std::atomic<int64_t> metric_input_received_frames{0};
                std::atomic<int64_t> metric_input_dropped_frames_jitter{0};
                std::atomic<int64_t> metric_input_dropped_frames_error{0};
                std::atomic<int64_t> metric_input_resets{0};
@@ -543,7 +545,9 @@ private:
        // Metrics.
        std::atomic<int64_t> metric_frames_output_total{0};
        std::atomic<int64_t> metric_frames_output_dropped{0};
-       std::atomic<double> metric_uptime_seconds{0.0};
+       std::atomic<double> metric_start_time_seconds{0.0 / 0.0};
+       std::atomic<int64_t> metrics_memory_used_bytes{0};
+       std::atomic<double> metrics_memory_locked_limit_bytes{0.0 / 0.0};
 };
 
 extern Mixer *global_mixer;