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
" |
11 | 11 |
12 #include <algorithm> | 12 #include <algorithm> |
13 #include <limits> | 13 #include <limits> |
14 #include <utility> | 14 #include <utility> |
15 | 15 |
| 16 #include "webrtc/base/checks.h" |
| 17 #include "webrtc/base/ptr_util.h" |
16 #include "webrtc/modules/congestion_controller/delay_based_bwe.h" | 18 #include "webrtc/modules/congestion_controller/delay_based_bwe.h" |
17 #include "webrtc/rtc_base/checks.h" | |
18 #include "webrtc/rtc_base/ptr_util.h" | |
19 | 19 |
20 namespace webrtc { | 20 namespace webrtc { |
21 | 21 |
22 constexpr size_t kMtu = 1200; | 22 constexpr size_t kMtu = 1200; |
23 constexpr uint32_t kAcceptedBitrateErrorBps = 50000; | 23 constexpr uint32_t kAcceptedBitrateErrorBps = 50000; |
24 | 24 |
25 // Number of packets needed before we have a valid estimate. | 25 // Number of packets needed before we have a valid estimate. |
26 constexpr int kNumInitialPackets = 2; | 26 constexpr int kNumInitialPackets = 2; |
27 | 27 |
28 constexpr int kInitialProbingPackets = 5; | 28 constexpr int kInitialProbingPackets = 5; |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 IncomingFeedback(clock_.TimeInMilliseconds(), send_time_ms, | 504 IncomingFeedback(clock_.TimeInMilliseconds(), send_time_ms, |
505 sequence_number++, 1000); | 505 sequence_number++, 1000); |
506 clock_.AdvanceTimeMilliseconds(2 * kFrameIntervalMs); | 506 clock_.AdvanceTimeMilliseconds(2 * kFrameIntervalMs); |
507 send_time_ms += kFrameIntervalMs; | 507 send_time_ms += kFrameIntervalMs; |
508 } | 508 } |
509 uint32_t bitrate_after = 0; | 509 uint32_t bitrate_after = 0; |
510 bitrate_estimator_->LatestEstimate(&ssrcs, &bitrate_after); | 510 bitrate_estimator_->LatestEstimate(&ssrcs, &bitrate_after); |
511 EXPECT_LT(bitrate_after, bitrate_before); | 511 EXPECT_LT(bitrate_after, bitrate_before); |
512 } | 512 } |
513 } // namespace webrtc | 513 } // namespace webrtc |
OLD | NEW |