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

Unified Diff: webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc

Issue 2592253004: Make a the decisions of ANA optional for the opus encoder. (Closed)
Patch Set: Respond to comments. Created 4 years 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/modules/audio_coding/codecs/opus/audio_encoder_opus.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc
diff --git a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc
index e8bfaf6830cca7dff72f7ef749b9b46ad8173634..f024af4cef18fe2e826d986fa9d79d2510464f37 100644
--- a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc
+++ b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc
@@ -443,4 +443,25 @@ TEST(AudioEncoderOpusTest, ConfigComplexityAdaptation) {
config.bitrate_bps = rtc::Optional<int>(14001);
EXPECT_EQ(rtc::Optional<int>(6), config.GetNewComplexity());
}
+
+TEST(AudioEncoderOpusTest, EmptyConfigDontAffectEncoderSettings) {
ivoc 2016/12/27 13:56:56 nit: Please rename to EmptyConfigDoesntAffectEncod
+ auto states = CreateCodec(2);
+ states.encoder->EnableAudioNetworkAdaptor("", nullptr);
+
+ auto config = CreateEncoderRuntimeConfig();
+ AudioNetworkAdaptor::EncoderRuntimeConfig empty_config;
+
+ EXPECT_CALL(**states.mock_audio_network_adaptor, GetEncoderRuntimeConfig())
+ .WillOnce(Return(config))
+ .WillOnce(Return(empty_config));
+
+ constexpr size_t kOverhead = 64;
+ EXPECT_CALL(**states.mock_audio_network_adaptor, SetOverhead(kOverhead))
+ .Times(2);
+ states.encoder->OnReceivedOverhead(kOverhead);
+ states.encoder->OnReceivedOverhead(kOverhead);
+
+ CheckEncoderRuntimeConfig(states.encoder.get(), config);
+}
+
} // namespace webrtc
« no previous file with comments | « webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698