Use rtp converter from protocol/utils/rtputil (#4020)

* Use rtp converter from protocol/utils/rtputil

* lock x/tools as counterfeiter needs it
This commit is contained in:
Raja Subramanian
2025-10-22 15:15:46 +05:30
committed by GitHub
parent 5a426d15e1
commit 5042c06cb2
3 changed files with 38 additions and 51 deletions
+3 -2
View File
@@ -25,6 +25,7 @@ import (
"github.com/livekit/protocol/livekit"
"github.com/livekit/protocol/utils"
"github.com/livekit/protocol/utils/mono"
"github.com/livekit/protocol/utils/rtputil"
)
const (
@@ -205,7 +206,7 @@ func RTCPSenderReportPropagationDelay(rsrs *livekit.RTCPSenderReportState, passT
type rtpStatsBase struct {
*rtpStatsBaseLite
rtpConverter *utils.RTPConverter
rtpConverter *rtputil.RTPConverter
firstTime int64
firstTimeAdjustment time.Duration
@@ -248,7 +249,7 @@ type rtpStatsBase struct {
func newRTPStatsBase(params RTPStatsParams) *rtpStatsBase {
return &rtpStatsBase{
rtpStatsBaseLite: newRTPStatsBaseLite(params),
rtpConverter: utils.NewRTPConverter(int64(params.ClockRate)),
rtpConverter: rtputil.NewRTPConverter(int64(params.ClockRate)),
nextSnapshotID: cFirstSnapshotID,
snapshots: make([]snapshot, 2),
}