Supporting Opus DTX in Voice Engine.

Opus DTX is an Opus specific feature. It does not require WebRTC VAD/DTX, therefore is not set by VoECodec::SetVADStatus(), but rather a dedicated API.

BUG=1014
R=henrika@webrtc.org, pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/43709004

Cr-Commit-Position: refs/heads/master@{#8716}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8716 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
minyue@webrtc.org
2015-03-13 09:38:07 +00:00
parent dd0292a774
commit 9b2e1144df
8 changed files with 80 additions and 0 deletions

View File

@@ -192,6 +192,7 @@ class FakeWebRtcVoiceEngine
vad(false),
codec_fec(false),
max_encoding_bandwidth(0),
opus_dtx(false),
red(false),
nack(false),
media_processor_registered(false),
@@ -222,6 +223,7 @@ class FakeWebRtcVoiceEngine
bool vad;
bool codec_fec;
int max_encoding_bandwidth;
bool opus_dtx;
bool red;
bool nack;
bool media_processor_registered;
@@ -664,6 +666,16 @@ class FakeWebRtcVoiceEngine
return 0;
}
WEBRTC_FUNC(SetOpusDtx, (int channel, bool enable_dtx)) {
WEBRTC_CHECK_CHANNEL(channel);
if (_stricmp(channels_[channel]->send_codec.plname, "opus") != 0) {
// Return -1 if current send codec is not Opus.
return -1;
}
channels_[channel]->opus_dtx = enable_dtx;
return 0;
}
// webrtc::VoEDtmf
WEBRTC_FUNC(SendTelephoneEvent, (int channel, int event_code,
bool out_of_band = true, int length_ms = 160, int attenuation_db = 10)) {