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

Side by Side Diff: webrtc/modules/audio_coding/test/TestRedFec.cc

Issue 2388153004: Stop using old AudioCodingModule::RegisterReceiveCodec overloads (Closed)
Patch Set: Created 4 years, 2 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) 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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698