Compile in send-side bandwidth estimation. (#351)
Still not using it. But, now that Pion has merged the initial version of GCC (Google Congestion Control) for send side bandwidth estimation, we can integrate it. We will enable once we have tested and feel comfortable.
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
|
||||
"github.com/livekit/protocol/livekit"
|
||||
"github.com/livekit/protocol/logger"
|
||||
"github.com/pion/interceptor/pkg/cc"
|
||||
"github.com/pion/rtcp"
|
||||
"github.com/pion/webrtc/v3"
|
||||
|
||||
@@ -121,7 +122,7 @@ type StreamAllocator struct {
|
||||
|
||||
rembTrackingSSRC uint32
|
||||
|
||||
// LK-TODO-SSBWE bwe cc.BandwidthEstimator
|
||||
bwe cc.BandwidthEstimator
|
||||
|
||||
committedChannelCapacity int64
|
||||
lastCommitTime time.Time
|
||||
@@ -183,14 +184,12 @@ func (s *StreamAllocator) OnStreamStateChange(f func(update *StreamStateUpdate)
|
||||
s.onStreamStateChange = f
|
||||
}
|
||||
|
||||
/* LK-TODO-SSBWE
|
||||
func (s *StreamAllocator) SetBandwidthEstimator(bwe cc.BandwidthEstimator) {
|
||||
if bwe != nil {
|
||||
bwe.OnTargetBitrateChange(s.onTargetBitrateChange)
|
||||
}
|
||||
s.bwe = bwe
|
||||
}
|
||||
*/
|
||||
|
||||
type AddTrackParams struct {
|
||||
Source livekit.TrackSource
|
||||
@@ -242,11 +241,9 @@ func (s *StreamAllocator) onREMB(downTrack *DownTrack, remb *rtcp.ReceiverEstima
|
||||
|
||||
// called when a new transport-cc feedback is received
|
||||
func (s *StreamAllocator) onTransportCCFeedback(downTrack *DownTrack, fb *rtcp.TransportLayerCC) {
|
||||
/* LK-TODO-SSBWE
|
||||
if s.bwe != nil {
|
||||
s.bwe.WriteRTCP([]rtcp.Packet{fb}, nil)
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
// called when target bitrate changes
|
||||
|
||||
Reference in New Issue
Block a user