Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Side by Side Diff: webrtc/voice_engine/channel.cc

Issue 1482703002: Use ChannelProxy for most calls on voe::Channel in Audio[Receive|Send]Stream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added ThreadChecker to ChannelProxy Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/voice_engine/channel.h ('k') | webrtc/voice_engine/channel_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « webrtc/voice_engine/channel.h ('k') | webrtc/voice_engine/channel_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698