| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 ASSERT_EQ(0, _acmB->InitializeReceiver()); | 70 ASSERT_EQ(0, _acmB->InitializeReceiver()); |
| 71 | 71 |
| 72 uint8_t numEncoders = _acmA->NumberOfCodecs(); | 72 uint8_t numEncoders = _acmA->NumberOfCodecs(); |
| 73 CodecInst myCodecParam; | 73 CodecInst myCodecParam; |
| 74 for (uint8_t n = 0; n < numEncoders; n++) { | 74 for (uint8_t n = 0; n < numEncoders; n++) { |
| 75 EXPECT_EQ(0, _acmB->Codec(n, &myCodecParam)); | 75 EXPECT_EQ(0, _acmB->Codec(n, &myCodecParam)); |
| 76 // Default number of channels is 2 for opus, so we change to 1 in this test. | 76 // Default number of channels is 2 for opus, so we change to 1 in this test. |
| 77 if (!strcmp(myCodecParam.plname, "opus")) { | 77 if (!strcmp(myCodecParam.plname, "opus")) { |
| 78 myCodecParam.channels = 1; | 78 myCodecParam.channels = 1; |
| 79 } | 79 } |
| 80 EXPECT_EQ(0, _acmB->RegisterReceiveCodec(myCodecParam)); | 80 EXPECT_EQ(true, _acmB->RegisterReceiveCodec(myCodecParam.pltype, |
| 81 CodecInstToSdp(myCodecParam))); |
| 81 } | 82 } |
| 82 | 83 |
| 83 // Create and connect the channel | 84 // Create and connect the channel |
| 84 _channelA2B = new Channel; | 85 _channelA2B = new Channel; |
| 85 _acmA->RegisterTransportCallback(_channelA2B); | 86 _acmA->RegisterTransportCallback(_channelA2B); |
| 86 _channelA2B->RegisterReceiverACM(_acmB.get()); | 87 _channelA2B->RegisterReceiverACM(_acmB.get()); |
| 87 | 88 |
| 88 EXPECT_EQ(0, RegisterSendCodec('A', kNameL16, 8000)); | 89 EXPECT_EQ(0, RegisterSendCodec('A', kNameL16, 8000)); |
| 89 EXPECT_EQ(0, RegisterSendCodec('A', kNameCN, 8000)); | 90 EXPECT_EQ(0, RegisterSendCodec('A', kNameCN, 8000)); |
| 90 EXPECT_EQ(0, RegisterSendCodec('A', kNameRED)); | 91 EXPECT_EQ(0, RegisterSendCodec('A', kNameRED)); |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 std::string file_name; | 473 std::string file_name; |
| 473 std::stringstream file_stream; | 474 std::stringstream file_stream; |
| 474 file_stream << webrtc::test::OutputPath(); | 475 file_stream << webrtc::test::OutputPath(); |
| 475 file_stream << "TestRedFec_outFile_"; | 476 file_stream << "TestRedFec_outFile_"; |
| 476 file_stream << test_number << ".pcm"; | 477 file_stream << test_number << ".pcm"; |
| 477 file_name = file_stream.str(); | 478 file_name = file_stream.str(); |
| 478 _outFileB.Open(file_name, 16000, "wb"); | 479 _outFileB.Open(file_name, 16000, "wb"); |
| 479 } | 480 } |
| 480 | 481 |
| 481 } // namespace webrtc | 482 } // namespace webrtc |
| OLD | NEW |