Record probe information in send side BWE module. (#3231)

Still not doing anythingw with it, but just making a small PR to record
that information for future use.
This commit is contained in:
Raja Subramanian
2024-12-04 14:31:00 +05:30
committed by GitHub
parent f9ee48f24b
commit d862917249
6 changed files with 50 additions and 26 deletions
+5 -10
View File
@@ -15,6 +15,7 @@
package sendsidebwe
import (
"github.com/livekit/livekit-server/pkg/sfu/ccutils"
"go.uber.org/zap/zapcore"
)
@@ -22,18 +23,10 @@ type packetInfo struct {
sequenceNumber uint64
sendTime int64
recvTime int64
probeClusterId ccutils.ProbeClusterId
size uint16
isRTX bool
// SSBWE-TODO: possibly add the following fields - pertaining to this packet,
// idea is to be able to figure out probe start/end and check for bitrate in that window
}
func (pi *packetInfo) Reset(sequenceNumber uint64) {
pi.sequenceNumber = sequenceNumber
pi.sendTime = 0
pi.recvTime = 0
pi.size = 0
pi.isRTX = false
isProbe bool
}
func (pi *packetInfo) MarshalLogObject(e zapcore.ObjectEncoder) error {
@@ -44,7 +37,9 @@ func (pi *packetInfo) MarshalLogObject(e zapcore.ObjectEncoder) error {
e.AddUint64("sequenceNumber", pi.sequenceNumber)
e.AddInt64("sendTime", pi.sendTime)
e.AddInt64("recvTime", pi.recvTime)
e.AddUint32("probeClusterId", uint32(pi.probeClusterId))
e.AddUint16("size", pi.size)
e.AddBool("isRTX", pi.isRTX)
e.AddBool("isProbe", pi.isProbe)
return nil
}