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

Unified Diff: webrtc/modules/audio_coding/test/TwoWayCommunication.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 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 9c26a32c91b9f7b6ecb30f4317d972bca9e770f3..52ac5074ac628cce60e609a13e1fd1bb3394861a 100644
--- a/webrtc/modules/audio_coding/test/TwoWayCommunication.cc
+++ b/webrtc/modules/audio_coding/test/TwoWayCommunication.cc
@@ -97,18 +97,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 +178,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 +300,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