From 5c0a4beb61ba11b4801262e52b9360e5cba7bcd1 Mon Sep 17 00:00:00 2001 From: Raja Subramanian Date: Fri, 11 Aug 2023 13:03:10 +0530 Subject: [PATCH] Log more about layer offset. (#1959) Seeing a good chunk of logs using default offset. And it is concentrated heavily on few tracks. Logging more to understand this better before potentially demoting this log. --- pkg/sfu/buffer/rtpstats.go | 4 ++-- pkg/sfu/streamtrackermanager.go | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pkg/sfu/buffer/rtpstats.go b/pkg/sfu/buffer/rtpstats.go index f73e1676b..e792c819c 100644 --- a/pkg/sfu/buffer/rtpstats.go +++ b/pkg/sfu/buffer/rtpstats.go @@ -819,9 +819,9 @@ func (r *RTPStats) SetRtcpSenderReportData(srData *RTCPSenderReportData) { if r.srNewest != nil && r.srNewest.NTPTimestamp > srData.NTPTimestamp { r.logger.Infow( "received anachronous sender report", - "currentNTP", srData.NTPTimestamp.Time(), + "currentNTP", srData.NTPTimestamp.Time().String(), "currentRTP", srData.RTPTimestamp, - "lastNTP", r.srNewest.NTPTimestamp.Time(), + "lastNTP", r.srNewest.NTPTimestamp.Time().String(), "lastRTP", r.srNewest.RTPTimestamp, ) return diff --git a/pkg/sfu/streamtrackermanager.go b/pkg/sfu/streamtrackermanager.go index 30ba98322..8f3c45190 100644 --- a/pkg/sfu/streamtrackermanager.go +++ b/pkg/sfu/streamtrackermanager.go @@ -571,7 +571,15 @@ func (s *StreamTrackerManager) updateLayerOffsetLocked(ref, other int32) { // use minimal offset to indicate value availability in the extremely unlikely case of // both layers using the same timestamp if offset == 0 { - s.logger.Infow("using default offset", "ref", ref, "other", other) + s.logger.Infow( + "using default offset", + "ref", ref, + "refNTP", srRef.NTPTimestamp.Time().String(), + "refRTP", srRef.RTPTimestamp, + "other", other, + "otherNTP", srOther.NTPTimestamp.Time().String(), + "otherRTP", srOther.RTPTimestamp, + ) offset = 1 }