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

RTC: Update stat for recv track

This commit is contained in:
winlin 2020-07-26 23:28:03 +08:00
parent b3212a12de
commit a035d312f9

View file

@ -1649,6 +1649,10 @@ srs_error_t SrsRtcAudioRecvTrack::on_rtp(SrsRtcStream* source, SrsRtpPacket2* pk
// connection level statistic
session_->stat_->nn_in_audios++;
// track level statistic
statistic_->packets++;
statistic_->bytes += pkt->nb_bytes();
if (source) {
if ((err = source->on_rtp(pkt)) != srs_success) {
return srs_error_wrap(err, "source on rtp");
@ -1680,6 +1684,10 @@ srs_error_t SrsRtcVideoRecvTrack::on_rtp(SrsRtcStream* source, SrsRtpPacket2* pk
// connection level statistic
session_->stat_->nn_in_videos++;
// track level statistic
statistic_->packets++;
statistic_->bytes += pkt->nb_bytes();
pkt->frame_type = SrsFrameTypeVideo;
if (source) {