Attempt to avoid out-of-order max subscribed layer notifications. (#1882)
* Check for request layer lock only in the goroutine * check before sending PLI * max layer notifier worker * test cleanup * clean up * do notification in the callback
This commit is contained in:
@@ -80,26 +80,6 @@ func (v *VP9) Select(extPkt *buffer.ExtPacket, _layer int32) (result VideoLayerS
|
||||
result.IsResuming = true
|
||||
}
|
||||
|
||||
if v.currentLayer.Spatial != v.requestSpatial && updatedLayer.Spatial == v.requestSpatial {
|
||||
result.IsSwitchingToRequestSpatial = true
|
||||
}
|
||||
|
||||
if v.currentLayer.Spatial != v.maxLayer.Spatial && updatedLayer.Spatial == v.maxLayer.Spatial {
|
||||
result.IsSwitchingToMaxSpatial = true
|
||||
result.MaxSpatialLayer = updatedLayer.Spatial
|
||||
v.logger.Infow(
|
||||
"reached max layer",
|
||||
"current", v.currentLayer,
|
||||
"updated", updatedLayer,
|
||||
"target", v.targetLayer,
|
||||
"max", v.maxLayer,
|
||||
"layer", extPkt.VideoLayer.Spatial,
|
||||
"req", v.requestSpatial,
|
||||
"maxSeen", v.maxSeenLayer,
|
||||
"feed", extPkt.Packet.SSRC,
|
||||
)
|
||||
}
|
||||
|
||||
v.previousLayer = v.currentLayer
|
||||
v.currentLayer = updatedLayer
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user