Regression test for issue where Opus DTX status was being forgotten.

BUG=webrtc:6020

Review-Url: https://codereview.webrtc.org/2177263002
Cr-Commit-Position: refs/heads/master@{#13539}
This commit is contained in:
ivoc
2016-07-27 04:53:47 -07:00
committed by Commit bot
parent f22d3c48fa
commit 85228d6af6
12 changed files with 92 additions and 80 deletions

View File

@ -376,6 +376,23 @@ int VoECodecImpl::SetOpusDtx(int channel, bool enable_dtx) {
return channelPtr->SetOpusDtx(enable_dtx);
}
int VoECodecImpl::GetOpusDtxStatus(int channel, bool* enabled) {
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
"GetOpusDtx(channel=%d)", channel);
if (!_shared->statistics().Initialized()) {
_shared->SetLastError(VE_NOT_INITED, kTraceError);
return -1;
}
voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel);
voe::Channel* channelPtr = ch.channel();
if (channelPtr == NULL) {
_shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
"GetOpusDtx failed to locate channel");
return -1;
}
return channelPtr->GetOpusDtx(enabled);
}
#endif // WEBRTC_VOICE_ENGINE_CODEC_API
} // namespace webrtc