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

Side by Side Diff: webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl_unittest.cc

Issue 2334613002: Adding BitrateController to audio network adaptor. (Closed)
Patch Set: adding a TODO Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 10 matching lines...) Expand all
21 using ::testing::_; 21 using ::testing::_;
22 using ::testing::NiceMock; 22 using ::testing::NiceMock;
23 using ::testing::Return; 23 using ::testing::Return;
24 24
25 namespace { 25 namespace {
26 26
27 constexpr size_t kNumControllers = 2; 27 constexpr size_t kNumControllers = 2;
28 28
29 MATCHER_P(NetworkMetricsIs, metric, "") { 29 MATCHER_P(NetworkMetricsIs, metric, "") {
30 return arg.uplink_bandwidth_bps == metric.uplink_bandwidth_bps && 30 return arg.uplink_bandwidth_bps == metric.uplink_bandwidth_bps &&
31 arg.target_audio_bitrate_bps == metric.target_audio_bitrate_bps &&
31 arg.uplink_packet_loss_fraction == metric.uplink_packet_loss_fraction; 32 arg.uplink_packet_loss_fraction == metric.uplink_packet_loss_fraction;
32 } 33 }
33 34
34 MATCHER_P(ConstraintsReceiverFrameLengthRangeIs, frame_length_range, "") { 35 MATCHER_P(ConstraintsReceiverFrameLengthRangeIs, frame_length_range, "") {
35 return arg.receiver_frame_length_range->min_frame_length_ms == 36 return arg.receiver_frame_length_range->min_frame_length_ms ==
36 frame_length_range.min_frame_length_ms && 37 frame_length_range.min_frame_length_ms &&
37 arg.receiver_frame_length_range->max_frame_length_ms == 38 arg.receiver_frame_length_range->max_frame_length_ms ==
38 frame_length_range.max_frame_length_ms; 39 frame_length_range.max_frame_length_ms;
39 } 40 }
40 41
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 102
102 for (auto& mock_controller : states.mock_controllers) { 103 for (auto& mock_controller : states.mock_controllers) {
103 EXPECT_CALL(*mock_controller, 104 EXPECT_CALL(*mock_controller,
104 SetConstraints(ConstraintsReceiverFrameLengthRangeIs( 105 SetConstraints(ConstraintsReceiverFrameLengthRangeIs(
105 Controller::Constraints::FrameLengthRange(20, 120)))); 106 Controller::Constraints::FrameLengthRange(20, 120))));
106 } 107 }
107 states.audio_network_adaptor->SetReceiverFrameLengthRange(20, 120); 108 states.audio_network_adaptor->SetReceiverFrameLengthRange(20, 120);
108 } 109 }
109 110
110 } // namespace webrtc 111 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698