log next sequence number also, easier to check layer switches (#1957)

This commit is contained in:
Raja Subramanian
2023-08-11 10:50:11 +05:30
committed by GitHub
parent 51650ea301
commit 114888e7c7
+4 -2
View File
@@ -1465,7 +1465,8 @@ func (f *Forwarder) processSourceSwitch(extPkt *buffer.ExtPacket, layer int32) e
// 3. expectedTS -> expected timestamp of this packet calculated based on elapsed time since first packet
// Ideally, refTS and expectedTS should be very close and lastTS should be before both of those.
// But, cases like muting/unmuting, clock vagaries, pacing, etc. make them not satisfy those conditions always.
lastTS := f.rtpMunger.GetLast().LastTS
rtpMungerState := f.rtpMunger.GetLast()
lastTS := rtpMungerState.LastTS
refTS := lastTS
expectedTS := lastTS
switchingAt := time.Now()
@@ -1583,7 +1584,8 @@ func (f *Forwarder) processSourceSwitch(extPkt *buffer.ExtPacket, layer int32) e
"referenceLayerSpatial", f.referenceLayerSpatial,
"expectedTS", expectedTS,
"nextTS", nextTS,
"jump", nextTS-lastTS,
"tsJump", nextTS-lastTS,
"nextSN", rtpMungerState.LastSN+1,
)
f.rtpMunger.UpdateSnTsOffsets(extPkt, 1, nextTS-lastTS)