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

Unified Diff: webrtc/modules/audio_coding/test/APITest.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/APITest.cc
diff --git a/webrtc/modules/audio_coding/test/APITest.cc b/webrtc/modules/audio_coding/test/APITest.cc
index 717de82ff6d3b6bc59aef96ad513331caa510e82..a5b760e5f657020da7379bd95ec36df0a6e08537 100644
--- a/webrtc/modules/audio_coding/test/APITest.cc
+++ b/webrtc/modules/audio_coding/test/APITest.cc
@@ -141,7 +141,8 @@ int16_t APITest::SetUp() {
// Check registration with an already occupied payload type
int currentPayloadType = dummyCodec.pltype;
dummyCodec.pltype = 97; //lastPayloadType;
- CHECK_ERROR(_acmB->RegisterReceiveCodec(dummyCodec));
+ EXPECT_EQ(true, _acmB->RegisterReceiveCodec(dummyCodec.pltype,
ossu 2016/10/05 13:39:58 Come to think of it, would it make sense to have t
kwiberg-webrtc 2016/10/06 12:14:52 That would make sense if we were planning to keep
+ CodecInstToSdp(dummyCodec)));
dummyCodec.pltype = currentPayloadType;
}
@@ -152,7 +153,8 @@ int16_t APITest::SetUp() {
AudioCodingModule::Codec(n + 1, &nextCodec);
dummyCodec.pltype = nextCodec.pltype;
if (!FixedPayloadTypeCodec(nextCodec.plname)) {
- _acmB->RegisterReceiveCodec(dummyCodec);
+ _acmB->RegisterReceiveCodec(dummyCodec.pltype,
+ CodecInstToSdp(dummyCodec));
}
dummyCodec.pltype = currentPayloadType;
}
@@ -163,14 +165,17 @@ int16_t APITest::SetUp() {
AudioCodingModule::Codec(n + 1, &nextCodec);
nextCodec.pltype = dummyCodec.pltype;
if (!FixedPayloadTypeCodec(nextCodec.plname)) {
- CHECK_ERROR_MT(_acmA->RegisterReceiveCodec(nextCodec));
+ EXPECT_EQ(true, _acmA->RegisterReceiveCodec(nextCodec.pltype,
+ CodecInstToSdp(nextCodec)));
CHECK_ERROR_MT(_acmA->UnregisterReceiveCodec(nextCodec.pltype));
}
}
- CHECK_ERROR_MT(_acmA->RegisterReceiveCodec(dummyCodec));
+ EXPECT_EQ(true, _acmA->RegisterReceiveCodec(dummyCodec.pltype,
+ CodecInstToSdp(dummyCodec)));
printf(" side A done!");
- CHECK_ERROR_MT(_acmB->RegisterReceiveCodec(dummyCodec));
+ EXPECT_EQ(true, _acmB->RegisterReceiveCodec(dummyCodec.pltype,
+ CodecInstToSdp(dummyCodec)));
printf(" side B done!\n");
if (!strcmp(dummyCodec.plname, "CN")) {
@@ -871,7 +876,8 @@ void APITest::TestRegisteration(char sendSide) {
"Register receive codec with default Payload, AUDIO BACK.\n");
fflush (stdout);
}
- CHECK_ERROR_MT(receiveACM->RegisterReceiveCodec(*myCodec));
+ EXPECT_EQ(true, receiveACM->RegisterReceiveCodec(
+ myCodec->pltype, CodecInstToSdp(*myCodec)));
//CHECK_ERROR_MT(sendACM->RegisterSendCodec(*myCodec));
myEvent->Wait(20);
{
@@ -884,7 +890,8 @@ void APITest::TestRegisteration(char sendSide) {
}
}
if (i == 32) {
- CHECK_ERROR_MT(receiveACM->RegisterReceiveCodec(*myCodec));
+ EXPECT_EQ(true, receiveACM->RegisterReceiveCodec(
+ myCodec->pltype, CodecInstToSdp(*myCodec)));
{
WriteLockScoped wl(_apiTestRWLock);
*thereIsDecoder = true;
@@ -896,7 +903,8 @@ void APITest::TestRegisteration(char sendSide) {
"Register receive codec with fixed Payload, AUDIO BACK.\n");
fflush (stdout);
}
- CHECK_ERROR_MT(receiveACM->RegisterReceiveCodec(*myCodec));
+ EXPECT_EQ(true, receiveACM->RegisterReceiveCodec(myCodec->pltype,
+ CodecInstToSdp(*myCodec)));
//CHECK_ERROR_MT(receiveACM->UnregisterReceiveCodec(myCodec->pltype));
//CHECK_ERROR_MT(receiveACM->RegisterReceiveCodec(*myCodec));
myEvent->Wait(20);

Powered by Google App Engine
This is Rietveld 408576698