Chromium Code Reviews| 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 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 681 myMinDelay = &_minDelayA; | 681 myMinDelay = &_minDelayA; |
| 682 } else { | 682 } else { |
| 683 myACM = _acmB.get(); | 683 myACM = _acmB.get(); |
| 684 myChannel = _channel_A2B; | 684 myChannel = _channel_A2B; |
| 685 myMinDelay = &_minDelayB; | 685 myMinDelay = &_minDelayB; |
| 686 } | 686 } |
| 687 | 687 |
| 688 CHECK_ERROR_MT(myACM->SetMinimumPlayoutDelay(*myMinDelay)); | 688 CHECK_ERROR_MT(myACM->SetMinimumPlayoutDelay(*myMinDelay)); |
| 689 | 689 |
| 690 inTimestamp = myChannel->LastInTimestamp(); | 690 inTimestamp = myChannel->LastInTimestamp(); |
| 691 CHECK_ERROR_MT(myACM->PlayoutTimestamp(&outTimestamp)); | 691 CHECK_ERROR_MT(myACM->PlayoutTimestamp() ? 0 : -1); |
| 692 | 692 |
| 693 if (!_randomTest) { | 693 if (!_randomTest) { |
| 694 myEvent->StartTimer(true, 30); | 694 myEvent->StartTimer(true, 30); |
| 695 int n = 0; | 695 int n = 0; |
| 696 int settlePoint = 5000; | 696 int settlePoint = 5000; |
| 697 while (n < settlePoint + 400) { | 697 while (n < settlePoint + 400) { |
| 698 myEvent->Wait(1000); | 698 myEvent->Wait(1000); |
| 699 | 699 |
| 700 inTimestamp = myChannel->LastInTimestamp(); | 700 inTimestamp = myChannel->LastInTimestamp(); |
| 701 CHECK_ERROR_MT(myACM->PlayoutTimestamp(&outTimestamp)); | 701 CHECK_ERROR_MT(myACM->PlayoutTimestamp() ? 0 : -1); |
| 702 | 702 |
| 703 //std::cout << outTimestamp << std::endl << std::flush; | 703 //std::cout << outTimestamp << std::endl << std::flush; |
| 704 estimDelay = (double) ((uint32_t)(inTimestamp - outTimestamp)) | 704 estimDelay = (double) ((uint32_t)(inTimestamp - outTimestamp)) |
|
minyue-webrtc
2016/04/04 15:53:50
no value assigned to outTimestam
hlundin-webrtc
2016/04/04 21:02:54
Ouch. My bad. Thanks for catching this.
| |
| 705 / ((double) myACM->ReceiveFrequency() / 1000.0); | 705 / ((double) myACM->ReceiveFrequency() / 1000.0); |
| 706 | 706 |
| 707 estimDelayCB.Update(estimDelay); | 707 estimDelayCB.Update(estimDelay); |
| 708 | 708 |
| 709 estimDelayCB.ArithMean(averageEstimDelay); | 709 estimDelayCB.ArithMean(averageEstimDelay); |
| 710 //printf("\n %6.1f \n", estimDelay); | 710 //printf("\n %6.1f \n", estimDelay); |
| 711 //std::cout << " " << std::flush; | 711 //std::cout << " " << std::flush; |
| 712 | 712 |
| 713 if (_verbose) { | 713 if (_verbose) { |
| 714 fprintf(stdout, | 714 fprintf(stdout, |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1095 CHECK_ERROR_MT(myACM->RegisterSendCodec(myCodec)); | 1095 CHECK_ERROR_MT(myACM->RegisterSendCodec(myCodec)); |
| 1096 myChannel->ResetStats(); | 1096 myChannel->ResetStats(); |
| 1097 { | 1097 { |
| 1098 WriteLockScoped wl(_apiTestRWLock); | 1098 WriteLockScoped wl(_apiTestRWLock); |
| 1099 *thereIsEncoder = true; | 1099 *thereIsEncoder = true; |
| 1100 } | 1100 } |
| 1101 Wait(500); | 1101 Wait(500); |
| 1102 } | 1102 } |
| 1103 | 1103 |
| 1104 } // namespace webrtc | 1104 } // namespace webrtc |
| OLD | NEW |