mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Kernel: Extract SrsPps to kernel
This commit is contained in:
parent
df6e47ebfc
commit
d8ba72fdc5
7 changed files with 236 additions and 161 deletions
|
@ -75,6 +75,8 @@ extern SrsPps* _srs_pps_rnack2;
|
|||
extern SrsPps* _srs_pps_rhnack;
|
||||
extern SrsPps* _srs_pps_rmnack;
|
||||
|
||||
extern SrsPps* _srs_pps_objs_rtps;
|
||||
|
||||
SrsRtcBlackhole::SrsRtcBlackhole()
|
||||
{
|
||||
blackhole = false;
|
||||
|
@ -676,6 +678,13 @@ srs_error_t SrsRtcServer::notify(int type, srs_utime_t interval, srs_utime_t tic
|
|||
}
|
||||
static char buf[128];
|
||||
|
||||
string objs_desc;
|
||||
_srs_pps_objs_rtps->update();
|
||||
if (_srs_pps_objs_rtps->r10s()) {
|
||||
snprintf(buf, sizeof(buf), ", objs=%d", _srs_pps_objs_rtps->r10s());
|
||||
objs_desc = buf;
|
||||
}
|
||||
|
||||
string rpkts_desc;
|
||||
_srs_pps_rpkts->update(); _srs_pps_rrtps->update(); _srs_pps_rstuns->update(); _srs_pps_rrtcps->update();
|
||||
if (_srs_pps_rpkts->r10s() || _srs_pps_rrtps->r10s() || _srs_pps_rstuns->r10s() || _srs_pps_rrtcps->r10s()) {
|
||||
|
@ -725,9 +734,9 @@ srs_error_t SrsRtcServer::notify(int type, srs_utime_t interval, srs_utime_t tic
|
|||
fid_desc = buf;
|
||||
}
|
||||
|
||||
srs_trace("RTC: Server conns=%u%s%s%s%s%s%s%s",
|
||||
srs_trace("RTC: Server conns=%u%s%s%s%s%s%s%s%s",
|
||||
nn_rtc_conns,
|
||||
rpkts_desc.c_str(), spkts_desc.c_str(), rtcp_desc.c_str(), snk_desc.c_str(), rnk_desc.c_str(), drop_desc.c_str(), fid_desc.c_str()
|
||||
rpkts_desc.c_str(), spkts_desc.c_str(), rtcp_desc.c_str(), snk_desc.c_str(), rnk_desc.c_str(), drop_desc.c_str(), fid_desc.c_str(), objs_desc.c_str()
|
||||
);
|
||||
|
||||
return err;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue