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

refine kbps, provides 30s,1m,5m,60m kbps. 0.9.97

This commit is contained in:
winlin 2014-05-14 13:56:12 +08:00
parent 830f0b5eb6
commit b175821b62
6 changed files with 188 additions and 21 deletions

View file

@ -504,9 +504,12 @@ int SrsRtmpConn::playing(SrsSource* source)
// reportable
if (pithy_print.can_print()) {
kbps->sample();
srs_trace("-> "SRS_LOG_ID_PLAY
" time=%"PRId64", duration=%"PRId64", msgs=%d, okbps=%d, ikbps=%d",
pithy_print.age(), duration, count, kbps->get_send_kbps(), kbps->get_recv_kbps());
" time=%"PRId64", msgs=%d, okbps=%d,%d,%d, ikbps=%d,%d,%d",
pithy_print.age(), count,
kbps->get_send_kbps(), kbps->get_send_kbps_sample_high(), kbps->get_send_kbps_sample_medium(),
kbps->get_recv_kbps(), kbps->get_recv_kbps_sample_high(), kbps->get_recv_kbps_sample_medium());
}
if (count <= 0) {
@ -590,9 +593,11 @@ int SrsRtmpConn::fmle_publish(SrsSource* source)
// reportable
if (pithy_print.can_print()) {
kbps->sample();
srs_trace("<- "SRS_LOG_ID_CLIENT_PUBLISH
" time=%"PRId64", okbps=%d, ikbps=%d",
pithy_print.age(), kbps->get_send_kbps(), kbps->get_recv_kbps());
" time=%"PRId64", okbps=%d,%d,%d, ikbps=%d,%d,%d", pithy_print.age(),
kbps->get_send_kbps(), kbps->get_send_kbps_sample_high(), kbps->get_send_kbps_sample_medium(),
kbps->get_recv_kbps(), kbps->get_recv_kbps_sample_high(), kbps->get_recv_kbps_sample_medium());
}
// process UnPublish event.
@ -666,9 +671,12 @@ int SrsRtmpConn::flash_publish(SrsSource* source)
// reportable
if (pithy_print.can_print()) {
kbps->sample();
srs_trace("<- "SRS_LOG_ID_WEB_PUBLISH
" time=%"PRId64", okbps=%d, ikbps=%d",
pithy_print.age(), kbps->get_send_kbps(), kbps->get_recv_kbps());
" time=%"PRId64", okbps=%d,%d,%d, ikbps=%d,%d,%d",
pithy_print.age(),
kbps->get_send_kbps(), kbps->get_send_kbps_sample_high(), kbps->get_send_kbps_sample_medium(),
kbps->get_recv_kbps(), kbps->get_recv_kbps_sample_high(), kbps->get_recv_kbps_sample_medium());
}
// process UnPublish event.