ACM: Remove functions related to DTMF

The functions were essentially no-op. Also removing forward declaration
of ACMDTMFDetection, which was not used.

BUG=3520

Review URL: https://codereview.webrtc.org/1356543003

Cr-Commit-Position: refs/heads/master@{#9982}
This commit is contained in:
henrik.lundin 2015-09-18 01:29:11 -07:00 committed by Commit bot
parent 11d583f414
commit 061b79af60
5 changed files with 1 additions and 51 deletions

View File

@ -105,7 +105,6 @@ AudioCoding::Config::Config()
clock(Clock::GetRealTimeClock()),
transport(nullptr),
vad_callback(nullptr),
play_dtmf(true),
initial_playout_delay_ms(0),
playout_channels(1),
playout_frequency_hz(32000) {

View File

@ -814,14 +814,6 @@ int AudioCodingModuleImpl::SetInitialPlayoutDelay(int delay_ms) {
return receiver_.SetInitialDelay(delay_ms);
}
int AudioCodingModuleImpl::SetDtmfPlayoutStatus(bool enable) {
return 0;
}
bool AudioCodingModuleImpl::DtmfPlayoutStatus() const {
return true;
}
int AudioCodingModuleImpl::EnableNack(size_t max_nack_list_size) {
return receiver_.EnableNack(max_nack_list_size);
}
@ -851,7 +843,6 @@ AudioCodingImpl::AudioCodingImpl(const Config& config) {
acm_old_.reset(new acm2::AudioCodingModuleImpl(config_old));
acm_old_->RegisterTransportCallback(config.transport);
acm_old_->RegisterVADCallback(config.vad_callback);
acm_old_->SetDtmfPlayoutStatus(config.play_dtmf);
if (config.initial_playout_delay_ms > 0) {
acm_old_->SetInitialPlayoutDelay(config.initial_playout_delay_ms);
}

View File

@ -30,8 +30,6 @@ class AudioCodingImpl;
namespace acm2 {
class ACMDTMFDetection;
class AudioCodingModuleImpl final : public AudioCodingModule {
public:
friend webrtc::AudioCodingImpl;
@ -156,16 +154,6 @@ class AudioCodingModuleImpl final : public AudioCodingModule {
// audio is accumulated in NetEq buffer, then starts decoding payloads.
int SetInitialPlayoutDelay(int delay_ms) override;
// TODO(turajs): DTMF playout is always activated in NetEq these APIs should
// be removed, as well as all VoE related APIs and methods.
//
// Configure Dtmf playout status i.e on/off playout the incoming outband Dtmf
// tone.
int SetDtmfPlayoutStatus(bool enable) override;
// Get Dtmf playout status.
bool DtmfPlayoutStatus() const override;
// Set playout mode voice, fax.
int SetPlayoutMode(AudioPlayoutMode mode) override;

View File

@ -611,31 +611,6 @@ class AudioCodingModule {
//
virtual int LeastRequiredDelayMs() const = 0;
///////////////////////////////////////////////////////////////////////////
// int32_t SetDtmfPlayoutStatus()
// Configure DTMF playout, i.e. whether out-of-band
// DTMF tones are played or not.
//
// Input:
// -enable : if true to enable playout out-of-band DTMF tones,
// false to disable.
//
// Return value:
// -1 if the method fails, e.g. DTMF playout is not supported.
// 0 if the status is set successfully.
//
virtual int32_t SetDtmfPlayoutStatus(const bool enable) = 0;
///////////////////////////////////////////////////////////////////////////
// bool DtmfPlayoutStatus()
// Get Dtmf playout status.
//
// Return value:
// true if out-of-band Dtmf tones are played,
// false if playout of Dtmf tones is disabled.
//
virtual bool DtmfPlayoutStatus() const = 0;
///////////////////////////////////////////////////////////////////////////
// int32_t PlayoutTimestamp()
// The send timestamp of an RTP packet is associated with the decoded
@ -857,7 +832,6 @@ class AudioCoding {
Clock* clock;
AudioPacketizationCallback* transport;
ACMVADCallback* vad_callback;
bool play_dtmf;
int initial_playout_delay_ms;
int playout_channels;
int playout_frequency_hz;

View File

@ -912,9 +912,7 @@ Channel::Init()
// --- ACM initialization
if ((audio_coding_->InitializeReceiver() == -1)
// out-of-band Dtmf tones are played out by default
|| (audio_coding_->SetDtmfPlayoutStatus(true) == -1)) {
if (audio_coding_->InitializeReceiver() == -1) {
_engineStatisticsPtr->SetLastError(
VE_AUDIO_CODING_MODULE_ERROR, kTraceError,
"Channel::Init() unable to initialize the ACM - 1");