Add ability to cap the video jitter estimate to a max value.
Bug: webrtc:10572 Change-Id: I21112824dc02afa71db61bb8c2f02723e8b325b6 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133963 Commit-Queue: Michael Horowitz <mhoro@webrtc.org> Reviewed-by: Stefan Holmer <stefan@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27744}
This commit is contained in:
@ -384,7 +384,8 @@ void VCMJitterEstimator::UpdateMaxFrameSize(uint32_t frameSizeBytes) {
|
||||
|
||||
// Returns the current filtered estimate if available,
|
||||
// otherwise tries to calculate an estimate.
|
||||
int VCMJitterEstimator::GetJitterEstimate(double rttMultiplier) {
|
||||
int VCMJitterEstimator::GetJitterEstimate(double rttMultiplier,
|
||||
double jitterEstCapMs) {
|
||||
double jitterMS = CalculateEstimate() + OPERATING_SYSTEM_JITTER;
|
||||
uint64_t now = clock_->TimeInMicroseconds();
|
||||
|
||||
@ -393,8 +394,10 @@ int VCMJitterEstimator::GetJitterEstimate(double rttMultiplier) {
|
||||
|
||||
if (_filterJitterEstimate > jitterMS)
|
||||
jitterMS = _filterJitterEstimate;
|
||||
if (_nackCount >= _nackLimit)
|
||||
if (_nackCount >= _nackLimit) {
|
||||
jitterMS += _rttFilter.RttMs() * rttMultiplier;
|
||||
jitterMS = std::min(jitterMS, jitterEstCapMs);
|
||||
}
|
||||
|
||||
static const double kJitterScaleLowThreshold = 5.0;
|
||||
static const double kJitterScaleHighThreshold = 10.0;
|
||||
|
||||
Reference in New Issue
Block a user