| 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 2795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2806 if (audio_coding_->Add10MsData((AudioFrame&)_audioFrame) < 0) { | 2806 if (audio_coding_->Add10MsData((AudioFrame&)_audioFrame) < 0) { |
| 2807 WEBRTC_TRACE(kTraceError, kTraceVoice, VoEId(_instanceId, _channelId), | 2807 WEBRTC_TRACE(kTraceError, kTraceVoice, VoEId(_instanceId, _channelId), |
| 2808 "Channel::EncodeAndSend() ACM encoding failed"); | 2808 "Channel::EncodeAndSend() ACM encoding failed"); |
| 2809 return 0xFFFFFFFF; | 2809 return 0xFFFFFFFF; |
| 2810 } | 2810 } |
| 2811 | 2811 |
| 2812 _timeStamp += static_cast<uint32_t>(_audioFrame.samples_per_channel_); | 2812 _timeStamp += static_cast<uint32_t>(_audioFrame.samples_per_channel_); |
| 2813 return 0; | 2813 return 0; |
| 2814 } | 2814 } |
| 2815 | 2815 |
| 2816 void Channel::set_associate_send_channel(const ChannelOwner& channel) { |
| 2817 RTC_DCHECK(!channel.channel() || |
| 2818 channel.channel()->ChannelId() != _channelId); |
| 2819 rtc::CritScope lock(&assoc_send_channel_lock_); |
| 2820 associate_send_channel_ = channel; |
| 2821 } |
| 2822 |
| 2816 void Channel::DisassociateSendChannel(int channel_id) { | 2823 void Channel::DisassociateSendChannel(int channel_id) { |
| 2817 rtc::CritScope lock(&assoc_send_channel_lock_); | 2824 rtc::CritScope lock(&assoc_send_channel_lock_); |
| 2818 Channel* channel = associate_send_channel_.channel(); | 2825 Channel* channel = associate_send_channel_.channel(); |
| 2819 if (channel && channel->ChannelId() == channel_id) { | 2826 if (channel && channel->ChannelId() == channel_id) { |
| 2820 // If this channel is associated with a send channel of the specified | 2827 // If this channel is associated with a send channel of the specified |
| 2821 // Channel ID, disassociate with it. | 2828 // Channel ID, disassociate with it. |
| 2822 ChannelOwner ref(NULL); | 2829 ChannelOwner ref(NULL); |
| 2823 associate_send_channel_ = ref; | 2830 associate_send_channel_ = ref; |
| 2824 } | 2831 } |
| 2825 } | 2832 } |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3232 int64_t min_rtt = 0; | 3239 int64_t min_rtt = 0; |
| 3233 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != | 3240 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != |
| 3234 0) { | 3241 0) { |
| 3235 return 0; | 3242 return 0; |
| 3236 } | 3243 } |
| 3237 return rtt; | 3244 return rtt; |
| 3238 } | 3245 } |
| 3239 | 3246 |
| 3240 } // namespace voe | 3247 } // namespace voe |
| 3241 } // namespace webrtc | 3248 } // namespace webrtc |
| OLD | NEW |