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++, | 60 IncomingFeedback(now_ms, now_ms, seq_num++, 100, PacketInfo::kNotAProbe); |
61 PacedSender::kMinProbePacketSize + 1, | |
62 PacketInfo::kNotAProbe); | |
63 } | 61 } |
64 | 62 |
65 EXPECT_TRUE(bitrate_observer_.updated()); | 63 EXPECT_TRUE(bitrate_observer_.updated()); |
66 EXPECT_GT(bitrate_observer_.latest_bitrate(), 800000u); | 64 EXPECT_GT(bitrate_observer_.latest_bitrate(), 800000u); |
67 } | 65 } |
68 | 66 |
69 TEST_F(DelayBasedBweTest, ProbeDetectionFasterArrival) { | 67 TEST_F(DelayBasedBweTest, ProbeDetectionFasterArrival) { |
70 int64_t now_ms = clock_.TimeInMilliseconds(); | 68 int64_t now_ms = clock_.TimeInMilliseconds(); |
71 uint16_t seq_num = 0; | 69 uint16_t seq_num = 0; |
72 // First burst sent at 8 * 1000 / 10 = 800 kbps. | 70 // First burst sent at 8 * 1000 / 10 = 800 kbps. |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 | 257 |
260 TEST_F(DelayBasedBweMedianSlopeExperimentTest, CapacityDropNegOffsetChange) { | 258 TEST_F(DelayBasedBweMedianSlopeExperimentTest, CapacityDropNegOffsetChange) { |
261 CapacityDropTestHelper(1, false, 1267, -30000); | 259 CapacityDropTestHelper(1, false, 1267, -30000); |
262 } | 260 } |
263 | 261 |
264 TEST_F(DelayBasedBweMedianSlopeExperimentTest, CapacityDropOneStreamWrap) { | 262 TEST_F(DelayBasedBweMedianSlopeExperimentTest, CapacityDropOneStreamWrap) { |
265 CapacityDropTestHelper(1, true, 600, 0); | 263 CapacityDropTestHelper(1, true, 600, 0); |
266 } | 264 } |
267 | 265 |
268 } // namespace webrtc | 266 } // namespace webrtc |
OLD | NEW |