Remove parked layer feature. (#1927)
* Remove parked layer feature. Not worth the added complexity. Several reasons - Not seeing black frames on pub mute always. - If they are there, it can consume more than 30kbps if the parked layer is high res. That is wasted bandwidth downstream when pub is muted. - On resume, client some time sends PLI and that triggers a key frame request. But, leaving the separate `PubMuted` flag in forwarder in case we can use it for better handling. * need the request spatial
This commit is contained in:
@@ -33,9 +33,6 @@ type Base struct {
|
||||
|
||||
requestSpatial int32
|
||||
|
||||
parkedLayer buffer.VideoLayer
|
||||
previousParkedLayer buffer.VideoLayer
|
||||
|
||||
currentLayer buffer.VideoLayer
|
||||
previousLayer buffer.VideoLayer
|
||||
}
|
||||
@@ -48,8 +45,6 @@ func NewBase(logger logger.Logger) *Base {
|
||||
targetLayer: buffer.InvalidLayer, // start off with nothing, let streamallocator/opportunistic forwarder set the target
|
||||
previousTargetLayer: buffer.InvalidLayer,
|
||||
requestSpatial: buffer.InvalidLayerSpatial,
|
||||
parkedLayer: buffer.InvalidLayer,
|
||||
previousParkedLayer: buffer.InvalidLayer,
|
||||
currentLayer: buffer.InvalidLayer,
|
||||
previousLayer: buffer.InvalidLayer,
|
||||
}
|
||||
@@ -98,7 +93,7 @@ func (b *Base) GetRequestSpatial() int32 {
|
||||
|
||||
func (b *Base) CheckSync() (locked bool, layer int32) {
|
||||
layer = b.GetRequestSpatial()
|
||||
locked = layer == b.GetCurrent().Spatial || b.GetParked().IsValid()
|
||||
locked = layer == b.GetCurrent().Spatial
|
||||
return
|
||||
}
|
||||
|
||||
@@ -118,14 +113,6 @@ func (b *Base) GetMaxSeen() buffer.VideoLayer {
|
||||
return b.maxSeenLayer
|
||||
}
|
||||
|
||||
func (b *Base) SetParked(parkedLayer buffer.VideoLayer) {
|
||||
b.parkedLayer = parkedLayer
|
||||
}
|
||||
|
||||
func (b *Base) GetParked() buffer.VideoLayer {
|
||||
return b.parkedLayer
|
||||
}
|
||||
|
||||
func (b *Base) SetCurrent(currentLayer buffer.VideoLayer) {
|
||||
b.currentLayer = currentLayer
|
||||
}
|
||||
@@ -143,15 +130,12 @@ func (b *Base) Rollback() {
|
||||
"rolling back",
|
||||
"previous", b.previousLayer,
|
||||
"current", b.currentLayer,
|
||||
"previousParked", b.previousParkedLayer,
|
||||
"parked", b.parkedLayer,
|
||||
"previousTarget", b.previousTargetLayer,
|
||||
"target", b.targetLayer,
|
||||
"max", b.maxLayer,
|
||||
"req", b.requestSpatial,
|
||||
"maxSeen", b.maxSeenLayer,
|
||||
)
|
||||
b.parkedLayer = b.previousParkedLayer
|
||||
b.currentLayer = b.previousLayer
|
||||
b.targetLayer = b.previousTargetLayer
|
||||
}
|
||||
@@ -170,8 +154,6 @@ func (b *Base) SelectTemporal(extPkt *buffer.ExtPacket) (int32, bool) {
|
||||
"updating temporal layer",
|
||||
"previous", b.previousLayer,
|
||||
"current", b.currentLayer,
|
||||
"previousParked", b.previousParkedLayer,
|
||||
"parked", b.parkedLayer,
|
||||
"previousTarget", b.previousTargetLayer,
|
||||
"target", b.targetLayer,
|
||||
"max", b.maxLayer,
|
||||
|
||||
Reference in New Issue
Block a user