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

Side by Side Diff: webrtc/audio/audio_send_stream_unittest.cc

Issue 2546493002: Update smoothed bitrate. (Closed)
Patch Set: Check if AdaptCodec runs on worker queue. 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 } 412 }
413 413
414 TEST(AudioSendStreamTest, DoesNotPassHigherBitrateThanMaxBitrate) { 414 TEST(AudioSendStreamTest, DoesNotPassHigherBitrateThanMaxBitrate) {
415 ConfigHelper helper; 415 ConfigHelper helper;
416 internal::AudioSendStream send_stream( 416 internal::AudioSendStream send_stream(
417 helper.config(), helper.audio_state(), helper.worker_queue(), 417 helper.config(), helper.audio_state(), helper.worker_queue(),
418 helper.packet_router(), helper.congestion_controller(), 418 helper.packet_router(), helper.congestion_controller(),
419 helper.bitrate_allocator(), helper.event_log(), helper.rtcp_rtt_stats()); 419 helper.bitrate_allocator(), helper.event_log(), helper.rtcp_rtt_stats());
420 EXPECT_CALL(*helper.channel_proxy(), 420 EXPECT_CALL(*helper.channel_proxy(),
421 SetBitrate(helper.config().max_bitrate_bps, _)); 421 SetBitrate(helper.config().max_bitrate_bps, _));
422 EXPECT_CALL(*helper.channel_proxy(), AdaptCodec());
422 send_stream.OnBitrateUpdated(helper.config().max_bitrate_bps + 5000, 0.0, 50, 423 send_stream.OnBitrateUpdated(helper.config().max_bitrate_bps + 5000, 0.0, 50,
423 6000); 424 6000);
424 } 425 }
425 426
426 TEST(AudioSendStreamTest, ProbingIntervalOnBitrateUpdated) { 427 TEST(AudioSendStreamTest, ProbingIntervalOnBitrateUpdated) {
427 ConfigHelper helper; 428 ConfigHelper helper;
428 internal::AudioSendStream send_stream( 429 internal::AudioSendStream send_stream(
429 helper.config(), helper.audio_state(), helper.worker_queue(), 430 helper.config(), helper.audio_state(), helper.worker_queue(),
430 helper.packet_router(), helper.congestion_controller(), 431 helper.packet_router(), helper.congestion_controller(),
431 helper.bitrate_allocator(), helper.event_log(), helper.rtcp_rtt_stats()); 432 helper.bitrate_allocator(), helper.event_log(), helper.rtcp_rtt_stats());
432 EXPECT_CALL(*helper.channel_proxy(), SetBitrate(_, 5000)); 433 EXPECT_CALL(*helper.channel_proxy(), SetBitrate(_, 5000));
434 EXPECT_CALL(*helper.channel_proxy(), AdaptCodec());
433 send_stream.OnBitrateUpdated(50000, 0.0, 50, 5000); 435 send_stream.OnBitrateUpdated(50000, 0.0, 50, 5000);
434 } 436 }
435 437
436 } // namespace test 438 } // namespace test
437 } // namespace webrtc 439 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698