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 3397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3408 CriticalSectionScoped cs(video_sync_lock_.get()); | 3408 CriticalSectionScoped cs(video_sync_lock_.get()); |
3409 if (_average_jitter_buffer_delay_us == 0) { | 3409 if (_average_jitter_buffer_delay_us == 0) { |
3410 return false; | 3410 return false; |
3411 } | 3411 } |
3412 *jitter_buffer_delay_ms = (_average_jitter_buffer_delay_us + 500) / 1000 + | 3412 *jitter_buffer_delay_ms = (_average_jitter_buffer_delay_us + 500) / 1000 + |
3413 _recPacketDelayMs; | 3413 _recPacketDelayMs; |
3414 *playout_buffer_delay_ms = playout_delay_ms_; | 3414 *playout_buffer_delay_ms = playout_delay_ms_; |
3415 return true; | 3415 return true; |
3416 } | 3416 } |
3417 | 3417 |
| 3418 uint32_t Channel::GetDelayEstimate() const { |
| 3419 int jitter_buffer_delay_ms = 0; |
| 3420 int playout_buffer_delay_ms = 0; |
| 3421 GetDelayEstimate(&jitter_buffer_delay_ms, &playout_buffer_delay_ms); |
| 3422 return jitter_buffer_delay_ms + playout_buffer_delay_ms; |
| 3423 } |
| 3424 |
3418 int Channel::LeastRequiredDelayMs() const { | 3425 int Channel::LeastRequiredDelayMs() const { |
3419 return audio_coding_->LeastRequiredDelayMs(); | 3426 return audio_coding_->LeastRequiredDelayMs(); |
3420 } | 3427 } |
3421 | 3428 |
3422 int | 3429 int |
3423 Channel::SetMinimumPlayoutDelay(int delayMs) | 3430 Channel::SetMinimumPlayoutDelay(int delayMs) |
3424 { | 3431 { |
3425 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId), | 3432 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId), |
3426 "Channel::SetMinimumPlayoutDelay()"); | 3433 "Channel::SetMinimumPlayoutDelay()"); |
3427 if ((delayMs < kVoiceEngineMinMinPlayoutDelayMs) || | 3434 if ((delayMs < kVoiceEngineMinMinPlayoutDelayMs) || |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3935 int64_t min_rtt = 0; | 3942 int64_t min_rtt = 0; |
3936 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) | 3943 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) |
3937 != 0) { | 3944 != 0) { |
3938 return 0; | 3945 return 0; |
3939 } | 3946 } |
3940 return rtt; | 3947 return rtt; |
3941 } | 3948 } |
3942 | 3949 |
3943 } // namespace voe | 3950 } // namespace voe |
3944 } // namespace webrtc | 3951 } // namespace webrtc |
OLD | NEW |