Move probe observer to pacer (#3214)

* Probe ID pass

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* clean up

* typo

* populate desired bytes

* correct num probes calculation

* debug log

* remove unused constant

* log channel observer

* debug

* clear isInProbe flag on end

* clear probe flag on reset

* re-arrange
This commit is contained in:
Raja Subramanian
2024-11-29 09:19:48 +05:30
committed by GitHub
parent 3372e6e285
commit 427ed23478
10 changed files with 442 additions and 405 deletions
+12
View File
@@ -18,14 +18,18 @@ import (
"sync"
"time"
"github.com/livekit/livekit-server/pkg/sfu/ccutils"
"github.com/pion/rtp"
"github.com/pion/webrtc/v4"
)
type Packet struct {
Header *rtp.Header
HeaderSize int
Payload []byte
IsRTX bool
ProbeClusterId ccutils.ProbeClusterId
IsProbe bool
AbsSendTimeExtID uint8
TransportWideExtID uint8
WriteStream webrtc.TrackLocalWriter
@@ -39,6 +43,14 @@ type Pacer interface {
SetInterval(interval time.Duration)
SetBitrate(bitrate int)
SetPacerProbeObserverListener(listener PacerProbeObserverListener)
StartProbeCluster(probeClusterId ccutils.ProbeClusterId, desiredBytes int)
EndProbeCluster(probeClusterId ccutils.ProbeClusterId) ccutils.ProbeClusterInfo
}
type PacerProbeObserverListener interface {
OnPacerProbeObserverClusterComplete(probeClusterId ccutils.ProbeClusterId)
}
// ------------------------------------------------