Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1070)

Unified Diff: webrtc/voice_engine/voe_codec_impl.cc

Issue 2177263002: Regression test for issue where Opus DTX status was being forgotten. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Renamed GetOpusDtx to GetOpusDtxStatus to avoid naming conflict with FakeWebRtcVoiceEngine. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/voice_engine/voe_codec_impl.h ('k') | webrtc/voice_engine/voe_codec_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/voe_codec_impl.cc
diff --git a/webrtc/voice_engine/voe_codec_impl.cc b/webrtc/voice_engine/voe_codec_impl.cc
index 19891bc39fae52399f23e224db25342fd6642f37..8ac24da4e7974ec893987b531d048799f3299937 100644
--- a/webrtc/voice_engine/voe_codec_impl.cc
+++ b/webrtc/voice_engine/voe_codec_impl.cc
@@ -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
« no previous file with comments | « webrtc/voice_engine/voe_codec_impl.h ('k') | webrtc/voice_engine/voe_codec_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698