Deficient state handling when a track needs a change (#261)
* WIP commit * deficient handling * Add missing ProvisionalAllocatePrepare * adjust state on track removal * Increase test timeout * - Add comments about cooperative routines - Take down transition if available in cooperative scheme - Use layer comparison when taking down transition. Because of when the bitrate is measured, it is not always guaranteed bandwidthDelta is -ve when moving down. - Do not add track to stream allocator till bind. * make comment better * a bit more clear comments * Use OnBind on subscribed track
This commit is contained in:
@@ -797,7 +797,9 @@ func (p *ParticipantImpl) AddSubscribedTrack(subTrack types.SubscribedTrack) {
|
||||
p.subscribedTracks[subTrack.ID()] = subTrack
|
||||
p.lock.Unlock()
|
||||
|
||||
p.subscriber.AddTrack(subTrack)
|
||||
subTrack.OnBind(func() {
|
||||
p.subscriber.AddTrack(subTrack)
|
||||
})
|
||||
p.subscribedTo.Store(subTrack.PublisherIdentity(), struct{}{})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user