Record packet/octet count in sender report. (#2864)
Seeing cases of huge jumps in sender erport rtp time stamp (of the order of minutes) a few hundred ms after start of track. Only less than 20 packets have been published at that time as seen by server. Adding these to sender report to check if client thinks it has sent much more.
This commit is contained in:
@@ -118,6 +118,8 @@ type RTCPSenderReportData struct {
|
||||
NTPTimestamp mediatransportutil.NtpTime
|
||||
At time.Time
|
||||
AtAdjusted time.Time
|
||||
Packets uint32
|
||||
Octets uint32
|
||||
}
|
||||
|
||||
func (r *RTCPSenderReportData) PropagationDelay(passThrough bool) time.Duration {
|
||||
@@ -133,12 +135,14 @@ func (r *RTCPSenderReportData) ToString() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
return fmt.Sprintf("ntp: %s, rtp: %d, extRtp: %d, at: %s, atAdj: %s",
|
||||
return fmt.Sprintf("ntp: %s, rtp: %d, extRtp: %d, at: %s, atAdj: %s, p: %d, o: %d",
|
||||
r.NTPTimestamp.Time().String(),
|
||||
r.RTPTimestamp,
|
||||
r.RTPTimestampExt,
|
||||
r.At.String(),
|
||||
r.AtAdjusted.String(),
|
||||
r.Packets,
|
||||
r.Octets,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -152,6 +156,8 @@ func (r *RTCPSenderReportData) MarshalLogObject(e zapcore.ObjectEncoder) error {
|
||||
e.AddUint64("RTPTimestampExt", r.RTPTimestampExt)
|
||||
e.AddTime("At", r.At)
|
||||
e.AddTime("AtAdjusted", r.AtAdjusted)
|
||||
e.AddUint32("Packets", r.Packets)
|
||||
e.AddUint32("Octets", r.Octets)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user