Stats of NACKs acked and number of repeated NACKs. (#664)

* Stats of NACKs acked and number of repeated NACKs.

Also making a change in delta stat to drop negative packet loss
counts to 0. Because of windowing it is a legitimate case.
The receiver could have seen a loss in window we are measuring
and in the subsequent window, the receiver could have gotten
a retransmission and reduced the packet loss count resulting
in a negative delta. When we report negative delta, it could
get dropped by analytics validator. That will be lost data.
Avoid that.

* Remove unused code

* Pick up latest protocol
This commit is contained in:
Raja Subramanian
2022-05-02 22:43:21 +05:30
committed by GitHub
parent fe8c355a32
commit 1665f51bd0
4 changed files with 33 additions and 29 deletions
+5 -2
View File
@@ -1036,8 +1036,9 @@ func (d *DownTrack) retransmitPackets(nacks []uint16) {
src := PacketFactory.Get().(*[]byte)
defer PacketFactory.Put(src)
numRepeatedNACKs := uint32(0)
nackAcks := uint32(0)
nackMisses := uint32(0)
numRepeatedNACKs := uint32(0)
for _, meta := range d.sequencer.getPacketsMeta(filtered) {
if meta.layer == int8(InvalidLayerSpatial) {
// padding packet, no RTX for those
@@ -1048,6 +1049,8 @@ func (d *DownTrack) retransmitPackets(nacks []uint16) {
continue
}
nackAcks++
if pool != nil {
PacketFactory.Put(pool)
pool = nil
@@ -1119,7 +1122,7 @@ func (d *DownTrack) retransmitPackets(nacks []uint16) {
d.totalRepeatedNACKs += numRepeatedNACKs
d.statsLock.Unlock()
d.rtpStats.UpdateNackMiss(nackMisses)
d.rtpStats.UpdateNackProcessed(nackAcks, nackMisses, numRepeatedNACKs)
}
// writes RTP header extensions of track