Accept more range for first packet time adjustment. (#2150)

This commit is contained in:
Raja Subramanian
2023-10-17 23:52:14 +05:30
committed by GitHub
parent 11c9c56a4d
commit 3e4cd3a161
7 changed files with 30 additions and 31 deletions
+5 -8
View File
@@ -32,7 +32,7 @@ const (
cFirstSnapshotID = 1
cFirstPacketTimeAdjustWindow = 2 * time.Minute
cFirstPacketTimeAdjustThreshold = 5 * time.Second
cFirstPacketTimeAdjustThreshold = 5 * time.Minute
)
// -------------------------------------------------------
@@ -109,10 +109,7 @@ type RTCPSenderReportData struct {
RTPTimestamp uint32
RTPTimestampExt uint64
NTPTimestamp mediatransportutil.NtpTime
PacketCount uint32
// RAJA-REMOVE PacketCountExt uint64
PaddingOnlyDrops uint64
At time.Time
At time.Time
}
type RTPStatsParams struct {
@@ -484,7 +481,7 @@ func (r *rtpStatsBase) maybeAdjustFirstPacketTime(ets uint64, extStartTS uint64)
"nowTime", now.String(),
"before", r.firstTime.String(),
"after", firstTime.String(),
"adjustment", r.firstTime.Sub(firstTime),
"adjustment", r.firstTime.Sub(firstTime).String(),
"extNowTS", ets,
"extStartTS", extStartTS,
)
@@ -494,7 +491,7 @@ func (r *rtpStatsBase) maybeAdjustFirstPacketTime(ets uint64, extStartTS uint64)
"nowTime", now.String(),
"before", r.firstTime.String(),
"after", firstTime.String(),
"adjustment", r.firstTime.Sub(firstTime),
"adjustment", r.firstTime.Sub(firstTime).String(),
"extNowTS", ets,
"extStartTS", extStartTS,
)
@@ -537,7 +534,7 @@ func (r *rtpStatsBase) deltaInfo(snapshotID uint32, extStartSN uint64, extHighes
"packetsExpected", packetsExpected,
"startTime", startTime,
"endTime", endTime,
"duration", endTime.Sub(startTime),
"duration", endTime.Sub(startTime).String(),
)
return nil
}