OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 24 matching lines...) Expand all Loading... |
35 | 35 |
36 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, RateIncreaseReordering) { | 36 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, RateIncreaseReordering) { |
37 RateIncreaseReorderingTestHelper(506422); | 37 RateIncreaseReorderingTestHelper(506422); |
38 } | 38 } |
39 | 39 |
40 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, RateIncreaseRtpTimestamps) { | 40 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, RateIncreaseRtpTimestamps) { |
41 RateIncreaseRtpTimestampsTestHelper(1090); | 41 RateIncreaseRtpTimestampsTestHelper(1090); |
42 } | 42 } |
43 | 43 |
44 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, CapacityDropOneStream) { | 44 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, CapacityDropOneStream) { |
45 CapacityDropTestHelper(1, false, 700); | 45 CapacityDropTestHelper(1, false, 567); |
46 } | 46 } |
47 | 47 |
48 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, CapacityDropOneStreamWrap) { | 48 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, CapacityDropOneStreamWrap) { |
49 CapacityDropTestHelper(1, true, 700); | 49 CapacityDropTestHelper(1, true, 567); |
50 } | 50 } |
51 | 51 |
52 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, CapacityDropTwoStreamsWrap) { | 52 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, CapacityDropTwoStreamsWrap) { |
53 CapacityDropTestHelper(2, true, 700); | 53 CapacityDropTestHelper(2, true, 667); |
54 } | 54 } |
55 | 55 |
56 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, CapacityDropThreeStreamsWrap) { | 56 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, CapacityDropThreeStreamsWrap) { |
57 CapacityDropTestHelper(3, true, 700); | 57 CapacityDropTestHelper(3, true, 633); |
58 } | 58 } |
59 | 59 |
60 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, CapacityDropThirteenStreamsWrap) { | 60 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, CapacityDropThirteenStreamsWrap) { |
61 CapacityDropTestHelper(13, true, 666); | 61 CapacityDropTestHelper(13, true, 633); |
62 } | 62 } |
63 | 63 |
64 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, CapacityDropNineteenStreamsWrap) { | 64 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, CapacityDropNineteenStreamsWrap) { |
65 CapacityDropTestHelper(19, true, 666); | 65 CapacityDropTestHelper(19, true, 633); |
66 } | 66 } |
67 | 67 |
68 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, CapacityDropThirtyStreamsWrap) { | 68 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, CapacityDropThirtyStreamsWrap) { |
69 CapacityDropTestHelper(30, true, 666); | 69 CapacityDropTestHelper(30, true, 633); |
70 } | 70 } |
71 | 71 |
72 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, TestTimestampGrouping) { | 72 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, TestTimestampGrouping) { |
73 TestTimestampGroupingTestHelper(); | 73 TestTimestampGroupingTestHelper(361080u); |
74 } | 74 } |
75 | 75 |
76 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, TestGetStats) { | 76 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, TestGetStats) { |
77 TestGetStatsHelper(); | 77 TestGetStatsHelper(); |
78 } | 78 } |
79 | 79 |
80 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, TestShortTimeoutAndWrap) { | 80 TEST_F(RemoteBitrateEstimatorAbsSendTimeTest, TestShortTimeoutAndWrap) { |
81 // Simulate a client leaving and rejoining the call after 35 seconds. This | 81 // Simulate a client leaving and rejoining the call after 35 seconds. This |
82 // will make abs send time wrap, so if streams aren't timed out properly | 82 // will make abs send time wrap, so if streams aren't timed out properly |
83 // the next 30 seconds of packets will be out of order. | 83 // the next 30 seconds of packets will be out of order. |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 now_ms = clock_.TimeInMilliseconds(); | 253 now_ms = clock_.TimeInMilliseconds(); |
254 IncomingPacket(0, 1000, now_ms, 90 * send_time_ms, | 254 IncomingPacket(0, 1000, now_ms, 90 * send_time_ms, |
255 AbsSendTime(send_time_ms, 1000), true); | 255 AbsSendTime(send_time_ms, 1000), true); |
256 } | 256 } |
257 | 257 |
258 EXPECT_EQ(0, bitrate_estimator_->Process()); | 258 EXPECT_EQ(0, bitrate_estimator_->Process()); |
259 EXPECT_TRUE(bitrate_observer_->updated()); | 259 EXPECT_TRUE(bitrate_observer_->updated()); |
260 EXPECT_NEAR(bitrate_observer_->latest_bitrate(), 4000000u, 10000); | 260 EXPECT_NEAR(bitrate_observer_->latest_bitrate(), 4000000u, 10000); |
261 } | 261 } |
262 } // namespace webrtc | 262 } // namespace webrtc |
OLD | NEW |