Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Unified Diff: webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc

Issue 2126793002: Reset InterArrival if arrival time clock makes a jump. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Cleanup Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc
index f9588096a070226e1d4cc18e9e68bc07c9d1d5f8..c9f0dde58dca7c996d660a76d718963e743568e4 100644
--- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc
+++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc
@@ -231,7 +231,7 @@ void RemoteBitrateEstimatorTest::IncomingPacket(uint32_t ssrc,
header.timestamp = rtp_timestamp;
header.extension.hasAbsoluteSendTime = true;
header.extension.absoluteSendTime = absolute_send_time;
- bitrate_estimator_->IncomingPacket(arrival_time + kArrivalTimeClockOffsetMs,
+ bitrate_estimator_->IncomingPacket(arrival_time + arrival_time_offset_ms_,
payload_size, header);
}
@@ -429,7 +429,8 @@ void RemoteBitrateEstimatorTest::RateIncreaseRtpTimestampsTestHelper(
void RemoteBitrateEstimatorTest::CapacityDropTestHelper(
int number_of_streams,
bool wrap_time_stamp,
- uint32_t expected_bitrate_drop_delta) {
+ uint32_t expected_bitrate_drop_delta,
+ int64_t receiver_clock_offset_change_ms) {
const int kFramerate = 30;
const int kStartBitrate = 900e3;
const int kMinExpectedBitrate = 800e3;
@@ -477,6 +478,9 @@ void RemoteBitrateEstimatorTest::CapacityDropTestHelper(
EXPECT_NEAR(kInitialCapacityBps, bitrate_bps, 130000u);
bitrate_observer_->Reset();
+ // Add an offset to make sure the BWE can handle it.
+ arrival_time_offset_ms_ += receiver_clock_offset_change_ms;
+
// Reduce the capacity and verify the decrease time.
stream_generator_->set_capacity_bps(kReducedCapacityBps);
int64_t overuse_start_time = clock_.TimeInMilliseconds();

Powered by Google App Engine
This is Rietveld 408576698