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 1d4fc2e7813c9c3b2eee1bc6596be2ace20e47f6..ab307ac59efd6636590b9dbbfa1e4e47be5664a3 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 |
@@ -182,6 +182,16 @@ TEST(AudioEncoderOpusTest, ToggleDtx) { |
EXPECT_TRUE(states.encoder->SetDtx(false)); |
} |
+TEST(AudioEncoderOpusTest, ToggleCbr) { |
+ auto states = CreateCodec(2); |
+ // Enable CBR |
+ EXPECT_TRUE(states.encoder->SetCbr(true)); |
+ // Verify that the mode is still kAudio. |
+ EXPECT_EQ(AudioEncoderOpus::kAudio, states.encoder->application()); |
minyue-webrtc
2017/03/30 20:36:17
please don't check application here, (see above co
|
+ // Turn off CBR. |
+ EXPECT_TRUE(states.encoder->SetCbr(false)); |
+} |
+ |
TEST(AudioEncoderOpusTest, |
OnReceivedUplinkBandwidthWithoutAudioNetworkAdaptor) { |
auto states = CreateCodec(1); |