Splitting out rtp stats stuff into its own package. (#3060)
* Splitting out rtp stats stuff into its own package. Going to be making some lighter versions of these. Will be cleaner to have all of these grouped together. So, as a first step, just making a package for it. * tests
This commit is contained in:
+3
-2
@@ -35,6 +35,7 @@ import (
|
||||
"github.com/livekit/livekit-server/pkg/sfu/buffer"
|
||||
"github.com/livekit/livekit-server/pkg/sfu/connectionquality"
|
||||
dd "github.com/livekit/livekit-server/pkg/sfu/rtpextension/dependencydescriptor"
|
||||
"github.com/livekit/livekit-server/pkg/sfu/rtpstats"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -597,7 +598,7 @@ func (w *WebRTCReceiver) GetTrackStats() *livekit.RTPStats {
|
||||
stats = append(stats, sswl)
|
||||
}
|
||||
|
||||
return buffer.AggregateRTPStats(stats)
|
||||
return rtpstats.AggregateRTPStats(stats)
|
||||
}
|
||||
|
||||
func (w *WebRTCReceiver) GetAudioLevel() (float64, bool) {
|
||||
@@ -636,7 +637,7 @@ func (w *WebRTCReceiver) GetDeltaStats() map[uint32]*buffer.StreamStatsWithLayer
|
||||
}
|
||||
|
||||
// patch buffer stats with correct layer
|
||||
patched := make(map[int32]*buffer.RTPDeltaInfo, 1)
|
||||
patched := make(map[int32]*rtpstats.RTPDeltaInfo, 1)
|
||||
patched[int32(layer)] = sswl.Layers[0]
|
||||
sswl.Layers = patched
|
||||
|
||||
|
||||
Reference in New Issue
Block a user