1
0
Fork 0
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:
winlin 2017-04-23 21:00:06 +08:00
commit c97f2233a2
6 changed files with 44 additions and 0 deletions

View file

@ -261,6 +261,7 @@ SrsPublishRecvThread::SrsPublishRecvThread(SrsRtmpServer* rtmp_sdk, SrsRequest*
recv_error_code = ERROR_SUCCESS;
_nb_msgs = 0;
video_frames = 0;
error = st_cond_new();
ncid = cid = 0;
@ -302,6 +303,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;
@ -341,6 +347,10 @@ int SrsPublishRecvThread::consume(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);