MCPcopy
hub / github.com/livekit/livekit / Less

Method Less

pkg/sfu/streamallocator/track.go:217–231  ·  view source on GitHub ↗
(i, j int)

Source from the content-addressed store, hash-verified

215}
216
217func (t TrackSorter) Less(i, j int) bool {
218 //
219 // TrackSorter is used to allocate layer-by-layer.
220 // So, higher priority track should come earlier so that it gets an earlier shot at each layer
221 //
222 if t[i].priority != t[j].priority {
223 return t[i].priority > t[j].priority
224 }
225
226 if t[i].maxLayer.Spatial != t[j].maxLayer.Spatial {
227 return t[i].maxLayer.Spatial > t[j].maxLayer.Spatial
228 }
229
230 return t[i].maxLayer.Temporal > t[j].maxLayer.Temporal
231}
232
233// ------------------------------------------------
234

Callers 3

TestDecompressGzipFunction · 0.45
TestAudioLevelFunction · 0.45
TestAgentLoadBalancingFunction · 0.45

Calls

no outgoing calls

Tested by 3

TestDecompressGzipFunction · 0.36
TestAudioLevelFunction · 0.36
TestAgentLoadBalancingFunction · 0.36