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

Unified Diff: webrtc/modules/audio_coding/test/TwoWayCommunication.cc

Issue 2388153004: Stop using old AudioCodingModule::RegisterReceiveCodec overloads (Closed)
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/test/TwoWayCommunication.cc
diff --git a/webrtc/modules/audio_coding/test/TwoWayCommunication.cc b/webrtc/modules/audio_coding/test/TwoWayCommunication.cc
index ca2a2124ae3136aa12d507bb38013d491d91c606..7f2af7d716a3a27a715d143c647682ab4fcb79ea 100644
--- a/webrtc/modules/audio_coding/test/TwoWayCommunication.cc
+++ b/webrtc/modules/audio_coding/test/TwoWayCommunication.cc
@@ -21,6 +21,7 @@
#endif
#include "webrtc/common_types.h"
+#include "webrtc/modules/audio_coding/codecs/audio_format_conversion.h"
#include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h"
#include "webrtc/modules/audio_coding/test/PCMFile.h"
#include "webrtc/modules/audio_coding/test/utility.h"
@@ -97,18 +98,22 @@ void TwoWayCommunication::SetUp() {
//--- Set A codecs
EXPECT_EQ(0, _acmA->RegisterSendCodec(codecInst_A));
- EXPECT_EQ(0, _acmA->RegisterReceiveCodec(codecInst_B));
+ EXPECT_EQ(true, _acmA->RegisterReceiveCodec(codecInst_B.pltype,
+ CodecInstToSdp(codecInst_B)));
//--- Set ref-A codecs
EXPECT_EQ(0, _acmRefA->RegisterSendCodec(codecInst_A));
- EXPECT_EQ(0, _acmRefA->RegisterReceiveCodec(codecInst_B));
+ EXPECT_EQ(true, _acmRefA->RegisterReceiveCodec(codecInst_B.pltype,
+ CodecInstToSdp(codecInst_B)));
//--- Set B codecs
EXPECT_EQ(0, _acmB->RegisterSendCodec(codecInst_B));
- EXPECT_EQ(0, _acmB->RegisterReceiveCodec(codecInst_A));
+ EXPECT_EQ(true, _acmB->RegisterReceiveCodec(codecInst_A.pltype,
+ CodecInstToSdp(codecInst_A)));
//--- Set ref-B codecs
EXPECT_EQ(0, _acmRefB->RegisterSendCodec(codecInst_B));
- EXPECT_EQ(0, _acmRefB->RegisterReceiveCodec(codecInst_A));
+ EXPECT_EQ(true, _acmRefB->RegisterReceiveCodec(codecInst_A.pltype,
+ CodecInstToSdp(codecInst_A)));
uint16_t frequencyHz;
@@ -174,19 +179,23 @@ void TwoWayCommunication::SetUpAutotest() {
//--- Set A codecs
EXPECT_EQ(0, _acmA->RegisterSendCodec(codecInst_A));
- EXPECT_EQ(0, _acmA->RegisterReceiveCodec(codecInst_B));
+ EXPECT_EQ(true, _acmA->RegisterReceiveCodec(codecInst_B.pltype,
+ CodecInstToSdp(codecInst_B)));
//--- Set ref-A codecs
EXPECT_GT(_acmRefA->RegisterSendCodec(codecInst_A), -1);
- EXPECT_GT(_acmRefA->RegisterReceiveCodec(codecInst_B), -1);
+ EXPECT_EQ(true, _acmRefA->RegisterReceiveCodec(codecInst_B.pltype,
+ CodecInstToSdp(codecInst_B)));
//--- Set B codecs
EXPECT_GT(_acmB->RegisterSendCodec(codecInst_B), -1);
- EXPECT_GT(_acmB->RegisterReceiveCodec(codecInst_A), -1);
+ EXPECT_EQ(true, _acmB->RegisterReceiveCodec(codecInst_A.pltype,
+ CodecInstToSdp(codecInst_A)));
//--- Set ref-B codecs
EXPECT_EQ(0, _acmRefB->RegisterSendCodec(codecInst_B));
- EXPECT_EQ(0, _acmRefB->RegisterReceiveCodec(codecInst_A));
+ EXPECT_EQ(true, _acmRefB->RegisterReceiveCodec(codecInst_A.pltype,
+ CodecInstToSdp(codecInst_A)));
uint16_t frequencyHz;
@@ -292,7 +301,8 @@ void TwoWayCommunication::Perform() {
EXPECT_EQ(0, _acmA->InitializeReceiver());
// Re-register codec on side A.
if (((secPassed % 7) == 6) && (msecPassed >= 990)) {
- EXPECT_EQ(0, _acmA->RegisterReceiveCodec(*codecInst_B));
+ EXPECT_EQ(true, _acmA->RegisterReceiveCodec(
+ codecInst_B->pltype, CodecInstToSdp(*codecInst_B)));
}
}
}

Powered by Google App Engine
This is Rietveld 408576698