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 received nack

This commit is contained in:
winlin 2021-02-08 16:23:13 +08:00
parent 44c85cc3d2
commit 627688c582
3 changed files with 17 additions and 3 deletions

View file

@ -56,6 +56,9 @@ SrsPps* _srs_pps_snack2 = new SrsPps(_srs_clock);
SrsPps* _srs_pps_sanack = new SrsPps(_srs_clock);
SrsPps* _srs_pps_svnack = new SrsPps(_srs_clock);
SrsPps* _srs_pps_rnack = new SrsPps(_srs_clock);
SrsPps* _srs_pps_rnack2 = new SrsPps(_srs_clock);
// Firefox defaults as 109, Chrome is 111.
const int kAudioPayloadType = 111;
const int kAudioChannel = 2;
@ -2032,6 +2035,8 @@ srs_error_t SrsRtcSendTrack::on_recv_nack(const vector<uint16_t>& lost_seqs, Srs
{
srs_error_t err = srs_success;
++_srs_pps_rnack2->sugar;
SrsRtcTrackStatistic* statistic = statistic_;
statistic->nacks++;