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

Unified Diff: webrtc/audio/audio_send_stream_unittest.cc

Issue 2536753002: Relanding "Pass time constant to bwe smoothing filter." (Closed)
Patch Set: rebasing 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/audio/audio_send_stream.cc ('k') | webrtc/call/bitrate_allocator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/audio/audio_send_stream_unittest.cc
diff --git a/webrtc/audio/audio_send_stream_unittest.cc b/webrtc/audio/audio_send_stream_unittest.cc
index 496a871d85de84735c89a3cff3e88eb6f1223fd9..55e234f940b8aa0538eb39e88d2f0ea78ad68c86 100644
--- a/webrtc/audio/audio_send_stream_unittest.cc
+++ b/webrtc/audio/audio_send_stream_unittest.cc
@@ -106,6 +106,8 @@ struct ConfigHelper {
// Use ISAC as default codec so as to prevent unnecessary |voice_engine_|
// calls from the default ctor behavior.
stream_config_.send_codec_spec.codec_inst = kIsacCodec;
+ stream_config_.min_bitrate_bps = 10000;
+ stream_config_.max_bitrate_bps = 65000;
}
AudioSendStream::Config& config() { return stream_config_; }
@@ -403,5 +405,27 @@ TEST(AudioSendStreamTest, SendCodecCanApplyVad) {
helper.bitrate_allocator(), helper.event_log());
}
+TEST(AudioSendStreamTest, DoesNotPassHigherBitrateThanMaxBitrate) {
+ ConfigHelper helper;
+ internal::AudioSendStream send_stream(
+ helper.config(), helper.audio_state(), helper.worker_queue(),
+ helper.packet_router(), helper.congestion_controller(),
+ helper.bitrate_allocator(), helper.event_log());
+ EXPECT_CALL(*helper.channel_proxy(),
+ SetBitrate(helper.config().max_bitrate_bps, _));
+ send_stream.OnBitrateUpdated(helper.config().max_bitrate_bps + 5000, 0.0, 50,
+ 6000);
+}
+
+TEST(AudioSendStreamTest, ProbingIntervalOnBitrateUpdated) {
+ ConfigHelper helper;
+ internal::AudioSendStream send_stream(
+ helper.config(), helper.audio_state(), helper.worker_queue(),
+ helper.packet_router(), helper.congestion_controller(),
+ helper.bitrate_allocator(), helper.event_log());
+ EXPECT_CALL(*helper.channel_proxy(), SetBitrate(_, 5000));
+ send_stream.OnBitrateUpdated(50000, 0.0, 50, 5000);
+}
+
} // namespace test
} // namespace webrtc
« no previous file with comments | « webrtc/audio/audio_send_stream.cc ('k') | webrtc/call/bitrate_allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698