Make sender report pass through an option. (#2861)
Enabled by default. Also, tweak the long term propagation delay a bit. The first propagation delay itself was too high and the long term initialized with a high value. Prevent that and also ensure large negtaives do not have an effect by using a lower bound of 0. Lower bound of 0 is okay as the main purpose is to track sustained high positive values.
This commit is contained in:
@@ -606,7 +606,7 @@ func (r *RTPStatsSender) GetExpectedRTPTimestamp(at time.Time) (expectedTSExt ui
|
||||
return
|
||||
}
|
||||
|
||||
func (r *RTPStatsSender) GetRtcpSenderReport(ssrc uint32, publisherSRData *RTCPSenderReportData, tsOffset uint64) *rtcp.SenderReport {
|
||||
func (r *RTPStatsSender) GetRtcpSenderReport(ssrc uint32, publisherSRData *RTCPSenderReportData, tsOffset uint64, passThrough bool) *rtcp.SenderReport {
|
||||
r.lock.Lock()
|
||||
defer r.lock.Unlock()
|
||||
|
||||
@@ -620,7 +620,7 @@ func (r *RTPStatsSender) GetRtcpSenderReport(ssrc uint32, publisherSRData *RTCPS
|
||||
nowNTP mediatransportutil.NtpTime
|
||||
nowRTPExt uint64
|
||||
)
|
||||
if cPassthroughNTPTimestamp {
|
||||
if passThrough {
|
||||
nowNTP = publisherSRData.NTPTimestamp
|
||||
nowRTPExt = publisherSRData.RTPTimestampExt - tsOffset
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user