Index: talk/media/webrtc/webrtcvoiceengine.cc |
diff --git a/talk/media/webrtc/webrtcvoiceengine.cc b/talk/media/webrtc/webrtcvoiceengine.cc |
index 8869a98cc4c05325cd9bad6e3d8601dac9a6e435..01355bbdb1e58446a95e3a4e115542fcbe48f223 100644 |
--- a/talk/media/webrtc/webrtcvoiceengine.cc |
+++ b/talk/media/webrtc/webrtcvoiceengine.cc |
@@ -2286,45 +2286,32 @@ bool WebRtcVoiceMediaChannel::CanInsertDtmf() { |
return dtmf_allowed_; |
} |
-bool WebRtcVoiceMediaChannel::InsertDtmf(uint32_t ssrc, |
- int event, |
- int duration, |
- int flags) { |
+bool WebRtcVoiceMediaChannel::InsertDtmf(uint32_t ssrc, int event, |
+ int duration) { |
RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
if (!dtmf_allowed_) { |
return false; |
} |
// Send the event. |
- if (flags & cricket::DF_SEND) { |
- int channel = -1; |
- if (ssrc == 0) { |
- if (send_streams_.size() > 0) { |
- channel = send_streams_.begin()->second->channel(); |
- } |
- } else { |
- channel = GetSendChannelId(ssrc); |
- } |
- if (channel == -1) { |
- LOG(LS_WARNING) << "InsertDtmf - The specified ssrc " |
- << ssrc << " is not in use."; |
- return false; |
- } |
- // Send DTMF using out-of-band DTMF. ("true", as 3rd arg) |
- if (engine()->voe()->dtmf()->SendTelephoneEvent( |
- channel, event, true, duration) == -1) { |
- LOG_RTCERR4(SendTelephoneEvent, channel, event, true, duration); |
- return false; |
+ int channel = -1; |
+ if (ssrc == 0) { |
+ if (send_streams_.size() > 0) { |
+ channel = send_streams_.begin()->second->channel(); |
} |
+ } else { |
+ channel = GetSendChannelId(ssrc); |
} |
- |
- // Play the event. |
- if (flags & cricket::DF_PLAY) { |
- // Play DTMF tone locally. |
- if (engine()->voe()->dtmf()->PlayDtmfTone(event, duration) == -1) { |
- LOG_RTCERR2(PlayDtmfTone, event, duration); |
- return false; |
- } |
+ if (channel == -1) { |
+ LOG(LS_WARNING) << "InsertDtmf - The specified ssrc " |
+ << ssrc << " is not in use."; |
+ return false; |
+ } |
+ // Send DTMF using out-of-band DTMF. ("true", as 3rd arg) |
+ if (engine()->voe()->dtmf()->SendTelephoneEvent( |
+ channel, event, true, duration) == -1) { |
+ LOG_RTCERR4(SendTelephoneEvent, channel, event, true, duration); |
+ return false; |
} |
return true; |