(i, j int)
| 215 | } |
| 216 | |
| 217 | func (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 |
no outgoing calls