Keep congestion state only in BWE. (#3224)
This commit is contained in:
@@ -331,6 +331,8 @@ func newCongestionDetector(params congestionDetectorParams) *congestionDetector
|
||||
twccFeedback: newTWCCFeedback(twccFeedbackParams{Logger: params.Logger}),
|
||||
wake: make(chan struct{}, 1),
|
||||
estimatedAvailableChannelCapacity: 100_000_000,
|
||||
congestionState: bwe.CongestionStateNone,
|
||||
congestionStateSwitchedAt: mono.Now(),
|
||||
}
|
||||
|
||||
c.feedbackReports.SetMinCapacity(3)
|
||||
@@ -339,14 +341,6 @@ func newCongestionDetector(params congestionDetectorParams) *congestionDetector
|
||||
return c
|
||||
}
|
||||
|
||||
func (c *congestionDetector) Reset() {
|
||||
// SSBWE-TODO
|
||||
// 1. may be clear all packet groups?
|
||||
// 2. reset congestion state to none
|
||||
// 3. reset estimate to 100 Mbps
|
||||
// 4. reset packet_tracker?? maybe only the probe state??
|
||||
}
|
||||
|
||||
func (c *congestionDetector) Stop() {
|
||||
c.stop.Break()
|
||||
}
|
||||
@@ -377,6 +371,13 @@ func (c *congestionDetector) HandleTWCCFeedback(report *rtcp.TransportLayerCC) {
|
||||
}
|
||||
}
|
||||
|
||||
func (c *congestionDetector) CongestionState() bwe.CongestionState {
|
||||
c.lock.RLock()
|
||||
defer c.lock.RUnlock()
|
||||
|
||||
return c.congestionState
|
||||
}
|
||||
|
||||
func (c *congestionDetector) prunePacketGroups() {
|
||||
if len(c.packetGroups) == 0 {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user