X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=shared%2Fhttpd.h;h=6c9a254307aee03f5b15b347e32c7a521a863b9a;hb=9ffd4f03f314cc6e0254449593def95c9bc203d6;hp=8c3c8105c5b959155abbd19d95b10a1fcfc0ffa6;hpb=eeda8995329601f9f4e35047358400833eeae68e;p=nageru diff --git a/shared/httpd.h b/shared/httpd.h index 8c3c810..6c9a254 100644 --- a/shared/httpd.h +++ b/shared/httpd.h @@ -59,6 +59,9 @@ public: { return metric_num_connected_clients.load(); } + int64_t get_num_connected_multicam_clients() const { + return metric_num_connected_multicam_clients.load(); + } private: static int answer_to_connection_thunk(void *cls, MHD_Connection *connection, @@ -103,7 +106,8 @@ private: bool should_quit = false; // Under . std::condition_variable has_buffered_data; std::deque buffered_data; // Protected by . - size_t used_of_buffered_data = 0; // How many bytes of the first element of that is already used. Protected by . + size_t used_of_buffered_data = 0; // How many bytes of the first element of that is already used. Protected by . + size_t buffered_data_bytes = 0; // The sum of all size() in buffered_data. Protected by . size_t seen_keyframe = false; StreamType stream_type; }; @@ -119,7 +123,8 @@ private: std::string header[NUM_STREAM_TYPES]; // Metrics. - std::atomic metric_num_connected_clients{ 0 }; + std::atomic metric_num_connected_clients{0}; + std::atomic metric_num_connected_multicam_clients{0}; }; #endif // !defined(_HTTPD_H)