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

Side by Side Diff: webrtc/modules/audio_coding/audio_network_adaptor/fec_controller_rplr_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) 2017 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2017 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 GetRandomProbabilityOrUnknown(), 111 GetRandomProbabilityOrUnknown(),
112 uplink_recoveralbe_packet_loss); 112 uplink_recoveralbe_packet_loss);
113 } 113 }
114 114
115 // Checks that the FEC decision and |uplink_packet_loss_fraction| given by 115 // Checks that the FEC decision and |uplink_packet_loss_fraction| given by
116 // |states->controller->MakeDecision| matches |expected_enable_fec| and 116 // |states->controller->MakeDecision| matches |expected_enable_fec| and
117 // |expected_uplink_packet_loss_fraction|, respectively. 117 // |expected_uplink_packet_loss_fraction|, respectively.
118 void CheckDecision(FecControllerRplrBased* controller, 118 void CheckDecision(FecControllerRplrBased* controller,
119 bool expected_enable_fec, 119 bool expected_enable_fec,
120 float expected_uplink_packet_loss_fraction) { 120 float expected_uplink_packet_loss_fraction) {
121 AudioNetworkAdaptor::EncoderRuntimeConfig config; 121 AudioEncoderRuntimeConfig config;
122 controller->MakeDecision(&config); 122 controller->MakeDecision(&config);
123 123
124 // Less compact than comparing optionals, but yields more readable errors. 124 // Less compact than comparing optionals, but yields more readable errors.
125 EXPECT_TRUE(config.enable_fec); 125 EXPECT_TRUE(config.enable_fec);
126 if (config.enable_fec) { 126 if (config.enable_fec) {
127 EXPECT_EQ(expected_enable_fec, *config.enable_fec); 127 EXPECT_EQ(expected_enable_fec, *config.enable_fec);
128 } 128 }
129 EXPECT_TRUE(config.uplink_packet_loss_fraction); 129 EXPECT_TRUE(config.uplink_packet_loss_fraction);
130 if (config.uplink_packet_loss_fraction) { 130 if (config.uplink_packet_loss_fraction) {
131 EXPECT_EQ(expected_uplink_packet_loss_fraction, 131 EXPECT_EQ(expected_uplink_packet_loss_fraction,
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 kEnablingBandwidthHigh, kEnablingRecoverablePacketLossAtHighBw), 414 kEnablingBandwidthHigh, kEnablingRecoverablePacketLossAtHighBw),
415 Threshold( 415 Threshold(
416 kDisablingBandwidthLow, kDisablingRecoverablePacketLossAtLowBw, 416 kDisablingBandwidthLow, kDisablingRecoverablePacketLossAtLowBw,
417 kDisablingBandwidthHigh, kDisablingRecoverablePacketLossAtHighBw), 417 kDisablingBandwidthHigh, kDisablingRecoverablePacketLossAtHighBw),
418 0, nullptr)), 418 0, nullptr)),
419 "Check failed"); 419 "Check failed");
420 } 420 }
421 #endif 421 #endif
422 422
423 } // namespace webrtc 423 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698