| 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |