Logging delta of receiver report (#1676)
This commit is contained in:
@@ -753,11 +753,24 @@ func (r *RTPStats) SetRtcpSenderReportData(srData *RTCPSenderReportData) {
|
|||||||
smoothedOwd = (owd + smoothedOwd) / 2
|
smoothedOwd = (owd + smoothedOwd) / 2
|
||||||
// TODO-REMOVE-AFTER-DEBUG
|
// TODO-REMOVE-AFTER-DEBUG
|
||||||
if r.params.ClockRate != 90000 { // log only for audio as it is less frequent
|
if r.params.ClockRate != 90000 { // log only for audio as it is less frequent
|
||||||
|
ntpTime := srData.NTPTimestamp.Time()
|
||||||
|
|
||||||
|
var ntpDiffSinceLast, arrivalDiffSinceLast time.Duration
|
||||||
|
var rtpDiffSinceLast uint32
|
||||||
|
if r.srDataExt != nil {
|
||||||
|
ntpDiffSinceLast = ntpTime.Sub(r.srDataExt.SenderReportData.NTPTimestamp.Time())
|
||||||
|
rtpDiffSinceLast = srData.RTPTimestamp - r.srDataExt.SenderReportData.RTPTimestamp
|
||||||
|
arrivalDiffSinceLast = srData.ArrivalTime.Sub(r.srDataExt.SenderReportData.ArrivalTime)
|
||||||
|
}
|
||||||
r.logger.Debugw(
|
r.logger.Debugw(
|
||||||
"received sender report",
|
"received sender report",
|
||||||
"ntp", srData.NTPTimestamp.Time(),
|
"ntp", ntpTime,
|
||||||
"rtp", srData.RTPTimestamp,
|
"rtp", srData.RTPTimestamp,
|
||||||
"arrival", srData.ArrivalTime,
|
"arrival", srData.ArrivalTime,
|
||||||
|
"ntpDiff", ntpDiffSinceLast,
|
||||||
|
"rtpDiff", rtpDiffSinceLast,
|
||||||
|
"arrivalDiff", arrivalDiffSinceLast,
|
||||||
|
"expectedTimeDiff", float64(rtpDiffSinceLast)/float64(r.params.ClockRate),
|
||||||
"owd", owd,
|
"owd", owd,
|
||||||
"smoothedOwd", smoothedOwd,
|
"smoothedOwd", smoothedOwd,
|
||||||
)
|
)
|
||||||
@@ -1381,6 +1394,7 @@ func (r *RTPStats) getIntervalStats(startInclusive uint16, endExclusive uint16)
|
|||||||
"start", startInclusive,
|
"start", startInclusive,
|
||||||
"end", endExclusive,
|
"end", endExclusive,
|
||||||
"count", packetsNotFound,
|
"count", packetsNotFound,
|
||||||
|
"highestSN", r.highestSN,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user