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 572a08c21e60fd71b389ca6cb728d5336faa3d21..57b7a54c8772c771364b7116d128cc2c64a3562b 100644 |
--- a/webrtc/modules/audio_coding/test/TestStereo.cc |
+++ b/webrtc/modules/audio_coding/test/TestStereo.cc |
@@ -15,6 +15,7 @@ |
#include <string> |
#include "webrtc/common_types.h" |
+#include "webrtc/modules/audio_coding/codecs/audio_format_conversion.h" |
#include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h" |
#include "webrtc/modules/audio_coding/test/utility.h" |
#include "webrtc/system_wrappers/include/trace.h" |
@@ -171,7 +172,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 +185,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 +600,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 +635,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 +649,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(); |