mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Fix #851, HTTP API support number of video frames for FPS. 2.0.240
This commit is contained in:
parent
4167715153
commit
ff87318b95
7 changed files with 45 additions and 1 deletions
|
@ -257,6 +257,7 @@ SrsPublishRecvThread::SrsPublishRecvThread(
|
|||
|
||||
recv_error_code = ERROR_SUCCESS;
|
||||
_nb_msgs = 0;
|
||||
video_frames = 0;
|
||||
error = st_cond_new();
|
||||
ncid = cid = 0;
|
||||
|
||||
|
@ -298,6 +299,11 @@ int64_t SrsPublishRecvThread::nb_msgs()
|
|||
return _nb_msgs;
|
||||
}
|
||||
|
||||
uint64_t SrsPublishRecvThread::nb_video_frames()
|
||||
{
|
||||
return video_frames;
|
||||
}
|
||||
|
||||
int SrsPublishRecvThread::error_code()
|
||||
{
|
||||
return recv_error_code;
|
||||
|
@ -378,6 +384,10 @@ int SrsPublishRecvThread::handle(SrsCommonMessage* msg)
|
|||
|
||||
_nb_msgs++;
|
||||
|
||||
if (msg->header.is_video()) {
|
||||
video_frames++;
|
||||
}
|
||||
|
||||
// log to show the time of recv thread.
|
||||
srs_verbose("recv thread now=%"PRId64"us, got msg time=%"PRId64"ms, size=%d",
|
||||
srs_update_system_time_ms(), msg->header.timestamp, msg->size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue