summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhenrika@webrtc.org <henrika@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-05-14 12:04:29 +0000
committerhenrika@webrtc.org <henrika@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-05-14 12:04:29 +0000
commitc4e54b6b46c22c03725c9d39612fd50792d018ef (patch)
treec5d855302c1e1315564d9b609879e89fccd5b3d0
parent7b2651a88b210ea01c9c3166c080b025d59094fc (diff)
downloadwebrtc-c4e54b6b46c22c03725c9d39612fd50792d018ef.tar.gz
Removes parts of the webrtc::VoEDtmf sub API as part of a clean-up operation where the goal is to remove unused APIs.
BUG=3206 R=wu@webrtc.org Review URL: https://webrtc-codereview.appspot.com/12299005 git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6146 4adac7df-926f-26a2-2b94-8c16560cd09d
-rw-r--r--voice_engine/include/voe_dtmf.h16
-rw-r--r--voice_engine/output_mixer.cc23
-rw-r--r--voice_engine/output_mixer.h4
-rw-r--r--voice_engine/voe_dtmf_impl.cc44
-rw-r--r--voice_engine/voe_dtmf_impl.h5
5 files changed, 6 insertions, 86 deletions
diff --git a/voice_engine/include/voe_dtmf.h b/voice_engine/include/voe_dtmf.h
index 301d73f8..4db8cbc5 100644
--- a/voice_engine/include/voe_dtmf.h
+++ b/voice_engine/include/voe_dtmf.h
@@ -43,7 +43,7 @@ class VoiceEngine;
class WEBRTC_DLLEXPORT VoEDtmf
{
public:
-
+
// Factory for the VoEDtmf sub-API. Increases an internal
// reference counter if successful. Returns NULL if the API is not
// supported or if construction fails.
@@ -60,13 +60,13 @@ public:
bool outOfBand = true, int lengthMs = 160,
int attenuationDb = 10) = 0;
-
+
// Sets the dynamic payload |type| that should be used for telephone
// events.
virtual int SetSendTelephoneEventPayloadType(int channel,
unsigned char type) = 0;
-
+
// Gets the currently set dynamic payload |type| for telephone events.
virtual int GetSendTelephoneEventPayloadType(int channel,
unsigned char& type) = 0;
@@ -90,14 +90,10 @@ public:
virtual int PlayDtmfTone(int eventCode, int lengthMs = 200,
int attenuationDb = 10) = 0;
- // Starts playing out a DTMF feedback tone locally.
- // The tone will be played out until the corresponding stop function
- // is called.
+ // To be removed. Don't use.
virtual int StartPlayingDtmfTone(int eventCode,
- int attenuationDb = 10) = 0;
-
- // Stops playing out a DTMF feedback tone locally.
- virtual int StopPlayingDtmfTone() = 0;
+ int attenuationDb = 10) { return -1; }
+ virtual int StopPlayingDtmfTone() { return -1; }
protected:
VoEDtmf() {}
diff --git a/voice_engine/output_mixer.cc b/voice_engine/output_mixer.cc
index 5689c462..7cf98d39 100644
--- a/voice_engine/output_mixer.cc
+++ b/voice_engine/output_mixer.cc
@@ -236,29 +236,6 @@ int OutputMixer::PlayDtmfTone(uint8_t eventCode, int lengthMs,
return 0;
}
-int OutputMixer::StartPlayingDtmfTone(uint8_t eventCode,
- int attenuationDb)
-{
- WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, -1),
- "OutputMixer::StartPlayingDtmfTone()");
- if (_dtmfGenerator.StartTone(eventCode, attenuationDb) != 0)
- {
- _engineStatisticsPtr->SetLastError(
- VE_STILL_PLAYING_PREV_DTMF,
- kTraceError,
- "OutputMixer::StartPlayingDtmfTone())");
- return -1;
- }
- return 0;
-}
-
-int OutputMixer::StopPlayingDtmfTone()
-{
- WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, -1),
- "OutputMixer::StopPlayingDtmfTone()");
- return (_dtmfGenerator.StopTone());
-}
-
int32_t
OutputMixer::SetMixabilityStatus(MixerParticipant& participant,
bool mixable)
diff --git a/voice_engine/output_mixer.h b/voice_engine/output_mixer.h
index 859ce64b..e5c65e41 100644
--- a/voice_engine/output_mixer.h
+++ b/voice_engine/output_mixer.h
@@ -54,10 +54,6 @@ public:
// VoEDtmf
int PlayDtmfTone(uint8_t eventCode, int lengthMs, int attenuationDb);
- int StartPlayingDtmfTone(uint8_t eventCode, int attenuationDb);
-
- int StopPlayingDtmfTone();
-
int32_t MixActiveChannels();
int32_t DoOperationsOnCombinedSignal(bool feed_data_to_apm);
diff --git a/voice_engine/voe_dtmf_impl.cc b/voice_engine/voe_dtmf_impl.cc
index 9065d45e..70872c69 100644
--- a/voice_engine/voe_dtmf_impl.cc
+++ b/voice_engine/voe_dtmf_impl.cc
@@ -227,50 +227,6 @@ int VoEDtmfImpl::PlayDtmfTone(int eventCode,
attenuationDb);
}
-int VoEDtmfImpl::StartPlayingDtmfTone(int eventCode,
- int attenuationDb)
-{
- WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
- "StartPlayingDtmfTone(eventCode=%d, attenuationDb=%d)",
- eventCode, attenuationDb);
-
- if (!_shared->statistics().Initialized())
- {
- _shared->SetLastError(VE_NOT_INITED, kTraceError);
- return -1;
- }
- if (!_shared->audio_device()->Playing())
- {
- _shared->SetLastError(VE_NOT_PLAYING, kTraceError,
- "StartPlayingDtmfTone() no channel is playing out");
- return -1;
- }
- if ((eventCode < kMinDtmfEventCode) ||
- (eventCode > kMaxDtmfEventCode) ||
- (attenuationDb < kMinTelephoneEventAttenuation) ||
- (attenuationDb > kMaxTelephoneEventAttenuation))
- {
- _shared->SetLastError(VE_INVALID_ARGUMENT, kTraceError,
- "StartPlayingDtmfTone() invalid tone parameter(s)");
- return -1;
- }
- return _shared->output_mixer()->StartPlayingDtmfTone(eventCode,
- attenuationDb);
-}
-
-int VoEDtmfImpl::StopPlayingDtmfTone()
-{
- WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
- "StopPlayingDtmfTone()");
-
- if (!_shared->statistics().Initialized())
- {
- _shared->SetLastError(VE_NOT_INITED, kTraceError);
- return -1;
- }
- return _shared->output_mixer()->StopPlayingDtmfTone();
-}
-
int VoEDtmfImpl::SetDtmfFeedbackStatus(bool enable, bool directFeedback)
{
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
diff --git a/voice_engine/voe_dtmf_impl.h b/voice_engine/voe_dtmf_impl.h
index e879f8de..92162384 100644
--- a/voice_engine/voe_dtmf_impl.h
+++ b/voice_engine/voe_dtmf_impl.h
@@ -42,11 +42,6 @@ public:
int lengthMs = 200,
int attenuationDb = 10);
- virtual int StartPlayingDtmfTone(int eventCode,
- int attenuationDb = 10);
-
- virtual int StopPlayingDtmfTone();
-
virtual int SetDtmfPlayoutStatus(int channel, bool enable);
virtual int GetDtmfPlayoutStatus(int channel, bool& enabled);