BWE minor tweaks (#3254)

- Clear probe id in downtracks when aborting probe
- a bit of clean up
This commit is contained in:
Raja Subramanian
2024-12-16 08:04:24 +05:30
committed by GitHub
parent be65d24333
commit 699cd9c26c
3 changed files with 13 additions and 3 deletions
@@ -678,6 +678,7 @@ func (s *StreamAllocator) handleSignalPeriodicPing(Event) {
// reset BWE if that persists for a while
if s.state == streamAllocatorStateDeficient && s.params.Pacer.TimeSinceLastSentPacket() > s.params.Config.PausedMinWait {
s.params.Logger.Infow("stream allocator: resetting bwe to enable probing")
s.maybeStopProbe()
s.params.BWE.Reset()
}
@@ -1041,6 +1042,11 @@ func (s *StreamAllocator) maybeStopProbe() {
}
pci := s.params.Pacer.EndProbeCluster(s.activeProbeClusterId)
for _, t := range s.getTracks() {
t.DownTrack().SwapProbeClusterId(pci.Id, ccutils.ProbeClusterIdInvalid)
}
s.params.BWE.ProbeClusterDone(pci)
s.prober.Reset(pci)
}