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

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

Issue 2392883002: Multi frequency DTMF support - sender side (Closed)
Patch Set: rebase Created 4 years, 1 month 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 2278 matching lines...) Expand 10 before | Expand all | Expand 10 after
2289 if (_rtpRtcpModule->SendTelephoneEventOutband( 2289 if (_rtpRtcpModule->SendTelephoneEventOutband(
2290 event, duration_ms, kTelephoneEventAttenuationdB) != 0) { 2290 event, duration_ms, kTelephoneEventAttenuationdB) != 0) {
2291 _engineStatisticsPtr->SetLastError( 2291 _engineStatisticsPtr->SetLastError(
2292 VE_SEND_DTMF_FAILED, kTraceWarning, 2292 VE_SEND_DTMF_FAILED, kTraceWarning,
2293 "SendTelephoneEventOutband() failed to send event"); 2293 "SendTelephoneEventOutband() failed to send event");
2294 return -1; 2294 return -1;
2295 } 2295 }
2296 return 0; 2296 return 0;
2297 } 2297 }
2298 2298
2299 int Channel::SetSendTelephoneEventPayloadType(int payload_type) { 2299 int Channel::SetSendTelephoneEventPayloadType(int payload_type,
2300 int payload_frequency) {
2300 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId), 2301 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId),
2301 "Channel::SetSendTelephoneEventPayloadType()"); 2302 "Channel::SetSendTelephoneEventPayloadType()");
2302 RTC_DCHECK_LE(0, payload_type); 2303 RTC_DCHECK_LE(0, payload_type);
2303 RTC_DCHECK_GE(127, payload_type); 2304 RTC_DCHECK_GE(127, payload_type);
2304 CodecInst codec = {0}; 2305 CodecInst codec = {0};
2305 codec.plfreq = 8000;
2306 codec.pltype = payload_type; 2306 codec.pltype = payload_type;
2307 codec.plfreq = payload_frequency;
2307 memcpy(codec.plname, "telephone-event", 16); 2308 memcpy(codec.plname, "telephone-event", 16);
2308 if (_rtpRtcpModule->RegisterSendPayload(codec) != 0) { 2309 if (_rtpRtcpModule->RegisterSendPayload(codec) != 0) {
2309 _rtpRtcpModule->DeRegisterSendPayload(codec.pltype); 2310 _rtpRtcpModule->DeRegisterSendPayload(codec.pltype);
2310 if (_rtpRtcpModule->RegisterSendPayload(codec) != 0) { 2311 if (_rtpRtcpModule->RegisterSendPayload(codec) != 0) {
2311 _engineStatisticsPtr->SetLastError( 2312 _engineStatisticsPtr->SetLastError(
2312 VE_RTP_RTCP_MODULE_ERROR, kTraceError, 2313 VE_RTP_RTCP_MODULE_ERROR, kTraceError,
2313 "SetSendTelephoneEventPayloadType() failed to register send" 2314 "SetSendTelephoneEventPayloadType() failed to register send"
2314 "payload type"); 2315 "payload type");
2315 return -1; 2316 return -1;
2316 } 2317 }
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
3239 int64_t min_rtt = 0; 3240 int64_t min_rtt = 0;
3240 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != 3241 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) !=
3241 0) { 3242 0) {
3242 return 0; 3243 return 0;
3243 } 3244 }
3244 return rtt; 3245 return rtt;
3245 } 3246 }
3246 3247
3247 } // namespace voe 3248 } // namespace voe
3248 } // namespace webrtc 3249 } // 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