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

Unified Diff: talk/session/media/channel.cc

Issue 1487393002: Refactor WVoE DTMF handling #1 (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « talk/session/media/channel.h ('k') | talk/session/media/channel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/session/media/channel.cc
diff --git a/talk/session/media/channel.cc b/talk/session/media/channel.cc
index ef26704f1a4f0058d895e7fb3d539030c7a300e3..f83afa1ea46434352abc18abe22d9ba70cd83318 100644
--- a/talk/session/media/channel.cc
+++ b/talk/session/media/channel.cc
@@ -1317,15 +1317,6 @@ void VoiceChannel::SetEarlyMedia(bool enable) {
}
}
-bool VoiceChannel::PressDTMF(int digit, bool playout) {
- int flags = DF_SEND;
- if (playout) {
- flags |= DF_PLAY;
- }
- int duration_ms = 160;
- return InsertDtmf(0, digit, duration_ms, flags);
-}
-
bool VoiceChannel::CanInsertDtmf() {
return InvokeOnWorker(Bind(&VoiceMediaChannel::CanInsertDtmf,
media_channel()));
@@ -1333,10 +1324,9 @@ bool VoiceChannel::CanInsertDtmf() {
bool VoiceChannel::InsertDtmf(uint32_t ssrc,
int event_code,
- int duration,
- int flags) {
+ int duration) {
return InvokeOnWorker(Bind(&VoiceChannel::InsertDtmf_w, this,
- ssrc, event_code, duration, flags));
+ ssrc, event_code, duration));
}
bool VoiceChannel::SetOutputVolume(uint32_t ssrc, double volume) {
@@ -1532,13 +1522,11 @@ void VoiceChannel::HandleEarlyMediaTimeout() {
bool VoiceChannel::InsertDtmf_w(uint32_t ssrc,
int event,
- int duration,
- int flags) {
+ int duration) {
if (!enabled()) {
return false;
}
-
- return media_channel()->InsertDtmf(ssrc, event, duration, flags);
+ return media_channel()->InsertDtmf(ssrc, event, duration);
}
void VoiceChannel::OnMessage(rtc::Message *pmsg) {
« no previous file with comments | « talk/session/media/channel.h ('k') | talk/session/media/channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698