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@6146 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
f383a1b0f2
commit
9f277350f8
@ -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() {}
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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),
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user