| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 defined(SUPPORT_RED_WB) | 336 defined(SUPPORT_RED_WB) |
| 337 // Switch to codec, RED should remain switched on. | 337 // Switch to codec, RED should remain switched on. |
| 338 EXPECT_TRUE(_acmA->REDStatus()); | 338 EXPECT_TRUE(_acmA->REDStatus()); |
| 339 #else | 339 #else |
| 340 EXPECT_FALSE(_acmA->REDStatus()); | 340 EXPECT_FALSE(_acmA->REDStatus()); |
| 341 #endif | 341 #endif |
| 342 | 342 |
| 343 // _channelA2B imposes 25% packet loss rate. | 343 // _channelA2B imposes 25% packet loss rate. |
| 344 _acmA->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) { | 344 _acmA->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) { |
| 345 EXPECT_TRUE(*encoder); | 345 EXPECT_TRUE(*encoder); |
| 346 (*encoder)->SetProjectedPacketLossRate(25.0f / 100.0f); | 346 (*encoder)->OnReceivedUplinkPacketLossFraction(25.0f / 100.0f); |
| 347 }); | 347 }); |
| 348 | 348 |
| 349 #ifdef SUPPORT_RED_FB | 349 #ifdef SUPPORT_RED_FB |
| 350 EXPECT_EQ(0, _acmA->SetREDStatus(true)); | 350 EXPECT_EQ(0, _acmA->SetREDStatus(true)); |
| 351 EXPECT_TRUE(_acmA->REDStatus()); | 351 EXPECT_TRUE(_acmA->REDStatus()); |
| 352 // Codec FEC and RED are mutually exclusive. | 352 // Codec FEC and RED are mutually exclusive. |
| 353 EXPECT_EQ(-1, _acmA->SetCodecFEC(true)); | 353 EXPECT_EQ(-1, _acmA->SetCodecFEC(true)); |
| 354 | 354 |
| 355 EXPECT_EQ(0, _acmA->SetREDStatus(false)); | 355 EXPECT_EQ(0, _acmA->SetREDStatus(false)); |
| 356 EXPECT_EQ(0, _acmA->SetCodecFEC(true)); | 356 EXPECT_EQ(0, _acmA->SetCodecFEC(true)); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 std::string file_name; | 475 std::string file_name; |
| 476 std::stringstream file_stream; | 476 std::stringstream file_stream; |
| 477 file_stream << webrtc::test::OutputPath(); | 477 file_stream << webrtc::test::OutputPath(); |
| 478 file_stream << "TestRedFec_outFile_"; | 478 file_stream << "TestRedFec_outFile_"; |
| 479 file_stream << test_number << ".pcm"; | 479 file_stream << test_number << ".pcm"; |
| 480 file_name = file_stream.str(); | 480 file_name = file_stream.str(); |
| 481 _outFileB.Open(file_name, 16000, "wb"); | 481 _outFileB.Open(file_name, 16000, "wb"); |
| 482 } | 482 } |
| 483 | 483 |
| 484 } // namespace webrtc | 484 } // namespace webrtc |
| OLD | NEW |