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 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1090 _audioDeviceModulePtr = &audioDeviceModule; | 1090 _audioDeviceModulePtr = &audioDeviceModule; |
1091 _voiceEngineObserverPtr = voiceEngineObserver; | 1091 _voiceEngineObserverPtr = voiceEngineObserver; |
1092 _callbackCritSectPtr = callbackCritSect; | 1092 _callbackCritSectPtr = callbackCritSect; |
1093 return 0; | 1093 return 0; |
1094 } | 1094 } |
1095 | 1095 |
1096 int32_t | 1096 int32_t |
1097 Channel::UpdateLocalTimeStamp() | 1097 Channel::UpdateLocalTimeStamp() |
1098 { | 1098 { |
1099 | 1099 |
1100 _timeStamp += _audioFrame.samples_per_channel_; | 1100 _timeStamp += static_cast<uint32_t>(_audioFrame.samples_per_channel_); |
1101 return 0; | 1101 return 0; |
1102 } | 1102 } |
1103 | 1103 |
1104 int32_t | 1104 int32_t |
1105 Channel::StartPlayout() | 1105 Channel::StartPlayout() |
1106 { | 1106 { |
1107 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId), | 1107 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId), |
1108 "Channel::StartPlayout()"); | 1108 "Channel::StartPlayout()"); |
1109 if (channel_state_.Get().playing) | 1109 if (channel_state_.Get().playing) |
1110 { | 1110 { |
(...skipping 2336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3447 // This call will trigger AudioPacketizationCallback::SendData if encoding | 3447 // This call will trigger AudioPacketizationCallback::SendData if encoding |
3448 // is done and payload is ready for packetization and transmission. | 3448 // is done and payload is ready for packetization and transmission. |
3449 // Otherwise, it will return without invoking the callback. | 3449 // Otherwise, it will return without invoking the callback. |
3450 if (audio_coding_->Add10MsData((AudioFrame&)_audioFrame) < 0) | 3450 if (audio_coding_->Add10MsData((AudioFrame&)_audioFrame) < 0) |
3451 { | 3451 { |
3452 WEBRTC_TRACE(kTraceError, kTraceVoice, VoEId(_instanceId,_channelId), | 3452 WEBRTC_TRACE(kTraceError, kTraceVoice, VoEId(_instanceId,_channelId), |
3453 "Channel::EncodeAndSend() ACM encoding failed"); | 3453 "Channel::EncodeAndSend() ACM encoding failed"); |
3454 return 0xFFFFFFFF; | 3454 return 0xFFFFFFFF; |
3455 } | 3455 } |
3456 | 3456 |
3457 _timeStamp += _audioFrame.samples_per_channel_; | 3457 _timeStamp += static_cast<uint32_t>(_audioFrame.samples_per_channel_); |
3458 return 0; | 3458 return 0; |
3459 } | 3459 } |
3460 | 3460 |
3461 void Channel::DisassociateSendChannel(int channel_id) { | 3461 void Channel::DisassociateSendChannel(int channel_id) { |
3462 CriticalSectionScoped lock(assoc_send_channel_lock_.get()); | 3462 CriticalSectionScoped lock(assoc_send_channel_lock_.get()); |
3463 Channel* channel = associate_send_channel_.channel(); | 3463 Channel* channel = associate_send_channel_.channel(); |
3464 if (channel && channel->ChannelId() == channel_id) { | 3464 if (channel && channel->ChannelId() == channel_id) { |
3465 // If this channel is associated with a send channel of the specified | 3465 // If this channel is associated with a send channel of the specified |
3466 // Channel ID, disassociate with it. | 3466 // Channel ID, disassociate with it. |
3467 ChannelOwner ref(NULL); | 3467 ChannelOwner ref(NULL); |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4146 int64_t min_rtt = 0; | 4146 int64_t min_rtt = 0; |
4147 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) | 4147 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) |
4148 != 0) { | 4148 != 0) { |
4149 return 0; | 4149 return 0; |
4150 } | 4150 } |
4151 return rtt; | 4151 return rtt; |
4152 } | 4152 } |
4153 | 4153 |
4154 } // namespace voe | 4154 } // namespace voe |
4155 } // namespace webrtc | 4155 } // namespace webrtc |
OLD | NEW |