Probe controller refactor (#3221)

* WIP

* WIP

* WIP
This commit is contained in:
Raja Subramanian
2024-11-30 01:38:25 +05:30
committed by GitHub
parent 0a3ba87183
commit 44d26f0cb4
10 changed files with 476 additions and 604 deletions
+3 -27
View File
@@ -17,6 +17,7 @@ package bwe
import (
"fmt"
"github.com/livekit/livekit-server/pkg/sfu/ccutils"
"github.com/pion/rtcp"
)
@@ -51,29 +52,6 @@ func (c CongestionState) String() string {
// ------------------------------------------------
type ChannelTrend int
const (
ChannelTrendNeutral ChannelTrend = iota
ChannelTrendClearing
ChannelTrendCongesting
)
func (c ChannelTrend) String() string {
switch c {
case ChannelTrendNeutral:
return "NEUTRAL"
case ChannelTrendClearing:
return "CLEARING"
case ChannelTrendCongesting:
return "CONGESTING"
default:
return fmt.Sprintf("%d", int(c))
}
}
// ------------------------------------------------
type BWE interface {
SetBWEListener(bweListner BWEListener)
@@ -83,7 +61,6 @@ type BWE interface {
HandleREMB(
receivedEstimate int64,
isProbeFinalizing bool,
expectedBandwidthUsage int64,
sentPackets uint32,
repeatedNacks uint32,
@@ -94,9 +71,8 @@ type BWE interface {
HandleTWCCFeedback(report *rtcp.TransportLayerCC)
ProbingStart(expectedBandwidthUsage int64)
ProbingEnd(isNotFailing bool, isGoalReached bool)
GetProbeStatus() (isValidSignal bool, trend ChannelTrend, lowestEstimate int64, highestEstimate int64)
ProbeClusterStarting(pci ccutils.ProbeClusterInfo)
ProbeClusterDone(pci ccutils.ProbeClusterInfo) (bool, int64)
}
// ------------------------------------------------