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

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

Issue 2745473003: Resolve cyclic dependency between audio network adaptor and event log api (Closed)
Patch Set: Revert "Activated checks for rtc_event_log_api" Created 3 years, 8 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 .WillOnce(Return(rtc::Optional<float>(*uplink_packet_loss))); 90 .WillOnce(Return(rtc::Optional<float>(*uplink_packet_loss)));
91 } 91 }
92 } 92 }
93 93
94 // Checks that the FEC decision and |uplink_packet_loss_fraction| given by 94 // Checks that the FEC decision and |uplink_packet_loss_fraction| given by
95 // |states->controller->MakeDecision| matches |expected_enable_fec| and 95 // |states->controller->MakeDecision| matches |expected_enable_fec| and
96 // |expected_uplink_packet_loss_fraction|, respectively. 96 // |expected_uplink_packet_loss_fraction|, respectively.
97 void CheckDecision(FecControllerPlrBasedTestStates* states, 97 void CheckDecision(FecControllerPlrBasedTestStates* states,
98 bool expected_enable_fec, 98 bool expected_enable_fec,
99 float expected_uplink_packet_loss_fraction) { 99 float expected_uplink_packet_loss_fraction) {
100 AudioNetworkAdaptor::EncoderRuntimeConfig config; 100 AudioEncoderRuntimeConfig config;
101 states->controller->MakeDecision(&config); 101 states->controller->MakeDecision(&config);
102 EXPECT_EQ(rtc::Optional<bool>(expected_enable_fec), config.enable_fec); 102 EXPECT_EQ(rtc::Optional<bool>(expected_enable_fec), config.enable_fec);
103 EXPECT_EQ(rtc::Optional<float>(expected_uplink_packet_loss_fraction), 103 EXPECT_EQ(rtc::Optional<float>(expected_uplink_packet_loss_fraction),
104 config.uplink_packet_loss_fraction); 104 config.uplink_packet_loss_fraction);
105 } 105 }
106 106
107 } // namespace 107 } // namespace
108 108
109 TEST(FecControllerPlrBasedTest, OutputInitValueWhenUplinkBandwidthUnknown) { 109 TEST(FecControllerPlrBasedTest, OutputInitValueWhenUplinkBandwidthUnknown) {
110 constexpr bool kInitialFecEnabled = true; 110 constexpr bool kInitialFecEnabled = true;
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 kEnablingBandwidthHigh, kEnablingPacketLossAtHighBw), 362 kEnablingBandwidthHigh, kEnablingPacketLossAtHighBw),
363 Threshold(kDisablingBandwidthLow, kDisablingPacketLossAtLowBw, 363 Threshold(kDisablingBandwidthLow, kDisablingPacketLossAtLowBw,
364 kDisablingBandwidthHigh, kDisablingPacketLossAtHighBw), 364 kDisablingBandwidthHigh, kDisablingPacketLossAtHighBw),
365 0, nullptr), 365 0, nullptr),
366 std::move(mock_smoothing_filter))), 366 std::move(mock_smoothing_filter))),
367 "Check failed"); 367 "Check failed");
368 } 368 }
369 #endif 369 #endif
370 370
371 } // namespace webrtc 371 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698