Index: webrtc/modules/congestion_controller/delay_based_bwe_unittest.cc |
diff --git a/webrtc/modules/congestion_controller/delay_based_bwe_unittest.cc b/webrtc/modules/congestion_controller/delay_based_bwe_unittest.cc |
index a78dd7fb08ed0a7074ec1719095c892ba9837927..7efd29f05476f444f106c0d15349df8d80ab4d36 100644 |
--- a/webrtc/modules/congestion_controller/delay_based_bwe_unittest.cc |
+++ b/webrtc/modules/congestion_controller/delay_based_bwe_unittest.cc |
@@ -33,6 +33,7 @@ |
int64_t arrival_time, |
uint32_t rtp_timestamp, |
uint32_t absolute_send_time, |
+ bool was_paced, |
int probe_cluster_id) { |
RTPHeader header; |
memset(&header, 0, sizeof(header)); |
@@ -41,7 +42,7 @@ |
header.extension.hasAbsoluteSendTime = true; |
header.extension.absoluteSendTime = absolute_send_time; |
bwe_.IncomingPacket(arrival_time + kArrivalTimeClockOffsetMs, payload_size, |
- header, probe_cluster_id); |
+ header, was_paced, probe_cluster_id); |
} |
void OnReceiveBitrateChanged(const std::vector<uint32_t>& ssrcs, |
@@ -73,7 +74,8 @@ |
for (int i = 0; i < kNumProbes; ++i) { |
clock_.AdvanceTimeMilliseconds(10); |
now_ms = clock_.TimeInMilliseconds(); |
- IncomingPacket(0, 1000, now_ms, 90 * now_ms, AbsSendTime(now_ms, 1000), 0); |
+ IncomingPacket(0, 1000, now_ms, 90 * now_ms, AbsSendTime(now_ms, 1000), |
+ true, 0); |
} |
EXPECT_TRUE(bitrate_updated()); |
@@ -81,7 +83,8 @@ |
for (int i = 0; i < kNumProbes; ++i) { |
clock_.AdvanceTimeMilliseconds(5); |
now_ms = clock_.TimeInMilliseconds(); |
- IncomingPacket(0, 1000, now_ms, 90 * now_ms, AbsSendTime(now_ms, 1000), 1); |
+ IncomingPacket(0, 1000, now_ms, 90 * now_ms, AbsSendTime(now_ms, 1000), |
+ true, 1); |
} |
EXPECT_TRUE(bitrate_updated()); |
@@ -95,11 +98,12 @@ |
for (int i = 0; i < kNumProbes; ++i) { |
clock_.AdvanceTimeMilliseconds(5); |
now_ms = clock_.TimeInMilliseconds(); |
- IncomingPacket(0, 1000, now_ms, 90 * now_ms, AbsSendTime(now_ms, 1000), 0); |
+ IncomingPacket(0, 1000, now_ms, 90 * now_ms, AbsSendTime(now_ms, 1000), |
+ true, 0); |
// Non-paced packet, arriving 5 ms after. |
clock_.AdvanceTimeMilliseconds(5); |
IncomingPacket(0, PacedSender::kMinProbePacketSize + 1, now_ms, 90 * now_ms, |
- AbsSendTime(now_ms, 1000), PacketInfo::kNotAProbe); |
+ AbsSendTime(now_ms, 1000), false, PacketInfo::kNotAProbe); |
} |
EXPECT_TRUE(bitrate_updated()); |
@@ -117,7 +121,7 @@ |
now_ms = clock_.TimeInMilliseconds(); |
send_time_ms += 10; |
IncomingPacket(0, 1000, now_ms, 90 * send_time_ms, |
- AbsSendTime(send_time_ms, 1000), 0); |
+ AbsSendTime(send_time_ms, 1000), true, 0); |
} |
// Second burst sent at 8 * 1000 / 5 = 1600 kbps, arriving at 8 * 1000 / 8 = |
@@ -127,7 +131,7 @@ |
now_ms = clock_.TimeInMilliseconds(); |
send_time_ms += 5; |
IncomingPacket(0, 1000, now_ms, send_time_ms, |
- AbsSendTime(send_time_ms, 1000), 1); |
+ AbsSendTime(send_time_ms, 1000), true, 1); |
} |
EXPECT_TRUE(bitrate_updated()); |
@@ -144,7 +148,7 @@ |
send_time_ms += 10; |
now_ms = clock_.TimeInMilliseconds(); |
IncomingPacket(0, 1000, now_ms, 90 * send_time_ms, |
- AbsSendTime(send_time_ms, 1000), 23); |
+ AbsSendTime(send_time_ms, 1000), true, 23); |
} |
EXPECT_TRUE(bitrate_updated()); |
@@ -161,7 +165,7 @@ |
send_time_ms += 10; |
now_ms = clock_.TimeInMilliseconds(); |
IncomingPacket(0, 1000, now_ms, 90 * send_time_ms, |
- AbsSendTime(send_time_ms, 1000), 0); |
+ AbsSendTime(send_time_ms, 1000), true, 0); |
} |
EXPECT_FALSE(bitrate_updated()); |
@@ -177,7 +181,7 @@ |
send_time_ms += 5; |
now_ms = clock_.TimeInMilliseconds(); |
IncomingPacket(0, 1000, now_ms, 90 * send_time_ms, |
- AbsSendTime(send_time_ms, 1000), 1); |
+ AbsSendTime(send_time_ms, 1000), true, 1); |
} |
EXPECT_TRUE(bitrate_updated()); |
@@ -194,7 +198,7 @@ |
send_time_ms += 1; |
now_ms = clock_.TimeInMilliseconds(); |
IncomingPacket(0, 1000, now_ms, 90 * send_time_ms, |
- AbsSendTime(send_time_ms, 1000), 1); |
+ AbsSendTime(send_time_ms, 1000), true, 1); |
} |
EXPECT_TRUE(bitrate_updated()); |
@@ -209,7 +213,7 @@ |
clock_.AdvanceTimeMilliseconds(10); |
now_ms = clock_.TimeInMilliseconds(); |
IncomingPacket(0, PacedSender::kMinProbePacketSize, now_ms, 90 * now_ms, |
- AbsSendTime(now_ms, 1000), 1); |
+ AbsSendTime(now_ms, 1000), true, 1); |
} |
EXPECT_FALSE(bitrate_updated()); |
@@ -219,7 +223,8 @@ |
for (int i = 0; i < kNumProbes; ++i) { |
clock_.AdvanceTimeMilliseconds(10); |
now_ms = clock_.TimeInMilliseconds(); |
- IncomingPacket(0, 1000, now_ms, 90 * now_ms, AbsSendTime(now_ms, 1000), 1); |
+ IncomingPacket(0, 1000, now_ms, 90 * now_ms, AbsSendTime(now_ms, 1000), |
+ true, 1); |
} |
// Wait long enough so that we can call Process again. |