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 | 10 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 int64_t now_ms = clock_.TimeInMilliseconds(); | 50 int64_t now_ms = clock_.TimeInMilliseconds(); |
51 uint16_t seq_num = 0; | 51 uint16_t seq_num = 0; |
52 // First burst sent at 8 * 1000 / 10 = 800 kbps, but with every other packet | 52 // First burst sent at 8 * 1000 / 10 = 800 kbps, but with every other packet |
53 // not being paced which could mess things up. | 53 // not being paced which could mess things up. |
54 for (int i = 0; i < kNumProbes; ++i) { | 54 for (int i = 0; i < kNumProbes; ++i) { |
55 clock_.AdvanceTimeMilliseconds(5); | 55 clock_.AdvanceTimeMilliseconds(5); |
56 now_ms = clock_.TimeInMilliseconds(); | 56 now_ms = clock_.TimeInMilliseconds(); |
57 IncomingFeedback(now_ms, now_ms, seq_num++, 1000, 0); | 57 IncomingFeedback(now_ms, now_ms, seq_num++, 1000, 0); |
58 // Non-paced packet, arriving 5 ms after. | 58 // Non-paced packet, arriving 5 ms after. |
59 clock_.AdvanceTimeMilliseconds(5); | 59 clock_.AdvanceTimeMilliseconds(5); |
60 IncomingFeedback(now_ms, now_ms, seq_num++, 100, PacketInfo::kNotAProbe); | 60 IncomingFeedback(now_ms, now_ms, seq_num++, 100, |
| 61 PacedPacketInfo::kNotAProbe); |
61 } | 62 } |
62 | 63 |
63 EXPECT_TRUE(bitrate_observer_.updated()); | 64 EXPECT_TRUE(bitrate_observer_.updated()); |
64 EXPECT_GT(bitrate_observer_.latest_bitrate(), 800000u); | 65 EXPECT_GT(bitrate_observer_.latest_bitrate(), 800000u); |
65 } | 66 } |
66 | 67 |
67 TEST_F(DelayBasedBweTest, ProbeDetectionFasterArrival) { | 68 TEST_F(DelayBasedBweTest, ProbeDetectionFasterArrival) { |
68 int64_t now_ms = clock_.TimeInMilliseconds(); | 69 int64_t now_ms = clock_.TimeInMilliseconds(); |
69 uint16_t seq_num = 0; | 70 uint16_t seq_num = 0; |
70 // First burst sent at 8 * 1000 / 10 = 800 kbps. | 71 // First burst sent at 8 * 1000 / 10 = 800 kbps. |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 | 258 |
258 TEST_F(DelayBasedBweMedianSlopeExperimentTest, CapacityDropNegOffsetChange) { | 259 TEST_F(DelayBasedBweMedianSlopeExperimentTest, CapacityDropNegOffsetChange) { |
259 CapacityDropTestHelper(1, false, 1267, -30000); | 260 CapacityDropTestHelper(1, false, 1267, -30000); |
260 } | 261 } |
261 | 262 |
262 TEST_F(DelayBasedBweMedianSlopeExperimentTest, CapacityDropOneStreamWrap) { | 263 TEST_F(DelayBasedBweMedianSlopeExperimentTest, CapacityDropOneStreamWrap) { |
263 CapacityDropTestHelper(1, true, 600, 0); | 264 CapacityDropTestHelper(1, true, 600, 0); |
264 } | 265 } |
265 | 266 |
266 } // namespace webrtc | 267 } // namespace webrtc |
OLD | NEW |