Chromium Code Reviews

Unified Diff: webrtc/modules/audio_coding/test/TestStereo.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.
Jump to:
View side-by-side diff with in-line comments
Index: webrtc/modules/audio_coding/test/TestStereo.cc
diff --git a/webrtc/modules/audio_coding/test/TestStereo.cc b/webrtc/modules/audio_coding/test/TestStereo.cc
index abc61796eeb91d00f1eae4a92c64d495f07b64f1..7a37bb6a216a15f644deafd149a5d6b2d9ddca38 100644
--- a/webrtc/modules/audio_coding/test/TestStereo.cc
+++ b/webrtc/modules/audio_coding/test/TestStereo.cc
@@ -171,7 +171,8 @@ void TestStereo::Perform() {
CodecInst my_codec_param;
for (uint8_t n = 0; n < num_encoders; n++) {
EXPECT_EQ(0, acm_b_->Codec(n, &my_codec_param));
- EXPECT_EQ(0, acm_b_->RegisterReceiveCodec(my_codec_param));
+ EXPECT_EQ(true, acm_b_->RegisterReceiveCodec(
+ my_codec_param.pltype, CodecInstToSdp(my_codec_param)));
}
// Test that unregister all receive codecs works.
@@ -183,7 +184,8 @@ void TestStereo::Perform() {
// Register all available codes as receiving codecs once more.
for (uint8_t n = 0; n < num_encoders; n++) {
EXPECT_EQ(0, acm_b_->Codec(n, &my_codec_param));
- EXPECT_EQ(0, acm_b_->RegisterReceiveCodec(my_codec_param));
+ EXPECT_EQ(true, acm_b_->RegisterReceiveCodec(
+ my_codec_param.pltype, CodecInstToSdp(my_codec_param)));
}
// Create and connect the channel.
@@ -597,7 +599,9 @@ void TestStereo::Perform() {
EXPECT_EQ(0, acm_b_->Codec(n, &opus_codec_param));
if (!strcmp(opus_codec_param.plname, "opus")) {
opus_codec_param.channels = 1;
- EXPECT_EQ(0, acm_b_->RegisterReceiveCodec(opus_codec_param));
+ EXPECT_EQ(true,
+ acm_b_->RegisterReceiveCodec(opus_codec_param.pltype,
+ CodecInstToSdp(opus_codec_param)));
break;
}
}
@@ -630,7 +634,9 @@ void TestStereo::Perform() {
" Decode: stereo\n", test_cntr_);
}
opus_codec_param.channels = 2;
- EXPECT_EQ(0, acm_b_->RegisterReceiveCodec(opus_codec_param));
+ EXPECT_EQ(true,
+ acm_b_->RegisterReceiveCodec(opus_codec_param.pltype,
+ CodecInstToSdp(opus_codec_param)));
Run(channel_a2b_, audio_channels, 2);
out_file_.Close();
// Decode in mono.
@@ -642,7 +648,9 @@ void TestStereo::Perform() {
" Decode: mono\n", test_cntr_);
}
opus_codec_param.channels = 1;
- EXPECT_EQ(0, acm_b_->RegisterReceiveCodec(opus_codec_param));
+ EXPECT_EQ(true,
+ acm_b_->RegisterReceiveCodec(opus_codec_param.pltype,
+ CodecInstToSdp(opus_codec_param)));
Run(channel_a2b_, audio_channels, codec_channels);
out_file_.Close();

Powered by Google App Engine