Dampen stream allocator (#551)

* WIP commit

* WIP commit

* WIP commit

* format

* NACK window

* Remove layer when it is expected to stop

* Remove debug
This commit is contained in:
Raja Subramanian
2022-03-22 22:23:22 +05:30
committed by GitHub
parent 779fe0f549
commit 076eb1c8ae
5 changed files with 210 additions and 120 deletions
+7 -2
View File
@@ -264,11 +264,16 @@ func (r *RTPStats) GetTotalPackets() uint32 {
return r.getNumPacketsSeen() + r.packetsDuplicate + r.packetsPadding
}
func (r *RTPStats) GetTotalPacketsSansDuplicate() uint32 {
func (r *RTPStats) GetTotalPacketsPrimary() uint32 {
r.lock.RLock()
defer r.lock.RUnlock()
return r.getNumPacketsSeen() + r.packetsPadding
packetsSeen := r.getNumPacketsSeen()
if r.packetsPadding > packetsSeen {
return 0
}
return packetsSeen - r.packetsPadding
}
func (r *RTPStats) GetTotalBytes() uint64 {