OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 #include "webrtc/modules/congestion_controller/delay_based_bwe_unittest_helper.h
" | 10 #include "webrtc/modules/congestion_controller/delay_based_bwe_unittest_helper.h
" |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 clock_.AdvanceTimeMilliseconds(kFrameIntervalMs); | 485 clock_.AdvanceTimeMilliseconds(kFrameIntervalMs); |
486 send_time_ms += kFrameIntervalMs; | 486 send_time_ms += kFrameIntervalMs; |
487 } | 487 } |
488 uint32_t bitrate_before = 0; | 488 uint32_t bitrate_before = 0; |
489 std::vector<uint32_t> ssrcs; | 489 std::vector<uint32_t> ssrcs; |
490 bitrate_estimator_->LatestEstimate(&ssrcs, &bitrate_before); | 490 bitrate_estimator_->LatestEstimate(&ssrcs, &bitrate_before); |
491 | 491 |
492 clock_.AdvanceTimeMilliseconds(silence_time_s * 1000); | 492 clock_.AdvanceTimeMilliseconds(silence_time_s * 1000); |
493 send_time_ms += silence_time_s * 1000; | 493 send_time_ms += silence_time_s * 1000; |
494 | 494 |
495 for (size_t i = 0; i < 23; ++i) { | 495 for (size_t i = 0; i < 24; ++i) { |
496 IncomingFeedback(clock_.TimeInMilliseconds(), send_time_ms, | 496 IncomingFeedback(clock_.TimeInMilliseconds(), send_time_ms, |
497 sequence_number++, 1000); | 497 sequence_number++, 1000); |
498 clock_.AdvanceTimeMilliseconds(2 * kFrameIntervalMs); | 498 clock_.AdvanceTimeMilliseconds(2 * kFrameIntervalMs); |
499 send_time_ms += kFrameIntervalMs; | 499 send_time_ms += kFrameIntervalMs; |
500 } | 500 } |
501 uint32_t bitrate_after = 0; | 501 uint32_t bitrate_after = 0; |
502 bitrate_estimator_->LatestEstimate(&ssrcs, &bitrate_after); | 502 bitrate_estimator_->LatestEstimate(&ssrcs, &bitrate_after); |
503 EXPECT_LT(bitrate_after, bitrate_before); | 503 EXPECT_LT(bitrate_after, bitrate_before); |
504 } | 504 } |
505 } // namespace webrtc | 505 } // namespace webrtc |
OLD | NEW |