OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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/remote_bitrate_estimator/remote_bitrate_estimator_unitt
est_helper.h" | 10 #include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unitt
est_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" | 16 #include "webrtc/rtc_base/checks.h" |
17 | 17 |
18 namespace webrtc { | 18 namespace webrtc { |
19 | 19 |
20 const size_t kMtu = 1200; | 20 const size_t kMtu = 1200; |
21 const uint32_t kAcceptedBitrateErrorBps = 50000; | 21 const uint32_t kAcceptedBitrateErrorBps = 50000; |
22 | 22 |
23 // Number of packets needed before we have a valid estimate. | 23 // Number of packets needed before we have a valid estimate. |
24 const int kNumInitialPackets = 2; | 24 const int kNumInitialPackets = 2; |
25 | 25 |
26 namespace testing { | 26 namespace testing { |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 clock_.AdvanceTimeMilliseconds(2 * kFrameIntervalMs); | 607 clock_.AdvanceTimeMilliseconds(2 * kFrameIntervalMs); |
608 absolute_send_time = AddAbsSendTime(absolute_send_time, | 608 absolute_send_time = AddAbsSendTime(absolute_send_time, |
609 kFrameIntervalAbsSendTime); | 609 kFrameIntervalAbsSendTime); |
610 bitrate_estimator_->Process(); | 610 bitrate_estimator_->Process(); |
611 } | 611 } |
612 uint32_t bitrate_after = 0; | 612 uint32_t bitrate_after = 0; |
613 bitrate_estimator_->LatestEstimate(&ssrcs, &bitrate_after); | 613 bitrate_estimator_->LatestEstimate(&ssrcs, &bitrate_after); |
614 EXPECT_LT(bitrate_after, bitrate_before); | 614 EXPECT_LT(bitrate_after, bitrate_before); |
615 } | 615 } |
616 } // namespace webrtc | 616 } // namespace webrtc |
OLD | NEW |