Unit tests for sfu.Forwarder (#239)

This commit is contained in:
Raja Subramanian
2021-12-07 02:51:08 +05:30
committed by GitHub
parent 318bee4f1e
commit 5dc0a43b29
7 changed files with 1546 additions and 238 deletions
+8 -2
View File
@@ -939,8 +939,14 @@ func (s *StreamAllocator) maybeBoostLayer() {
continue
}
if track.AllocateNextHigher() {
result := track.AllocateNextHigher()
if result.layersChanged {
s.lastBoostTime = time.Now()
update := NewStreamStateUpdate()
update.HandleStreamingChange(result.change, track)
s.maybeSendUpdate(update)
break
}
}
@@ -1143,7 +1149,7 @@ func (t *Track) FinalizeAllocate() {
t.downTrack.FinalizeAllocate()
}
func (t *Track) AllocateNextHigher() bool {
func (t *Track) AllocateNextHigher() VideoAllocationResult {
return t.downTrack.AllocateNextHigher()
}