Return max spatial layer from selectors. (#1743)
* Return max spatial layer from selectors. With differing requirements of SVC and allowing overshoot in Simulcast, selectors are best placed to indicate what is the max spatial layer when they indicate a switch to max spatial layer. * fix test * prevent race
This commit is contained in:
@@ -98,6 +98,7 @@ func (s *Simulcast) Select(extPkt *buffer.ExtPacket, layer int32) (result VideoL
|
||||
|
||||
if s.currentLayer.Spatial >= s.maxLayer.Spatial {
|
||||
result.IsSwitchingToMaxSpatial = true
|
||||
result.MaxSpatialLayer = s.currentLayer.Spatial
|
||||
s.logger.Infow(
|
||||
"reached max layer",
|
||||
"current", s.currentLayer,
|
||||
@@ -136,6 +137,7 @@ func (s *Simulcast) Select(extPkt *buffer.ExtPacket, layer int32) (result VideoL
|
||||
|
||||
if s.currentLayer.Spatial >= s.maxLayer.Spatial {
|
||||
result.IsSwitchingToMaxSpatial = true
|
||||
result.MaxSpatialLayer = s.currentLayer.Spatial
|
||||
}
|
||||
|
||||
if s.currentLayer.Spatial >= s.maxLayer.Spatial || s.currentLayer.Spatial == s.maxSeenLayer.Spatial {
|
||||
|
||||
Reference in New Issue
Block a user