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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 next_send_time = GetNewPackets(); | 190 next_send_time = GetNewPackets(); |
191 ASSERT_NE(-1, next_send_time); | 191 ASSERT_NE(-1, next_send_time); |
192 next_arrival_time = GetArrivalTime(next_send_time); | 192 next_arrival_time = GetArrivalTime(next_send_time); |
193 } while (Lost()); // If lost, immediately read the next packet. | 193 } while (Lost()); // If lost, immediately read the next packet. |
194 | 194 |
195 int time_now = 0; | 195 int time_now = 0; |
196 for (int k = 0; k < num_loops; ++k) { | 196 for (int k = 0; k < num_loops; ++k) { |
197 while (time_now >= next_arrival_time) { | 197 while (time_now >= next_arrival_time) { |
198 // Insert packet in mono instance. | 198 // Insert packet in mono instance. |
199 ASSERT_EQ(NetEq::kOK, | 199 ASSERT_EQ(NetEq::kOK, |
200 neteq_mono_->InsertPacket(rtp_header_mono_.header, | 200 neteq_mono_->InsertPacket(rtp_header_mono_, |
201 rtc::ArrayView<const uint8_t>( | 201 rtc::ArrayView<const uint8_t>( |
202 encoded_, payload_size_bytes_), | 202 encoded_, payload_size_bytes_), |
203 next_arrival_time)); | 203 next_arrival_time)); |
204 // Insert packet in multi-channel instance. | 204 // Insert packet in multi-channel instance. |
205 ASSERT_EQ(NetEq::kOK, | 205 ASSERT_EQ(NetEq::kOK, neteq_->InsertPacket( |
206 neteq_->InsertPacket( | 206 rtp_header_, rtc::ArrayView<const uint8_t>( |
207 rtp_header_.header, | 207 encoded_multi_channel_, |
208 rtc::ArrayView<const uint8_t>(encoded_multi_channel_, | 208 multi_payload_size_bytes_), |
209 multi_payload_size_bytes_), | 209 next_arrival_time)); |
210 next_arrival_time)); | |
211 // Get next input packets (mono and multi-channel). | 210 // Get next input packets (mono and multi-channel). |
212 do { | 211 do { |
213 next_send_time = GetNewPackets(); | 212 next_send_time = GetNewPackets(); |
214 ASSERT_NE(-1, next_send_time); | 213 ASSERT_NE(-1, next_send_time); |
215 next_arrival_time = GetArrivalTime(next_send_time); | 214 next_arrival_time = GetArrivalTime(next_send_time); |
216 } while (Lost()); // If lost, immediately read the next packet. | 215 } while (Lost()); // If lost, immediately read the next packet. |
217 } | 216 } |
218 // Get audio from mono instance. | 217 // Get audio from mono instance. |
219 bool muted; | 218 bool muted; |
220 EXPECT_EQ(NetEq::kOK, neteq_mono_->GetAudio(&output_, &muted)); | 219 EXPECT_EQ(NetEq::kOK, neteq_mono_->GetAudio(&output_, &muted)); |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 | 427 |
429 INSTANTIATE_TEST_CASE_P(MultiChannel, | 428 INSTANTIATE_TEST_CASE_P(MultiChannel, |
430 NetEqStereoTestDelays, | 429 NetEqStereoTestDelays, |
431 ::testing::ValuesIn(GetTestParameters())); | 430 ::testing::ValuesIn(GetTestParameters())); |
432 | 431 |
433 INSTANTIATE_TEST_CASE_P(MultiChannel, | 432 INSTANTIATE_TEST_CASE_P(MultiChannel, |
434 NetEqStereoTestLosses, | 433 NetEqStereoTestLosses, |
435 ::testing::ValuesIn(GetTestParameters())); | 434 ::testing::ValuesIn(GetTestParameters())); |
436 | 435 |
437 } // namespace webrtc | 436 } // namespace webrtc |
OLD | NEW |