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:
Raja Subramanian
2024-07-16 07:59:27 +05:30
committed by GitHub
parent a9aa65fdc6
commit f3d3ec1ce7
4 changed files with 17 additions and 5 deletions
+3 -1
View File
@@ -952,12 +952,14 @@ func (b *Buffer) buildReceptionReport() *rtcp.ReceptionReport {
return b.rtpStats.GetRtcpReceptionReport(b.mediaSSRC, proxyLoss, b.rrSnapshotId)
}
func (b *Buffer) SetSenderReportData(rtpTime uint32, ntpTime uint64) {
func (b *Buffer) SetSenderReportData(rtpTime uint32, ntpTime uint64, packets uint32, octets uint32) {
b.RLock()
srData := &RTCPSenderReportData{
RTPTimestamp: rtpTime,
NTPTimestamp: mediatransportutil.NtpTime(ntpTime),
At: time.Now(),
Packets: packets,
Octets: octets,
}
didSet := false