Move callbacks out of messageRouter (#269)

* move callbacks out of messageRouter

* OCD

* more OCD

* fix forwarder test

* even more OCD

* maximum OCD

* package name collision, copy lock by value
This commit is contained in:
David Colburn
2021-12-17 13:19:23 -08:00
committed by GitHub
parent a06edd885e
commit faa870de3d
82 changed files with 315 additions and 527 deletions
+2 -14
View File
@@ -26,13 +26,6 @@ const (
ForwardingStatusOptimal
)
type LayerDirection int
const (
LayerDirectionLowToHigh LayerDirection = iota
LayerDirectionHighToLow
)
type VideoStreamingChange int
const (
@@ -154,11 +147,6 @@ var (
temporal: -1,
}
MinLayers = VideoLayers{
spatial: 0,
temporal: 0,
}
DefaultMaxLayers = VideoLayers{
spatial: DefaultMaxLayerSpatial,
temporal: DefaultMaxLayerTemporal,
@@ -539,7 +527,7 @@ func (f *Forwarder) ProvisionalAllocateGetCooperativeTransition() VideoTransitio
// 4. If not currently streaming, find the minimum layers that can unpause the stream.
//
// To summarize, co-operative streaming means
// - Try to keep tracks streaming, i. e. no pauses even if not at optimal layers
// - Try to keep tracks streaming, i.e. no pauses even if not at optimal layers
// - Do not make an upgrade as it could affect other tracks
//
f.lock.Lock()
@@ -1097,7 +1085,7 @@ func (f *Forwarder) getTranslationParamsVideo(extPkt *buffer.ExtPacket, layer in
// this will take client subscription as the winning vote and
// continue to stream current spatial layer till switch point.
// That could lead to congesting the channel.
// LK-TODO: Improve the above case, i. e. distinguish server
// LK-TODO: Improve the above case, i.e. distinguish server
// applied restriction from client requested restriction.
//
tp.shouldDrop = true