OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 |
11 #include "webrtc/modules/remote_bitrate_estimator/test/bwe.h" | 11 #include "webrtc/modules/remote_bitrate_estimator/test/bwe.h" |
12 | 12 |
13 #include <limits> | 13 #include <limits> |
14 | 14 |
15 #include "webrtc/base/constructormagic.h" | |
16 #include "webrtc/modules/remote_bitrate_estimator/test/estimators/bbr.h" | 15 #include "webrtc/modules/remote_bitrate_estimator/test/estimators/bbr.h" |
17 #include "webrtc/modules/remote_bitrate_estimator/test/estimators/nada.h" | 16 #include "webrtc/modules/remote_bitrate_estimator/test/estimators/nada.h" |
18 #include "webrtc/modules/remote_bitrate_estimator/test/estimators/remb.h" | 17 #include "webrtc/modules/remote_bitrate_estimator/test/estimators/remb.h" |
19 #include "webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.h" | 18 #include "webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.h" |
20 #include "webrtc/modules/remote_bitrate_estimator/test/estimators/tcp.h" | 19 #include "webrtc/modules/remote_bitrate_estimator/test/estimators/tcp.h" |
| 20 #include "webrtc/rtc_base/constructormagic.h" |
21 | 21 |
22 namespace webrtc { | 22 namespace webrtc { |
23 namespace testing { | 23 namespace testing { |
24 namespace bwe { | 24 namespace bwe { |
25 | 25 |
26 // With the assumption that packet loss is lower than 97%, the max gap | 26 // With the assumption that packet loss is lower than 97%, the max gap |
27 // between elements in the set is lower than 0x8000, hence we have a | 27 // between elements in the set is lower than 0x8000, hence we have a |
28 // total order in the set. For (x,y,z) subset of the LinkedSet, | 28 // total order in the set. For (x,y,z) subset of the LinkedSet, |
29 // (x<=y and y<=z) ==> x<=z so the set can be sorted. | 29 // (x<=y and y<=z) ==> x<=z so the set can be sorted. |
30 const int kSetCapacity = 1000; | 30 const int kSetCapacity = 1000; |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 | 276 |
277 float LossAccount::LossRatio() { | 277 float LossAccount::LossRatio() { |
278 if (num_total == 0) | 278 if (num_total == 0) |
279 return 0.0f; | 279 return 0.0f; |
280 return static_cast<float>(num_lost) / num_total; | 280 return static_cast<float>(num_lost) / num_total; |
281 } | 281 } |
282 | 282 |
283 } // namespace bwe | 283 } // namespace bwe |
284 } // namespace testing | 284 } // namespace testing |
285 } // namespace webrtc | 285 } // namespace webrtc |
OLD | NEW |