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..3cff49882d88e4886e55401eaddcc27ad2e42375 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 |
@@ -224,7 +224,8 @@ |
size_t payload_size, |
int64_t arrival_time, |
uint32_t rtp_timestamp, |
- uint32_t absolute_send_time) { |
+ uint32_t absolute_send_time, |
+ bool was_paced) { |
RTPHeader header; |
memset(&header, 0, sizeof(header)); |
header.ssrc = ssrc; |
@@ -232,7 +233,7 @@ |
header.extension.hasAbsoluteSendTime = true; |
header.extension.absoluteSendTime = absolute_send_time; |
bitrate_estimator_->IncomingPacket(arrival_time + kArrivalTimeClockOffsetMs, |
- payload_size, header); |
+ payload_size, header, was_paced); |
} |
// Generates a frame of packets belonging to a stream at a given bitrate and |
@@ -257,7 +258,7 @@ |
clock_.TimeInMicroseconds()); |
IncomingPacket(packet->ssrc, packet->size, |
(packet->arrival_time + 500) / 1000, packet->rtp_timestamp, |
- AbsSendTime(packet->send_time, 1000000)); |
+ AbsSendTime(packet->send_time, 1000000), true); |
if (bitrate_observer_->updated()) { |
if (bitrate_observer_->latest_bitrate() < bitrate_bps) |
overuse = true; |
@@ -330,7 +331,7 @@ |
} |
IncomingPacket(kDefaultSsrc, kMtu, clock_.TimeInMilliseconds(), timestamp, |
- absolute_send_time); |
+ absolute_send_time, true); |
clock_.AdvanceTimeMilliseconds(1000 / kFramerate); |
timestamp += 90 * kFrameIntervalMs; |
absolute_send_time = AddAbsSendTime(absolute_send_time, |
@@ -368,7 +369,7 @@ |
} |
IncomingPacket(kDefaultSsrc, kMtu, clock_.TimeInMilliseconds(), timestamp, |
- absolute_send_time); |
+ absolute_send_time, true); |
clock_.AdvanceTimeMilliseconds(kFrameIntervalMs); |
timestamp += 90 * kFrameIntervalMs; |
absolute_send_time = AddAbsSendTime(absolute_send_time, |
@@ -385,12 +386,12 @@ |
absolute_send_time = AddAbsSendTime(absolute_send_time, |
2 * kFrameIntervalAbsSendTime); |
IncomingPacket(kDefaultSsrc, 1000, clock_.TimeInMilliseconds(), timestamp, |
- absolute_send_time); |
- IncomingPacket( |
- kDefaultSsrc, 1000, clock_.TimeInMilliseconds(), |
- timestamp - 90 * kFrameIntervalMs, |
- AddAbsSendTime(absolute_send_time, |
- -static_cast<int>(kFrameIntervalAbsSendTime))); |
+ absolute_send_time, true); |
+ IncomingPacket(kDefaultSsrc, 1000, clock_.TimeInMilliseconds(), |
+ timestamp - 90 * kFrameIntervalMs, |
+ AddAbsSendTime(absolute_send_time, |
+ -static_cast<int>(kFrameIntervalAbsSendTime)), |
+ true); |
} |
bitrate_estimator_->Process(); |
EXPECT_TRUE(bitrate_observer_->updated()); |
@@ -523,7 +524,7 @@ |
// time for the first estimate to be generated and for Process() to be called. |
for (int i = 0; i <= 6 * kFramerate; ++i) { |
IncomingPacket(kDefaultSsrc, 1000, clock_.TimeInMilliseconds(), timestamp, |
- absolute_send_time); |
+ absolute_send_time, true); |
bitrate_estimator_->Process(); |
clock_.AdvanceTimeMilliseconds(kFrameIntervalMs); |
timestamp += 90 * kFrameIntervalMs; |
@@ -544,7 +545,7 @@ |
// Insert |kTimestampGroupLength| frames with just 1 timestamp ticks in |
// between. Should be treated as part of the same group by the estimator. |
IncomingPacket(kDefaultSsrc, 100, clock_.TimeInMilliseconds(), timestamp, |
- absolute_send_time); |
+ absolute_send_time, true); |
clock_.AdvanceTimeMilliseconds(kFrameIntervalMs / kTimestampGroupLength); |
timestamp += 1; |
absolute_send_time = AddAbsSendTime(absolute_send_time, |
@@ -574,7 +575,7 @@ |
for (size_t i = 0; i < 3000; ++i) { |
IncomingPacket(kDefaultSsrc, 1000, clock_.TimeInMilliseconds(), timestamp, |
- absolute_send_time); |
+ absolute_send_time, true); |
timestamp += kFrameIntervalMs; |
clock_.AdvanceTimeMilliseconds(kFrameIntervalMs); |
absolute_send_time = AddAbsSendTime(absolute_send_time, |
@@ -591,7 +592,7 @@ |
bitrate_estimator_->Process(); |
for (size_t i = 0; i < 21; ++i) { |
IncomingPacket(kDefaultSsrc, 1000, clock_.TimeInMilliseconds(), timestamp, |
- absolute_send_time); |
+ absolute_send_time, true); |
timestamp += kFrameIntervalMs; |
clock_.AdvanceTimeMilliseconds(2 * kFrameIntervalMs); |
absolute_send_time = AddAbsSendTime(absolute_send_time, |