mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Merge SRS2 for #851
This commit is contained in:
commit
c97f2233a2
6 changed files with 44 additions and 0 deletions
|
@ -950,6 +950,7 @@ int SrsRtmpConn::do_publishing(SrsSource* source, SrsPublishRecvThread* trd)
|
|||
}
|
||||
|
||||
int64_t nb_msgs = 0;
|
||||
uint64_t nb_frames = 0;
|
||||
while (!disposed) {
|
||||
pprint->elapse();
|
||||
|
||||
|
@ -986,6 +987,14 @@ int SrsRtmpConn::do_publishing(SrsSource* source, SrsPublishRecvThread* trd)
|
|||
}
|
||||
nb_msgs = trd->nb_msgs();
|
||||
|
||||
// Update the stat for video fps.
|
||||
// @remark https://github.com/ossrs/srs/issues/851
|
||||
SrsStatistic* stat = SrsStatistic::instance();
|
||||
if ((ret = stat->on_video_frames(req, (int)(trd->nb_video_frames() - nb_frames))) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
nb_frames = trd->nb_video_frames();
|
||||
|
||||
// reportable
|
||||
if (pprint->can_print()) {
|
||||
kbps->sample();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue