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

Unified Diff: webrtc/modules/audio_coding/acm2/audio_coding_module.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: Initial version. 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
Index: webrtc/modules/audio_coding/acm2/audio_coding_module.cc
diff --git a/webrtc/modules/audio_coding/acm2/audio_coding_module.cc b/webrtc/modules/audio_coding/acm2/audio_coding_module.cc
index b394c591567926b151b00a62c861f7f7bc35bbd1..b7441182e86d7bfef367e078a24c40ed66f72592 100644
--- a/webrtc/modules/audio_coding/acm2/audio_coding_module.cc
+++ b/webrtc/modules/audio_coding/acm2/audio_coding_module.cc
@@ -180,6 +180,8 @@ class AudioCodingModuleImpl final : public AudioCodingModule {
int DisableOpusDtx() override;
+ int GetOpusDtx(bool* enabled) override;
+
int UnregisterReceiveCodec(uint8_t payload_type) override;
int EnableNack(size_t max_nack_list_size) override;
@@ -1205,6 +1207,15 @@ int AudioCodingModuleImpl::DisableOpusDtx() {
return encoder_stack_->SetDtx(false) ? 0 : -1;
}
+int AudioCodingModuleImpl::GetOpusDtx(bool* enabled) {
+ rtc::CritScope lock(&acm_crit_sect_);
+ if (!HaveValidEncoder("GetOpusDtx")) {
+ return -1;
+ }
+ *enabled = encoder_stack_->GetDtx();
+ return 0;
+}
+
int32_t AudioCodingModuleImpl::PlayoutTimestamp(uint32_t* timestamp) {
rtc::Optional<uint32_t> ts = PlayoutTimestamp();
if (!ts)

Powered by Google App Engine
This is Rietveld 408576698