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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 | 327 |
328 printf("Running %d loops with %d ms sleep. Mark every %d loop. \n", | 328 printf("Running %d loops with %d ms sleep. Mark every %d loop. \n", |
329 numberOfLoops, loopSleep, markInterval); | 329 numberOfLoops, loopSleep, markInterval); |
330 printf("Test will take approximately %d minutes. \n", | 330 printf("Test will take approximately %d minutes. \n", |
331 numberOfLoops * loopSleep / 1000 / 60 + 1); | 331 numberOfLoops * loopSleep / 1000 / 60 + 1); |
332 | 332 |
333 srand((unsigned int) time(NULL)); | 333 srand((unsigned int) time(NULL)); |
334 int rnd(0); | 334 int rnd(0); |
335 | 335 |
336 // Start extra thread | 336 // Start extra thread |
337 _ptrExtraApiThread = ThreadWrapper::CreateThread(RunExtraApi, this, | 337 _ptrExtraApiThread = PlatformThread::CreateThread(RunExtraApi, this, |
338 "StressTestExtraApiThread"); | 338 "StressTestExtraApiThread"); |
339 VALIDATE_STRESS(!_ptrExtraApiThread->Start()); | 339 VALIDATE_STRESS(!_ptrExtraApiThread->Start()); |
340 | 340 |
341 // Some possible extensions include: | 341 // Some possible extensions include: |
342 // Add more API calls to randomize | 342 // Add more API calls to randomize |
343 // More threads | 343 // More threads |
344 // Different sleep times (fixed or random). | 344 // Different sleep times (fixed or random). |
345 // Make sure audio is OK after test has finished. | 345 // Make sure audio is OK after test has finished. |
346 | 346 |
347 // Call random API functions here and in extra thread, ignore any error | 347 // Call random API functions here and in extra thread, ignore any error |
348 for (i = 0; i < numberOfLoops; ++i) { | 348 for (i = 0; i < numberOfLoops; ++i) { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 } else { | 399 } else { |
400 // Stop playout | 400 // Stop playout |
401 base->StopPlayout(0); | 401 base->StopPlayout(0); |
402 } | 402 } |
403 // --- END --- | 403 // --- END --- |
404 | 404 |
405 return true; | 405 return true; |
406 } | 406 } |
407 | 407 |
408 } // namespace voetest | 408 } // namespace voetest |
OLD | NEW |