OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 | 261 |
262 INSTANTIATE_TEST_CASE_P(VideoSendersTest, | 262 INSTANTIATE_TEST_CASE_P(VideoSendersTest, |
263 BweFeedbackTest, | 263 BweFeedbackTest, |
264 ::testing::Values(kRembEstimator, | 264 ::testing::Values(kRembEstimator, |
265 kFullSendSideEstimator)); | 265 kFullSendSideEstimator)); |
266 | 266 |
267 TEST_P(BweFeedbackTest, ConstantCapacity) { | 267 TEST_P(BweFeedbackTest, ConstantCapacity) { |
268 AdaptiveVideoSource source(0, 30, 300, 0, 0); | 268 AdaptiveVideoSource source(0, 30, 300, 0, 0); |
269 PacedVideoSender sender(&uplink_, &source, GetParam()); | 269 PacedVideoSender sender(&uplink_, &source, GetParam()); |
270 ChokeFilter filter(&uplink_, 0); | 270 ChokeFilter filter(&uplink_, 0); |
271 RateCounterFilter counter(&uplink_, 0, "receiver_input"); | 271 RateCounterFilter counter(&uplink_, 0, "Receiver"); |
272 PacketReceiver receiver(&uplink_, 0, GetParam(), false, false); | 272 PacketReceiver receiver(&uplink_, 0, GetParam(), false, false); |
273 const int kCapacityKbps = 1000; | 273 const int kCapacityKbps = 1000; |
274 filter.set_capacity_kbps(kCapacityKbps); | 274 filter.set_capacity_kbps(kCapacityKbps); |
275 filter.set_max_delay_ms(500); | 275 filter.set_max_delay_ms(500); |
276 RunFor(180 * 1000); | 276 RunFor(180 * 1000); |
277 PrintResults(kCapacityKbps, counter.GetBitrateStats(), 0, | 277 PrintResults(kCapacityKbps, counter.GetBitrateStats(), 0, |
278 receiver.GetDelayStats(), counter.GetBitrateStats()); | 278 receiver.GetDelayStats(), counter.GetBitrateStats()); |
279 } | 279 } |
280 | 280 |
281 TEST_P(BweFeedbackTest, Choke1000kbps500kbps1000kbps) { | 281 TEST_P(BweFeedbackTest, Choke1000kbps500kbps1000kbps) { |
282 AdaptiveVideoSource source(0, 30, 300, 0, 0); | 282 AdaptiveVideoSource source(0, 30, 300, 0, 0); |
283 PacedVideoSender sender(&uplink_, &source, GetParam()); | 283 PacedVideoSender sender(&uplink_, &source, GetParam()); |
284 ChokeFilter filter(&uplink_, 0); | 284 ChokeFilter filter(&uplink_, 0); |
285 RateCounterFilter counter(&uplink_, 0, "receiver_input"); | 285 RateCounterFilter counter(&uplink_, 0, "Receiver"); |
286 PacketReceiver receiver(&uplink_, 0, GetParam(), false, false); | 286 PacketReceiver receiver(&uplink_, 0, GetParam(), false, false); |
287 const int kHighCapacityKbps = 1000; | 287 const int kHighCapacityKbps = 1000; |
288 const int kLowCapacityKbps = 500; | 288 const int kLowCapacityKbps = 500; |
289 filter.set_capacity_kbps(kHighCapacityKbps); | 289 filter.set_capacity_kbps(kHighCapacityKbps); |
290 filter.set_max_delay_ms(500); | 290 filter.set_max_delay_ms(500); |
291 RunFor(60 * 1000); | 291 RunFor(60 * 1000); |
292 filter.set_capacity_kbps(kLowCapacityKbps); | 292 filter.set_capacity_kbps(kLowCapacityKbps); |
293 RunFor(60 * 1000); | 293 RunFor(60 * 1000); |
294 filter.set_capacity_kbps(kHighCapacityKbps); | 294 filter.set_capacity_kbps(kHighCapacityKbps); |
295 RunFor(60 * 1000); | 295 RunFor(60 * 1000); |
296 PrintResults((2 * kHighCapacityKbps + kLowCapacityKbps) / 3.0, | 296 PrintResults((2 * kHighCapacityKbps + kLowCapacityKbps) / 3.0, |
297 counter.GetBitrateStats(), 0, receiver.GetDelayStats(), | 297 counter.GetBitrateStats(), 0, receiver.GetDelayStats(), |
298 counter.GetBitrateStats()); | 298 counter.GetBitrateStats()); |
299 } | 299 } |
300 | 300 |
301 TEST_P(BweFeedbackTest, Choke200kbps30kbps200kbps) { | 301 TEST_P(BweFeedbackTest, Choke200kbps30kbps200kbps) { |
302 AdaptiveVideoSource source(0, 30, 300, 0, 0); | 302 AdaptiveVideoSource source(0, 30, 300, 0, 0); |
303 PacedVideoSender sender(&uplink_, &source, GetParam()); | 303 PacedVideoSender sender(&uplink_, &source, GetParam()); |
304 ChokeFilter filter(&uplink_, 0); | 304 ChokeFilter filter(&uplink_, 0); |
305 RateCounterFilter counter(&uplink_, 0, "receiver_input"); | 305 RateCounterFilter counter(&uplink_, 0, "Receiver"); |
306 PacketReceiver receiver(&uplink_, 0, GetParam(), false, false); | 306 PacketReceiver receiver(&uplink_, 0, GetParam(), false, false); |
307 const int kHighCapacityKbps = 200; | 307 const int kHighCapacityKbps = 200; |
308 const int kLowCapacityKbps = 30; | 308 const int kLowCapacityKbps = 30; |
309 filter.set_capacity_kbps(kHighCapacityKbps); | 309 filter.set_capacity_kbps(kHighCapacityKbps); |
310 filter.set_max_delay_ms(500); | 310 filter.set_max_delay_ms(500); |
311 RunFor(60 * 1000); | 311 RunFor(60 * 1000); |
312 filter.set_capacity_kbps(kLowCapacityKbps); | 312 filter.set_capacity_kbps(kLowCapacityKbps); |
313 RunFor(60 * 1000); | 313 RunFor(60 * 1000); |
314 filter.set_capacity_kbps(kHighCapacityKbps); | 314 filter.set_capacity_kbps(kHighCapacityKbps); |
315 RunFor(60 * 1000); | 315 RunFor(60 * 1000); |
316 | 316 |
317 PrintResults((2 * kHighCapacityKbps + kLowCapacityKbps) / 3.0, | 317 PrintResults((2 * kHighCapacityKbps + kLowCapacityKbps) / 3.0, |
318 counter.GetBitrateStats(), 0, receiver.GetDelayStats(), | 318 counter.GetBitrateStats(), 0, receiver.GetDelayStats(), |
319 counter.GetBitrateStats()); | 319 counter.GetBitrateStats()); |
320 } | 320 } |
321 | 321 |
322 TEST_P(BweFeedbackTest, Verizon4gDownlinkTest) { | 322 TEST_P(BweFeedbackTest, Verizon4gDownlinkTest) { |
323 AdaptiveVideoSource source(0, 30, 300, 0, 0); | 323 AdaptiveVideoSource source(0, 30, 300, 0, 0); |
324 VideoSender sender(&uplink_, &source, GetParam()); | 324 VideoSender sender(&uplink_, &source, GetParam()); |
325 RateCounterFilter counter1(&uplink_, 0, "sender_output"); | 325 RateCounterFilter counter1(&uplink_, 0, "sender_output"); |
326 TraceBasedDeliveryFilter filter(&uplink_, 0, "link_capacity"); | 326 TraceBasedDeliveryFilter filter(&uplink_, 0, "link_capacity"); |
327 RateCounterFilter counter2(&uplink_, 0, "receiver_input"); | 327 RateCounterFilter counter2(&uplink_, 0, "Receiver"); |
328 PacketReceiver receiver(&uplink_, 0, GetParam(), false, false); | 328 PacketReceiver receiver(&uplink_, 0, GetParam(), false, false); |
329 ASSERT_TRUE(filter.Init(test::ResourcePath("verizon4g-downlink", "rx"))); | 329 ASSERT_TRUE(filter.Init(test::ResourcePath("verizon4g-downlink", "rx"))); |
330 RunFor(22 * 60 * 1000); | 330 RunFor(22 * 60 * 1000); |
331 PrintResults(filter.GetBitrateStats().GetMean(), counter2.GetBitrateStats(), | 331 PrintResults(filter.GetBitrateStats().GetMean(), counter2.GetBitrateStats(), |
332 0, receiver.GetDelayStats(), counter2.GetBitrateStats()); | 332 0, receiver.GetDelayStats(), counter2.GetBitrateStats()); |
333 } | 333 } |
334 | 334 |
335 // webrtc:3277 | 335 // webrtc:3277 |
336 TEST_P(BweFeedbackTest, GoogleWifiTrace3Mbps) { | 336 TEST_P(BweFeedbackTest, GoogleWifiTrace3Mbps) { |
337 AdaptiveVideoSource source(0, 30, 300, 0, 0); | 337 AdaptiveVideoSource source(0, 30, 300, 0, 0); |
338 VideoSender sender(&uplink_, &source, GetParam()); | 338 VideoSender sender(&uplink_, &source, GetParam()); |
339 RateCounterFilter counter1(&uplink_, 0, "sender_output"); | 339 RateCounterFilter counter1(&uplink_, 0, "sender_output"); |
340 TraceBasedDeliveryFilter filter(&uplink_, 0, "link_capacity"); | 340 TraceBasedDeliveryFilter filter(&uplink_, 0, "link_capacity"); |
341 filter.set_max_delay_ms(500); | 341 filter.set_max_delay_ms(500); |
342 RateCounterFilter counter2(&uplink_, 0, "receiver_input"); | 342 RateCounterFilter counter2(&uplink_, 0, "Receiver"); |
343 PacketReceiver receiver(&uplink_, 0, GetParam(), false, false); | 343 PacketReceiver receiver(&uplink_, 0, GetParam(), false, false); |
344 ASSERT_TRUE(filter.Init(test::ResourcePath("google-wifi-3mbps", "rx"))); | 344 ASSERT_TRUE(filter.Init(test::ResourcePath("google-wifi-3mbps", "rx"))); |
345 RunFor(300 * 1000); | 345 RunFor(300 * 1000); |
346 PrintResults(filter.GetBitrateStats().GetMean(), counter2.GetBitrateStats(), | 346 PrintResults(filter.GetBitrateStats().GetMean(), counter2.GetBitrateStats(), |
347 0, receiver.GetDelayStats(), counter2.GetBitrateStats()); | 347 0, receiver.GetDelayStats(), counter2.GetBitrateStats()); |
348 } | 348 } |
349 | 349 |
350 TEST_P(BweFeedbackTest, PacedSelfFairness50msTest) { | 350 TEST_P(BweFeedbackTest, PacedSelfFairness50msTest) { |
351 int64_t kRttMs = 100; | 351 int64_t kRttMs = 100; |
352 int64_t kMaxJitterMs = 15; | 352 int64_t kMaxJitterMs = 15; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 for (int i = 0; i < 2; ++i) { | 423 for (int i = 0; i < 2; ++i) { |
424 offset_ms[i] = std::max(0, 5000 * i + rand() % 2001 - 1000); | 424 offset_ms[i] = std::max(0, 5000 * i + rand() % 2001 - 1000); |
425 } | 425 } |
426 | 426 |
427 RunFairnessTest(GetParam(), 1, 1, 300, 2000, 1000, kRttMs, kMaxJitterMs, | 427 RunFairnessTest(GetParam(), 1, 1, 300, 2000, 1000, kRttMs, kMaxJitterMs, |
428 offset_ms); | 428 offset_ms); |
429 } | 429 } |
430 } // namespace bwe | 430 } // namespace bwe |
431 } // namespace testing | 431 } // namespace testing |
432 } // namespace webrtc | 432 } // namespace webrtc |
OLD | NEW |