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

Side by Side Diff: webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc

Issue 1429943004: AcmReceiver::InsertPacket and NetEq::InsertPacket: Take ArrayView arguments (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix log message Created 5 years, 1 month 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) 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 next_send_time = GetNewPackets(); 189 next_send_time = GetNewPackets();
190 ASSERT_NE(-1, next_send_time); 190 ASSERT_NE(-1, next_send_time);
191 next_arrival_time = GetArrivalTime(next_send_time); 191 next_arrival_time = GetArrivalTime(next_send_time);
192 } while (Lost()); // If lost, immediately read the next packet. 192 } while (Lost()); // If lost, immediately read the next packet.
193 193
194 int time_now = 0; 194 int time_now = 0;
195 for (int k = 0; k < num_loops; ++k) { 195 for (int k = 0; k < num_loops; ++k) {
196 while (time_now >= next_arrival_time) { 196 while (time_now >= next_arrival_time) {
197 // Insert packet in mono instance. 197 // Insert packet in mono instance.
198 ASSERT_EQ(NetEq::kOK, 198 ASSERT_EQ(NetEq::kOK,
199 neteq_mono_->InsertPacket(rtp_header_mono_, encoded_, 199 neteq_mono_->InsertPacket(rtp_header_mono_,
200 payload_size_bytes_, 200 rtc::ArrayView<const uint8_t>(
201 encoded_, payload_size_bytes_),
201 next_arrival_time)); 202 next_arrival_time));
202 // Insert packet in multi-channel instance. 203 // Insert packet in multi-channel instance.
203 ASSERT_EQ(NetEq::kOK, 204 ASSERT_EQ(NetEq::kOK, neteq_->InsertPacket(
204 neteq_->InsertPacket(rtp_header_, encoded_multi_channel_, 205 rtp_header_, rtc::ArrayView<const uint8_t>(
205 multi_payload_size_bytes_, 206 encoded_multi_channel_,
206 next_arrival_time)); 207 multi_payload_size_bytes_),
208 next_arrival_time));
207 // Get next input packets (mono and multi-channel). 209 // Get next input packets (mono and multi-channel).
208 do { 210 do {
209 next_send_time = GetNewPackets(); 211 next_send_time = GetNewPackets();
210 ASSERT_NE(-1, next_send_time); 212 ASSERT_NE(-1, next_send_time);
211 next_arrival_time = GetArrivalTime(next_send_time); 213 next_arrival_time = GetArrivalTime(next_send_time);
212 } while (Lost()); // If lost, immediately read the next packet. 214 } while (Lost()); // If lost, immediately read the next packet.
213 } 215 }
214 NetEqOutputType output_type; 216 NetEqOutputType output_type;
215 // Get audio from mono instance. 217 // Get audio from mono instance.
216 size_t samples_per_channel; 218 size_t samples_per_channel;
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 415
414 INSTANTIATE_TEST_CASE_P(MultiChannel, 416 INSTANTIATE_TEST_CASE_P(MultiChannel,
415 NetEqStereoTestDelays, 417 NetEqStereoTestDelays,
416 ::testing::ValuesIn(GetTestParameters())); 418 ::testing::ValuesIn(GetTestParameters()));
417 419
418 INSTANTIATE_TEST_CASE_P(MultiChannel, 420 INSTANTIATE_TEST_CASE_P(MultiChannel,
419 NetEqStereoTestLosses, 421 NetEqStereoTestLosses,
420 ::testing::ValuesIn(GetTestParameters())); 422 ::testing::ValuesIn(GetTestParameters()));
421 423
422 } // namespace webrtc 424 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/neteq_network_stats_unittest.cc ('k') | webrtc/modules/audio_coding/neteq/neteq_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698