1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

STAT: Only stat media streaming clients.

This commit is contained in:
winlin 2022-08-27 18:06:26 +08:00
parent ccf83a3f68
commit 2944fe430f
2 changed files with 8 additions and 5 deletions

View file

@ -20,6 +20,7 @@ using namespace std;
#include <srs_protocol_utility.hpp>
#include <srs_app_tencentcloud.hpp>
#include <srs_kernel_kbps.hpp>
#include <srs_app_utility.hpp>
string srs_generate_stat_vid()
{
@ -496,7 +497,7 @@ void SrsStatistic::kbps_add_delta(std::string id, ISrsKbpsDelta* delta)
client->stream->vhost->kbps->add_delta(in, out);
}
SrsKbps* SrsStatistic::kbps_sample()
void SrsStatistic::kbps_sample()
{
kbps->sample();
if (true) {
@ -521,8 +522,9 @@ SrsKbps* SrsStatistic::kbps_sample()
client->kbps->sample();
}
}
return kbps;
// Update server level data.
srs_update_rtmp_server((int)clients.size(), kbps);
}
std::string SrsStatistic::server_id()