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:
Raja Subramanian
2024-07-15 11:27:31 +05:30
committed by GitHub
parent a995c71f84
commit faa66d1138
8 changed files with 144 additions and 70 deletions
+2 -4
View File
@@ -37,8 +37,6 @@ const (
cFirstPacketTimeAdjustWindow = 2 * time.Minute
cFirstPacketTimeAdjustThreshold = 15 * 1e9
cPassthroughNTPTimestamp = true
cSequenceNumberLargeJumpThreshold = 100
)
@@ -122,8 +120,8 @@ type RTCPSenderReportData struct {
AtAdjusted time.Time
}
func (r *RTCPSenderReportData) PropagationDelay() time.Duration {
if cPassthroughNTPTimestamp {
func (r *RTCPSenderReportData) PropagationDelay(passThrough bool) time.Duration {
if passThrough {
return 0
}