Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Side by Side Diff: webrtc/voice_engine/test/auto_test/voe_conference_test.cc

Issue 1835053002: Change default timestamp to 64 bits in all webrtc directories. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Add TODO for timestamp. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_t deadline = rtc::TimeAfter(kMaxRunTimeMs); 75 int64_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::TimeMillis() < deadline &&
83 successive_pass < kNeedSuccessivePass) { 83 successive_pass < kNeedSuccessivePass) {
84 webrtc::SleepMs(kStatsRequestIntervalMs); 84 webrtc::SleepMs(kStatsRequestIntervalMs);
85 85
86 EXPECT_TRUE(trans.GetReceiverStatistics(id_1, &stats_1)); 86 EXPECT_TRUE(trans.GetReceiverStatistics(id_1, &stats_1));
87 EXPECT_TRUE(trans.GetReceiverStatistics(id_2, &stats_2)); 87 EXPECT_TRUE(trans.GetReceiverStatistics(id_2, &stats_2));
88 88
89 // It is not easy to verify the NTP time directly. We verify it by testing 89 // It is not easy to verify the NTP time directly. We verify it by testing
90 // the difference of two start NTP times. 90 // the difference of two start NTP times.
91 int64_t captured_start_ntp_delay = stats_2.capture_start_ntp_time_ms_ - 91 int64_t captured_start_ntp_delay = stats_2.capture_start_ntp_time_ms_ -
92 stats_1.capture_start_ntp_time_ms_; 92 stats_1.capture_start_ntp_time_ms_;
93 93
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « webrtc/voice_engine/test/auto_test/fakes/loudest_filter.cc ('k') | webrtc/voice_engine/test/auto_test/voe_output_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698