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

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: Addressed review comments. 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..3f404f736f31364f2b120c874efd3e8695b5a15d 100644
--- a/webrtc/modules/audio_coding/acm2/audio_coding_module.cc
+++ b/webrtc/modules/audio_coding/acm2/audio_coding_module.cc
@@ -48,6 +48,8 @@ class AudioCodingModuleImpl final : public AudioCodingModule {
void ModifyEncoder(
FunctionView<void(std::unique_ptr<AudioEncoder>*)> modifier) override;
+ void QueryEncoder(FunctionView<void(const AudioEncoder*)> query) override;
+
// Get current send codec.
rtc::Optional<CodecInst> SendCodec() const override;
@@ -596,6 +598,12 @@ void AudioCodingModuleImpl::ModifyEncoder(
modifier(&encoder_stack_);
}
+void AudioCodingModuleImpl::QueryEncoder(
minyue-webrtc 2016/07/26 09:37:01 yes, I like it. but preferrably a std::unique_ptr<
ivoc 2016/07/26 12:28:31 I don't think it's possible to cast a unique_ptr<X
ivoc 2016/07/26 13:55:20 I thought about this a little more, and I think we
+ FunctionView<void(const AudioEncoder*)> query) {
+ rtc::CritScope lock(&acm_crit_sect_);
+ query(encoder_stack_.get());
+}
+
// Get current send codec.
rtc::Optional<CodecInst> AudioCodingModuleImpl::SendCodec() const {
rtc::CritScope lock(&acm_crit_sect_);
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/codecs/audio_encoder.h » ('j') | webrtc/voice_engine/include/voe_codec.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698