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:
@@ -287,7 +287,7 @@ func (d *DownTrack) WriteRTP(extPkt *buffer.ExtPacket, layer int32) error {
|
||||
}
|
||||
|
||||
if d.sequencer != nil {
|
||||
meta := d.sequencer.push(extPkt.Packet.SequenceNumber, tp.rtp.sequenceNumber, tp.rtp.timestamp, 0, extPkt.Head)
|
||||
meta := d.sequencer.push(extPkt.Packet.SequenceNumber, tp.rtp.sequenceNumber, tp.rtp.timestamp, uint8(layer), extPkt.Head)
|
||||
if meta != nil && tp.vp8 != nil {
|
||||
meta.packVP8(tp.vp8.header)
|
||||
}
|
||||
@@ -550,6 +550,14 @@ func (d *DownTrack) ProvisionalAllocate(availableChannelCapacity int64, layers V
|
||||
return d.forwarder.ProvisionalAllocate(availableChannelCapacity, layers)
|
||||
}
|
||||
|
||||
func (d *DownTrack) ProvisionalAllocateGetCooperativeTransition() VideoTransition {
|
||||
return d.forwarder.ProvisionalAllocateGetCooperativeTransition()
|
||||
}
|
||||
|
||||
func (d *DownTrack) ProvisionalAllocateGetBestWeightedTransition() VideoTransition {
|
||||
return d.forwarder.ProvisionalAllocateGetBestWeightedTransition()
|
||||
}
|
||||
|
||||
func (d *DownTrack) ProvisionalAllocateCommit() VideoAllocation {
|
||||
return d.forwarder.ProvisionalAllocateCommit()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user