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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 return static_cast<APITest*>(obj)->APIRunA(); | 316 return static_cast<APITest*>(obj)->APIRunA(); |
317 } | 317 } |
318 | 318 |
319 bool APITest::APIThreadB(void* obj) { | 319 bool APITest::APIThreadB(void* obj) { |
320 return static_cast<APITest*>(obj)->APIRunB(); | 320 return static_cast<APITest*>(obj)->APIRunB(); |
321 } | 321 } |
322 | 322 |
323 bool APITest::PullAudioRunA() { | 323 bool APITest::PullAudioRunA() { |
324 _pullEventA->Wait(100); | 324 _pullEventA->Wait(100); |
325 AudioFrame audioFrame; | 325 AudioFrame audioFrame; |
326 if (_acmA->PlayoutData10Ms(_outFreqHzA, &audioFrame) < 0) { | 326 bool muted; |
| 327 if (_acmA->PlayoutData10Ms(_outFreqHzA, &audioFrame, &muted) < 0) { |
327 bool thereIsDecoder; | 328 bool thereIsDecoder; |
328 { | 329 { |
329 ReadLockScoped rl(_apiTestRWLock); | 330 ReadLockScoped rl(_apiTestRWLock); |
330 thereIsDecoder = _thereIsDecoderA; | 331 thereIsDecoder = _thereIsDecoderA; |
331 } | 332 } |
332 if (thereIsDecoder) { | 333 if (thereIsDecoder) { |
333 fprintf(stderr, "\n>>>>>> cannot pull audio A <<<<<<<< \n"); | 334 fprintf(stderr, "\n>>>>>> cannot pull audio A <<<<<<<< \n"); |
334 } | 335 } |
335 } else { | 336 } else { |
336 if (_writeToFile) { | 337 if (_writeToFile) { |
337 _outFileA.Write10MsData(audioFrame); | 338 _outFileA.Write10MsData(audioFrame); |
338 } | 339 } |
339 } | 340 } |
340 return true; | 341 return true; |
341 } | 342 } |
342 | 343 |
343 bool APITest::PullAudioRunB() { | 344 bool APITest::PullAudioRunB() { |
344 _pullEventB->Wait(100); | 345 _pullEventB->Wait(100); |
345 AudioFrame audioFrame; | 346 AudioFrame audioFrame; |
346 if (_acmB->PlayoutData10Ms(_outFreqHzB, &audioFrame) < 0) { | 347 bool muted; |
| 348 if (_acmB->PlayoutData10Ms(_outFreqHzB, &audioFrame, &muted) < 0) { |
347 bool thereIsDecoder; | 349 bool thereIsDecoder; |
348 { | 350 { |
349 ReadLockScoped rl(_apiTestRWLock); | 351 ReadLockScoped rl(_apiTestRWLock); |
350 thereIsDecoder = _thereIsDecoderB; | 352 thereIsDecoder = _thereIsDecoderB; |
351 } | 353 } |
352 if (thereIsDecoder) { | 354 if (thereIsDecoder) { |
353 fprintf(stderr, "\n>>>>>> cannot pull audio B <<<<<<<< \n"); | 355 fprintf(stderr, "\n>>>>>> cannot pull audio B <<<<<<<< \n"); |
354 fprintf(stderr, "%d %d\n", _testNumA, _testNumB); | 356 fprintf(stderr, "%d %d\n", _testNumA, _testNumB); |
355 } | 357 } |
356 } else { | 358 } else { |
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1096 CHECK_ERROR_MT(myACM->RegisterSendCodec(myCodec)); | 1098 CHECK_ERROR_MT(myACM->RegisterSendCodec(myCodec)); |
1097 myChannel->ResetStats(); | 1099 myChannel->ResetStats(); |
1098 { | 1100 { |
1099 WriteLockScoped wl(_apiTestRWLock); | 1101 WriteLockScoped wl(_apiTestRWLock); |
1100 *thereIsEncoder = true; | 1102 *thereIsEncoder = true; |
1101 } | 1103 } |
1102 Wait(500); | 1104 Wait(500); |
1103 } | 1105 } |
1104 | 1106 |
1105 } // namespace webrtc | 1107 } // namespace webrtc |
OLD | NEW |