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 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // Start NTP time is the time when a stream is played out, rather than | 65 // Start NTP time is the time when a stream is played out, rather than |
66 // when it is added. | 66 // when it is added. |
67 webrtc::SleepMs(kDelayMs); | 67 webrtc::SleepMs(kDelayMs); |
68 EXPECT_TRUE(trans.StartPlayout(id_2)); | 68 EXPECT_TRUE(trans.StartPlayout(id_2)); |
69 | 69 |
70 const int kMaxRunTimeMs = 25000; | 70 const int kMaxRunTimeMs = 25000; |
71 const int kNeedSuccessivePass = 3; | 71 const int kNeedSuccessivePass = 3; |
72 const int kStatsRequestIntervalMs = 1000; | 72 const int kStatsRequestIntervalMs = 1000; |
73 const int kStatsBufferSize = 3; | 73 const int kStatsBufferSize = 3; |
74 | 74 |
75 uint32 deadline = rtc::TimeAfter(kMaxRunTimeMs); | 75 uint32_t deadline = rtc::TimeAfter(kMaxRunTimeMs); |
76 // Run the following up to |kMaxRunTimeMs| milliseconds. | 76 // Run the following up to |kMaxRunTimeMs| milliseconds. |
77 int successive_pass = 0; | 77 int successive_pass = 0; |
78 webrtc::CallStatistics stats_1; | 78 webrtc::CallStatistics stats_1; |
79 webrtc::CallStatistics stats_2; | 79 webrtc::CallStatistics stats_2; |
80 std::queue<Stats> stats_buffer; | 80 std::queue<Stats> stats_buffer; |
81 | 81 |
82 while (rtc::TimeIsLater(rtc::Time(), deadline) && | 82 while (rtc::TimeIsLater(rtc::Time(), deadline) && |
83 successive_pass < kNeedSuccessivePass) { | 83 successive_pass < kNeedSuccessivePass) { |
84 webrtc::SleepMs(kStatsRequestIntervalMs); | 84 webrtc::SleepMs(kStatsRequestIntervalMs); |
85 | 85 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 // depends on the sleep timer. So we allow a small off from |kPackets|. | 167 // depends on the sleep timer. So we allow a small off from |kPackets|. |
168 EXPECT_NEAR(stats_1.packetsReceived, kPackets, 2); | 168 EXPECT_NEAR(stats_1.packetsReceived, kPackets, 2); |
169 EXPECT_NEAR(stats_2.packetsReceived, kPackets, 2); | 169 EXPECT_NEAR(stats_2.packetsReceived, kPackets, 2); |
170 EXPECT_NEAR(stats_3.packetsReceived, kPackets, 2); | 170 EXPECT_NEAR(stats_3.packetsReceived, kPackets, 2); |
171 } | 171 } |
172 | 172 |
173 remove(silence_file.c_str()); | 173 remove(silence_file.c_str()); |
174 } | 174 } |
175 | 175 |
176 } // namespace voetest | 176 } // namespace voetest |
OLD | NEW |