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

Unified Diff: webrtc/modules/audio_coding/main/acm2/rent_a_codec_unittest.cc

Issue 1476743002: Move the FEC enabling logic from CodecManager to Rent-A-Codec (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@rac0
Patch Set: Created 5 years, 1 month 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/main/acm2/rent_a_codec.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/main/acm2/rent_a_codec_unittest.cc
diff --git a/webrtc/modules/audio_coding/main/acm2/rent_a_codec_unittest.cc b/webrtc/modules/audio_coding/main/acm2/rent_a_codec_unittest.cc
index d2f40ed3d20385fc7d3384b29411aacd45f283bf..ae6c98b34c9248fb20f1390044acb95f30590278 100644
--- a/webrtc/modules/audio_coding/main/acm2/rent_a_codec_unittest.cc
+++ b/webrtc/modules/audio_coding/main/acm2/rent_a_codec_unittest.cc
@@ -101,18 +101,20 @@ TEST_F(RentACodecTestF, VerifyCngFrames) {
}
TEST(RentACodecTest, ExternalEncoder) {
+ const int kSampleRateHz = 8000;
MockAudioEncoder external_encoder;
+ EXPECT_CALL(external_encoder, SampleRateHz())
+ .WillRepeatedly(Return(kSampleRateHz));
+ EXPECT_CALL(external_encoder, NumChannels()).WillRepeatedly(Return(1));
+ EXPECT_CALL(external_encoder, SetFec(false)).WillRepeatedly(Return(true));
+
RentACodec rac;
RentACodec::StackParameters param;
EXPECT_EQ(&external_encoder, rac.RentEncoderStack(&external_encoder, &param));
- const int kSampleRateHz = 8000;
const int kPacketSizeSamples = kSampleRateHz / 100;
int16_t audio[kPacketSizeSamples] = {0};
uint8_t encoded[kPacketSizeSamples];
AudioEncoder::EncodedInfo info;
- EXPECT_CALL(external_encoder, SampleRateHz())
- .WillRepeatedly(Return(kSampleRateHz));
- EXPECT_CALL(external_encoder, NumChannels()).WillRepeatedly(Return(1));
{
::testing::InSequence s;
@@ -160,6 +162,7 @@ void TestCngAndRedResetSpeechEncoder(bool use_cng, bool use_red) {
EXPECT_CALL(speech_encoder, Max10MsFramesInAPacket())
.WillRepeatedly(Return(2));
EXPECT_CALL(speech_encoder, SampleRateHz()).WillRepeatedly(Return(8000));
+ EXPECT_CALL(speech_encoder, SetFec(false)).WillRepeatedly(Return(true));
{
::testing::InSequence s;
EXPECT_CALL(speech_encoder, Mark("disabled"));
« no previous file with comments | « webrtc/modules/audio_coding/main/acm2/rent_a_codec.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698