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