| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 numberOfLoops, loopSleep, markInterval); | 142 numberOfLoops, loopSleep, markInterval); |
| 143 printf("Test will take approximately %d minutes. \n", | 143 printf("Test will take approximately %d minutes. \n", |
| 144 numberOfLoops * loopSleep / 1000 / 60 + 1); | 144 numberOfLoops * loopSleep / 1000 / 60 + 1); |
| 145 | 145 |
| 146 std::unique_ptr<VoiceChannelTransport> voice_channel_transport( | 146 std::unique_ptr<VoiceChannelTransport> voice_channel_transport( |
| 147 new VoiceChannelTransport(voe_network, 0)); | 147 new VoiceChannelTransport(voe_network, 0)); |
| 148 | 148 |
| 149 for (i = 0; i < numberOfLoops; ++i) { | 149 for (i = 0; i < numberOfLoops; ++i) { |
| 150 voice_channel_transport->SetSendDestination("127.0.0.1", 4800); | 150 voice_channel_transport->SetSendDestination("127.0.0.1", 4800); |
| 151 voice_channel_transport->SetLocalReceiver(4800); | 151 voice_channel_transport->SetLocalReceiver(4800); |
| 152 VALIDATE_STRESS(base->StartReceive(0)); | |
| 153 VALIDATE_STRESS(base->StartPlayout(0)); | 152 VALIDATE_STRESS(base->StartPlayout(0)); |
| 154 VALIDATE_STRESS(base->StartSend(0)); | 153 VALIDATE_STRESS(base->StartSend(0)); |
| 155 if (!(i % markInterval)) | 154 if (!(i % markInterval)) |
| 156 MARK(); | 155 MARK(); |
| 157 SleepMs(loopSleep); | 156 SleepMs(loopSleep); |
| 158 VALIDATE_STRESS(base->StopSend(0)); | 157 VALIDATE_STRESS(base->StopSend(0)); |
| 159 VALIDATE_STRESS(base->StopPlayout(0)); | 158 VALIDATE_STRESS(base->StopPlayout(0)); |
| 160 VALIDATE_STRESS(base->StopReceive(0)); | |
| 161 } | 159 } |
| 162 ANL(); | 160 ANL(); |
| 163 | 161 |
| 164 VALIDATE_STRESS(voice_channel_transport->SetSendDestination("127.0.0.1", | 162 VALIDATE_STRESS(voice_channel_transport->SetSendDestination("127.0.0.1", |
| 165 4800)); | 163 4800)); |
| 166 VALIDATE_STRESS(voice_channel_transport->SetLocalReceiver(4800)); | 164 VALIDATE_STRESS(voice_channel_transport->SetLocalReceiver(4800)); |
| 167 VALIDATE_STRESS(base->StartReceive(0)); | |
| 168 VALIDATE_STRESS(base->StartPlayout(0)); | 165 VALIDATE_STRESS(base->StartPlayout(0)); |
| 169 VALIDATE_STRESS(base->StartSend(0)); | 166 VALIDATE_STRESS(base->StartSend(0)); |
| 170 printf("Verify that audio is good. \n"); | 167 printf("Verify that audio is good. \n"); |
| 171 PAUSE_OR_SLEEP(20000); | 168 PAUSE_OR_SLEEP(20000); |
| 172 VALIDATE_STRESS(base->StopSend(0)); | 169 VALIDATE_STRESS(base->StopSend(0)); |
| 173 VALIDATE_STRESS(base->StopPlayout(0)); | 170 VALIDATE_STRESS(base->StopPlayout(0)); |
| 174 VALIDATE_STRESS(base->StopReceive(0)); | |
| 175 | 171 |
| 176 ///////////// End test ///////////// | 172 ///////////// End test ///////////// |
| 177 | 173 |
| 178 | 174 |
| 179 // Terminate | 175 // Terminate |
| 180 VALIDATE_STRESS(base->DeleteChannel(0)); | 176 VALIDATE_STRESS(base->DeleteChannel(0)); |
| 181 VALIDATE_STRESS(base->Terminate()); | 177 VALIDATE_STRESS(base->Terminate()); |
| 182 | 178 |
| 183 printf("Test finished \n"); | 179 printf("Test finished \n"); |
| 184 | 180 |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 } else { | 394 } else { |
| 399 // Stop playout | 395 // Stop playout |
| 400 base->StopPlayout(0); | 396 base->StopPlayout(0); |
| 401 } | 397 } |
| 402 // --- END --- | 398 // --- END --- |
| 403 | 399 |
| 404 return true; | 400 return true; |
| 405 } | 401 } |
| 406 | 402 |
| 407 } // namespace voetest | 403 } // namespace voetest |
| OLD | NEW |