Plug a couple of holes in stream transitions. (#1905)
* Plug a couple of holes in stream transitions. 1. Missed negative sign meant stealing bits from other tracks was not working. 2. When a track change (mute, unmute, subscription change) cannot be allocated, explicitly pause so that stream state update happens. Refactor stream state update a bit to make it a bit cleaner. * correct comment
This commit is contained in:
@@ -1013,7 +1013,7 @@ func (f *Forwarder) ProvisionalAllocateGetBestWeightedTransition() VideoTransiti
|
||||
bandwidthDelta := int64(math.Max(float64(0), float64(existingBandwidthNeeded-f.provisional.Bitrates[s][t])))
|
||||
|
||||
transitionCost := int32(0)
|
||||
// LK-TODO: SVC will need a different cost transition
|
||||
// SVC-TODO: SVC will need a different cost transition
|
||||
if targetLayer.Spatial != s {
|
||||
transitionCost = TransitionCostSpatial
|
||||
}
|
||||
@@ -1036,7 +1036,7 @@ func (f *Forwarder) ProvisionalAllocateGetBestWeightedTransition() VideoTransiti
|
||||
return VideoTransition{
|
||||
From: targetLayer,
|
||||
To: bestLayer,
|
||||
BandwidthDelta: bestBandwidthDelta,
|
||||
BandwidthDelta: -bestBandwidthDelta,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user