@@ -33,6 +33,7 @@ class TestDelayBasedBwe : public ::testing::Test, public RemoteBitrateObserver {
3333 int64_t arrival_time,
3434 uint32_t rtp_timestamp,
3535 uint32_t absolute_send_time,
36+ bool was_paced,
3637 int probe_cluster_id) {
3738 RTPHeader header;
3839 memset (&header, 0 , sizeof (header));
@@ -41,7 +42,7 @@ class TestDelayBasedBwe : public ::testing::Test, public RemoteBitrateObserver {
4142 header.extension .hasAbsoluteSendTime = true ;
4243 header.extension .absoluteSendTime = absolute_send_time;
4344 bwe_.IncomingPacket (arrival_time + kArrivalTimeClockOffsetMs , payload_size,
44- header, probe_cluster_id);
45+ header, was_paced, probe_cluster_id);
4546 }
4647
4748 void OnReceiveBitrateChanged (const std::vector<uint32_t >& ssrcs,
@@ -73,15 +74,17 @@ TEST_F(TestDelayBasedBwe, ProbeDetection) {
7374 for (int i = 0 ; i < kNumProbes ; ++i) {
7475 clock_.AdvanceTimeMilliseconds (10 );
7576 now_ms = clock_.TimeInMilliseconds ();
76- IncomingPacket (0 , 1000 , now_ms, 90 * now_ms, AbsSendTime (now_ms, 1000 ), 0 );
77+ IncomingPacket (0 , 1000 , now_ms, 90 * now_ms, AbsSendTime (now_ms, 1000 ),
78+ true , 0 );
7779 }
7880 EXPECT_TRUE (bitrate_updated ());
7981
8082 // Second burst sent at 8 * 1000 / 5 = 1600 kbps.
8183 for (int i = 0 ; i < kNumProbes ; ++i) {
8284 clock_.AdvanceTimeMilliseconds (5 );
8385 now_ms = clock_.TimeInMilliseconds ();
84- IncomingPacket (0 , 1000 , now_ms, 90 * now_ms, AbsSendTime (now_ms, 1000 ), 1 );
86+ IncomingPacket (0 , 1000 , now_ms, 90 * now_ms, AbsSendTime (now_ms, 1000 ),
87+ true , 1 );
8588 }
8689
8790 EXPECT_TRUE (bitrate_updated ());
@@ -95,11 +98,12 @@ TEST_F(TestDelayBasedBwe, ProbeDetectionNonPacedPackets) {
9598 for (int i = 0 ; i < kNumProbes ; ++i) {
9699 clock_.AdvanceTimeMilliseconds (5 );
97100 now_ms = clock_.TimeInMilliseconds ();
98- IncomingPacket (0 , 1000 , now_ms, 90 * now_ms, AbsSendTime (now_ms, 1000 ), 0 );
101+ IncomingPacket (0 , 1000 , now_ms, 90 * now_ms, AbsSendTime (now_ms, 1000 ),
102+ true , 0 );
99103 // Non-paced packet, arriving 5 ms after.
100104 clock_.AdvanceTimeMilliseconds (5 );
101105 IncomingPacket (0 , PacedSender::kMinProbePacketSize + 1 , now_ms, 90 * now_ms,
102- AbsSendTime (now_ms, 1000 ), PacketInfo::kNotAProbe );
106+ AbsSendTime (now_ms, 1000 ), false , PacketInfo::kNotAProbe );
103107 }
104108
105109 EXPECT_TRUE (bitrate_updated ());
@@ -117,7 +121,7 @@ TEST_F(TestDelayBasedBwe, ProbeDetectionTooHighBitrate) {
117121 now_ms = clock_.TimeInMilliseconds ();
118122 send_time_ms += 10 ;
119123 IncomingPacket (0 , 1000 , now_ms, 90 * send_time_ms,
120- AbsSendTime (send_time_ms, 1000 ), 0 );
124+ AbsSendTime (send_time_ms, 1000 ), true , 0 );
121125 }
122126
123127 // Second burst sent at 8 * 1000 / 5 = 1600 kbps, arriving at 8 * 1000 / 8 =
@@ -127,7 +131,7 @@ TEST_F(TestDelayBasedBwe, ProbeDetectionTooHighBitrate) {
127131 now_ms = clock_.TimeInMilliseconds ();
128132 send_time_ms += 5 ;
129133 IncomingPacket (0 , 1000 , now_ms, send_time_ms,
130- AbsSendTime (send_time_ms, 1000 ), 1 );
134+ AbsSendTime (send_time_ms, 1000 ), true , 1 );
131135 }
132136
133137 EXPECT_TRUE (bitrate_updated ());
@@ -144,7 +148,7 @@ TEST_F(TestDelayBasedBwe, ProbeDetectionSlightlyFasterArrival) {
144148 send_time_ms += 10 ;
145149 now_ms = clock_.TimeInMilliseconds ();
146150 IncomingPacket (0 , 1000 , now_ms, 90 * send_time_ms,
147- AbsSendTime (send_time_ms, 1000 ), 23 );
151+ AbsSendTime (send_time_ms, 1000 ), true , 23 );
148152 }
149153
150154 EXPECT_TRUE (bitrate_updated ());
@@ -161,7 +165,7 @@ TEST_F(TestDelayBasedBwe, ProbeDetectionFasterArrival) {
161165 send_time_ms += 10 ;
162166 now_ms = clock_.TimeInMilliseconds ();
163167 IncomingPacket (0 , 1000 , now_ms, 90 * send_time_ms,
164- AbsSendTime (send_time_ms, 1000 ), 0 );
168+ AbsSendTime (send_time_ms, 1000 ), true , 0 );
165169 }
166170
167171 EXPECT_FALSE (bitrate_updated ());
@@ -177,7 +181,7 @@ TEST_F(TestDelayBasedBwe, ProbeDetectionSlowerArrival) {
177181 send_time_ms += 5 ;
178182 now_ms = clock_.TimeInMilliseconds ();
179183 IncomingPacket (0 , 1000 , now_ms, 90 * send_time_ms,
180- AbsSendTime (send_time_ms, 1000 ), 1 );
184+ AbsSendTime (send_time_ms, 1000 ), true , 1 );
181185 }
182186
183187 EXPECT_TRUE (bitrate_updated ());
@@ -194,7 +198,7 @@ TEST_F(TestDelayBasedBwe, ProbeDetectionSlowerArrivalHighBitrate) {
194198 send_time_ms += 1 ;
195199 now_ms = clock_.TimeInMilliseconds ();
196200 IncomingPacket (0 , 1000 , now_ms, 90 * send_time_ms,
197- AbsSendTime (send_time_ms, 1000 ), 1 );
201+ AbsSendTime (send_time_ms, 1000 ), true , 1 );
198202 }
199203
200204 EXPECT_TRUE (bitrate_updated ());
@@ -209,7 +213,7 @@ TEST_F(TestDelayBasedBwe, ProbingIgnoresSmallPackets) {
209213 clock_.AdvanceTimeMilliseconds (10 );
210214 now_ms = clock_.TimeInMilliseconds ();
211215 IncomingPacket (0 , PacedSender::kMinProbePacketSize , now_ms, 90 * now_ms,
212- AbsSendTime (now_ms, 1000 ), 1 );
216+ AbsSendTime (now_ms, 1000 ), true , 1 );
213217 }
214218
215219 EXPECT_FALSE (bitrate_updated ());
@@ -219,7 +223,8 @@ TEST_F(TestDelayBasedBwe, ProbingIgnoresSmallPackets) {
219223 for (int i = 0 ; i < kNumProbes ; ++i) {
220224 clock_.AdvanceTimeMilliseconds (10 );
221225 now_ms = clock_.TimeInMilliseconds ();
222- IncomingPacket (0 , 1000 , now_ms, 90 * now_ms, AbsSendTime (now_ms, 1000 ), 1 );
226+ IncomingPacket (0 , 1000 , now_ms, 90 * now_ms, AbsSendTime (now_ms, 1000 ),
227+ true , 1 );
223228 }
224229
225230 // Wait long enough so that we can call Process again.
0 commit comments