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}
diff --git a/modules/video_coding/frame_buffer2_unittest.cc b/modules/video_coding/frame_buffer2_unittest.cc
index 0fb2572..fe0123e 100644
--- a/modules/video_coding/frame_buffer2_unittest.cc
+++ b/modules/video_coding/frame_buffer2_unittest.cc
@@ -83,7 +83,8 @@
void(int64_t frameDelayMs,
uint32_t frameSizeBytes,
bool incompleteFrame));
- MOCK_METHOD1(GetJitterEstimate, int(double rttMultiplier));
+ MOCK_METHOD2(GetJitterEstimate,
+ int(double rttMultiplier, double jitterEstCapMs));
};
class FrameObjectFake : public EncodedFrame {
@@ -403,12 +404,12 @@
uint16_t pid = Rand();
uint32_t ts = Rand();
- EXPECT_CALL(jitter_estimator_, GetJitterEstimate(1.0));
+ EXPECT_CALL(jitter_estimator_, GetJitterEstimate(1.0, 300.0));
InsertFrame(pid, 0, ts, false, true);
ExtractFrame();
buffer_->SetProtectionMode(kProtectionNackFEC);
- EXPECT_CALL(jitter_estimator_, GetJitterEstimate(0.0));
+ EXPECT_CALL(jitter_estimator_, GetJitterEstimate(0.0, 300.0));
InsertFrame(pid + 1, 0, ts, false, true);
ExtractFrame();
}