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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 { | 207 { |
208 CriticalSectionScoped cs(&_callbackCritSect); | 208 CriticalSectionScoped cs(&_callbackCritSect); |
209 if (_rxVadObserverPtr) | 209 if (_rxVadObserverPtr) |
210 { | 210 { |
211 _rxVadObserverPtr->OnRxVad(_channelId, vadDecision); | 211 _rxVadObserverPtr->OnRxVad(_channelId, vadDecision); |
212 } | 212 } |
213 | 213 |
214 return 0; | 214 return 0; |
215 } | 215 } |
216 | 216 |
217 bool | 217 bool Channel::SendRtp(const uint8_t* data, |
218 Channel::SendRtp(const uint8_t *data, size_t len) | 218 size_t len, |
219 { | 219 const PacketOptions& options) { |
220 WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId), | 220 WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId), |
221 "Channel::SendPacket(channel=%d, len=%" PRIuS ")", len); | 221 "Channel::SendPacket(channel=%d, len=%" PRIuS ")", len); |
222 | 222 |
223 CriticalSectionScoped cs(&_callbackCritSect); | 223 CriticalSectionScoped cs(&_callbackCritSect); |
224 | 224 |
225 if (_transportPtr == NULL) | 225 if (_transportPtr == NULL) |
226 { | 226 { |
227 WEBRTC_TRACE(kTraceError, kTraceVoice, VoEId(_instanceId,_channelId), | 227 WEBRTC_TRACE(kTraceError, kTraceVoice, VoEId(_instanceId,_channelId), |
228 "Channel::SendPacket() failed to send RTP packet due to" | 228 "Channel::SendPacket() failed to send RTP packet due to" |
229 " invalid transport object"); | 229 " invalid transport object"); |
230 return false; | 230 return false; |
231 } | 231 } |
232 | 232 |
233 uint8_t* bufferToSendPtr = (uint8_t*)data; | 233 uint8_t* bufferToSendPtr = (uint8_t*)data; |
234 size_t bufferLength = len; | 234 size_t bufferLength = len; |
235 | 235 |
236 if (!_transportPtr->SendRtp(bufferToSendPtr, bufferLength)) { | 236 if (!_transportPtr->SendRtp(bufferToSendPtr, bufferLength, options)) { |
237 std::string transport_name = | 237 std::string transport_name = |
238 _externalTransport ? "external transport" : "WebRtc sockets"; | 238 _externalTransport ? "external transport" : "WebRtc sockets"; |
239 WEBRTC_TRACE(kTraceError, kTraceVoice, | 239 WEBRTC_TRACE(kTraceError, kTraceVoice, |
240 VoEId(_instanceId,_channelId), | 240 VoEId(_instanceId,_channelId), |
241 "Channel::SendPacket() RTP transmission using %s failed", | 241 "Channel::SendPacket() RTP transmission using %s failed", |
242 transport_name.c_str()); | 242 transport_name.c_str()); |
243 return false; | 243 return false; |
244 } | 244 } |
245 return true; | 245 return true; |
246 } | 246 } |
(...skipping 3707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3954 int64_t min_rtt = 0; | 3954 int64_t min_rtt = 0; |
3955 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) | 3955 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) |
3956 != 0) { | 3956 != 0) { |
3957 return 0; | 3957 return 0; |
3958 } | 3958 } |
3959 return rtt; | 3959 return rtt; |
3960 } | 3960 } |
3961 | 3961 |
3962 } // namespace voe | 3962 } // namespace voe |
3963 } // namespace webrtc | 3963 } // namespace webrtc |
OLD | NEW |