| 222 | } |
| 223 | |
| 224 | type StreamAllocator struct { |
| 225 | params StreamAllocatorParams |
| 226 | |
| 227 | onStreamStateChange func(update *StreamStateUpdate) error |
| 228 | |
| 229 | sendSideBWEInterceptor cc.BandwidthEstimator |
| 230 | |
| 231 | enabled bool |
| 232 | allowPause bool |
| 233 | |
| 234 | committedChannelCapacity int64 |
| 235 | overriddenChannelCapacity int64 |
| 236 | |
| 237 | prober *ccutils.Prober |
| 238 | |
| 239 | videoTracksMu sync.RWMutex |
| 240 | videoTracks map[livekit.TrackID]*Track |
| 241 | videoTracksShadow []*Track |
| 242 | isAllocateAllPending bool |
| 243 | rembTrackingSSRC uint32 |
| 244 | |
| 245 | state streamAllocatorState |
| 246 | |
| 247 | activeProbeClusterId ccutils.ProbeClusterId |
| 248 | activeProbeGoalReached bool |
| 249 | activeProbeCongesting bool |
| 250 | |
| 251 | eventsQueue *utils.TypedOpsQueue[Event] |
| 252 | |
| 253 | lastRTTTime time.Time |
| 254 | |
| 255 | pingGeneration atomic.Uint32 |
| 256 | |
| 257 | isStopped atomic.Bool |
| 258 | } |
| 259 | |
| 260 | func NewStreamAllocator(params StreamAllocatorParams, enabled bool, allowPause bool) *StreamAllocator { |
| 261 | s := &StreamAllocator{ |
nothing calls this directly
no outgoing calls
no test coverage detected