Index: webrtc/modules/audio_coding/audio_network_adaptor/fec_controller_plr_based_unittest.cc |
diff --git a/webrtc/modules/audio_coding/audio_network_adaptor/fec_controller_plr_based_unittest.cc b/webrtc/modules/audio_coding/audio_network_adaptor/fec_controller_plr_based_unittest.cc |
index 34f16c82729129061715d0f2280420517bf20f0d..f55a443107310110406d394a6fde27f1e896f349 100644 |
--- a/webrtc/modules/audio_coding/audio_network_adaptor/fec_controller_plr_based_unittest.cc |
+++ b/webrtc/modules/audio_coding/audio_network_adaptor/fec_controller_plr_based_unittest.cc |
@@ -56,14 +56,13 @@ FecControllerPlrBasedTestStates CreateFecControllerPlrBased( |
std::unique_ptr<MockSmoothingFilter> mock_smoothing_filter( |
new NiceMock<MockSmoothingFilter>()); |
states.packet_loss_smoother = mock_smoothing_filter.get(); |
- using Threshold = FecControllerPlrBased::Config::Threshold; |
states.controller.reset(new FecControllerPlrBased( |
FecControllerPlrBased::Config( |
initial_fec_enabled, |
- Threshold(kEnablingBandwidthLow, kEnablingPacketLossAtLowBw, |
- kEnablingBandwidthHigh, kEnablingPacketLossAtHighBw), |
- Threshold(kDisablingBandwidthLow, kDisablingPacketLossAtLowBw, |
- kDisablingBandwidthHigh, kDisablingPacketLossAtHighBw), |
+ ThresholdCurve(kEnablingBandwidthLow, kEnablingPacketLossAtLowBw, |
+ kEnablingBandwidthHigh, kEnablingPacketLossAtHighBw), |
+ ThresholdCurve(kDisablingBandwidthLow, kDisablingPacketLossAtLowBw, |
+ kDisablingBandwidthHigh, kDisablingPacketLossAtHighBw), |
0, nullptr), |
std::move(mock_smoothing_filter))); |
return states; |
@@ -313,14 +312,13 @@ TEST(FecControllerPlrBasedTest, CheckBehaviorOnSpecialCurves) { |
std::unique_ptr<MockSmoothingFilter> mock_smoothing_filter( |
new NiceMock<MockSmoothingFilter>()); |
states.packet_loss_smoother = mock_smoothing_filter.get(); |
- using Threshold = FecControllerPlrBased::Config::Threshold; |
states.controller.reset(new FecControllerPlrBased( |
FecControllerPlrBased::Config( |
true, |
- Threshold(kEnablingBandwidthLow, kEnablingPacketLossAtLowBw, |
- kEnablingBandwidthHigh, kEnablingPacketLossAtHighBw), |
- Threshold(kDisablingBandwidthLow, kDisablingPacketLossAtLowBw, |
- kDisablingBandwidthHigh, kDisablingPacketLossAtHighBw), |
+ ThresholdCurve(kEnablingBandwidthLow, kEnablingPacketLossAtLowBw, |
+ kEnablingBandwidthHigh, kEnablingPacketLossAtHighBw), |
+ ThresholdCurve(kDisablingBandwidthLow, kDisablingPacketLossAtLowBw, |
+ kDisablingBandwidthHigh, kDisablingPacketLossAtHighBw), |
0, nullptr), |
std::move(mock_smoothing_filter))); |
@@ -353,15 +351,16 @@ TEST(FecControllerPlrBasedDeathTest, InvalidConfig) { |
std::unique_ptr<MockSmoothingFilter> mock_smoothing_filter( |
new NiceMock<MockSmoothingFilter>()); |
states.packet_loss_smoother = mock_smoothing_filter.get(); |
- using Threshold = FecControllerPlrBased::Config::Threshold; |
EXPECT_DEATH( |
states.controller.reset(new FecControllerPlrBased( |
FecControllerPlrBased::Config( |
true, |
- Threshold(kDisablingBandwidthLow - 1, kEnablingPacketLossAtLowBw, |
- kEnablingBandwidthHigh, kEnablingPacketLossAtHighBw), |
- Threshold(kDisablingBandwidthLow, kDisablingPacketLossAtLowBw, |
- kDisablingBandwidthHigh, kDisablingPacketLossAtHighBw), |
+ ThresholdCurve(kDisablingBandwidthLow - 1, |
+ kEnablingPacketLossAtLowBw, kEnablingBandwidthHigh, |
+ kEnablingPacketLossAtHighBw), |
+ ThresholdCurve( |
+ kDisablingBandwidthLow, kDisablingPacketLossAtLowBw, |
+ kDisablingBandwidthHigh, kDisablingPacketLossAtHighBw), |
0, nullptr), |
std::move(mock_smoothing_filter))), |
"Check failed"); |