Move Prober to ccutils. (#3175)
* keep track of RTX bytes separately * packet group * Packet group of 50ms * Minor refactoring * rate calculator * send bit rate * WIP * comment * reduce packet infos size * extended twcc seq num * fix packet info * WIP * queuing delay * refactor * config * callbacks * fixes * clean up * remove debug file, fix rate calculation * fmt * fix probes * format * notes * check loss * tweak detection settings * 24-bit wrap * clean up a bit * limit symbol list to number of packets * fmt * clean up * lost * fixes * fmt * rename * fixes * fmt * use min/max * hold on early warning of congestion * make note about need for all optimal allocation on hold release * estimate trend in congested state * tweaks * quantized * fmt * TrendDetector generics * CTR trend * tweaks * config * config * comments * clean up * consistent naming * pariticpant level setting * log usage mode * probing hacks * WIP * no lock * packet group config * ctr trend refactor * cleanup and fixes * format * debug * format * move prober to ccutils * clean up * clean up
This commit is contained in:
@@ -15,18 +15,12 @@
|
||||
package sendsidebwe
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"math/rand"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/livekit/protocol/logger"
|
||||
)
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
var (
|
||||
errNoPacketInRange = errors.New("no packet in range")
|
||||
"github.com/livekit/protocol/utils/mono"
|
||||
)
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
@@ -84,11 +78,15 @@ func (p *packetTracker) RecordPacketSendAndGetSequenceNumber(at time.Time, size
|
||||
return uint16(pi.sequenceNumber)
|
||||
}
|
||||
|
||||
func (p *packetTracker) BaseSendTime() int64 {
|
||||
func (p *packetTracker) BaseSendTimeThreshold(threshold int64) (int64, bool) {
|
||||
p.lock.Lock()
|
||||
defer p.lock.Unlock()
|
||||
|
||||
return p.baseSendTime
|
||||
if p.baseSendTime == 0 {
|
||||
return 0, false
|
||||
}
|
||||
|
||||
return mono.UnixMicro() - p.baseSendTime - threshold, true
|
||||
}
|
||||
|
||||
func (p *packetTracker) RecordPacketIndicationFromRemote(sn uint16, recvTime int64) (piRecv packetInfo, sendDelta, recvDelta int64) {
|
||||
|
||||
Reference in New Issue
Block a user