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

Unified Diff: webrtc/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc

Issue 2945423003: Don't forget to support G722 stereo decoding (Closed)
Patch Set: Created 3 years, 6 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/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc
diff --git a/webrtc/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc b/webrtc/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc
index 21fbc7c616057c75beaa507fc8f22d9050c3868d..c05fcd6e2f6078ce6334b86a482d3e78dfc7e1fc 100644
--- a/webrtc/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc
+++ b/webrtc/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc
@@ -119,9 +119,16 @@ TEST(AudioDecoderFactoryTemplateTest, G722) {
EXPECT_FALSE(factory->IsSupportedDecoder({"foo", 8000, 1}));
EXPECT_TRUE(factory->IsSupportedDecoder({"g722", 8000, 1}));
EXPECT_EQ(nullptr, factory->MakeAudioDecoder({"bar", 16000, 1}));
- auto dec = factory->MakeAudioDecoder({"g722", 8000, 1});
- ASSERT_NE(nullptr, dec);
- EXPECT_EQ(16000, dec->SampleRateHz());
+ auto dec1 = factory->MakeAudioDecoder({"g722", 8000, 1});
+ ASSERT_NE(nullptr, dec1);
+ EXPECT_EQ(16000, dec1->SampleRateHz());
+ EXPECT_EQ(1u, dec1->Channels());
+ auto dec2 = factory->MakeAudioDecoder({"g722", 8000, 2});
+ ASSERT_NE(nullptr, dec2);
+ EXPECT_EQ(16000, dec2->SampleRateHz());
+ EXPECT_EQ(2u, dec2->Channels());
+ auto dec3 = factory->MakeAudioDecoder({"g722", 8000, 3});
+ ASSERT_EQ(nullptr, dec3);
}
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698