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

Unified Diff: webrtc/modules/audio_coding/main/test/iSACTest.cc

Issue 1406123011: Let AudioCodingModule::SendCodec return Maybe<CodecInst> (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: review fix Created 5 years, 1 month 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
« no previous file with comments | « webrtc/modules/audio_coding/main/test/TwoWayCommunication.cc ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/main/test/iSACTest.cc
diff --git a/webrtc/modules/audio_coding/main/test/iSACTest.cc b/webrtc/modules/audio_coding/main/test/iSACTest.cc
index 35c34d5947b8eb850d0cddff5cc96feb534e2d91..203e12b6a23f3ca344aeb0307ed282392b9e9abc 100644
--- a/webrtc/modules/audio_coding/main/test/iSACTest.cc
+++ b/webrtc/modules/audio_coding/main/test/iSACTest.cc
@@ -47,21 +47,21 @@ int16_t SetISAConfig(ACMTestISACConfig& isacConfig, AudioCodingModule* acm,
if ((isacConfig.currentRateBitPerSec != 0)
|| (isacConfig.currentFrameSizeMsec != 0)) {
- CodecInst sendCodec;
- EXPECT_EQ(0, acm->SendCodec(&sendCodec));
+ auto sendCodec = acm->SendCodec();
+ EXPECT_TRUE(sendCodec);
if (isacConfig.currentRateBitPerSec < 0) {
// Register iSAC in adaptive (channel-dependent) mode.
- sendCodec.rate = -1;
- EXPECT_EQ(0, acm->RegisterSendCodec(sendCodec));
+ sendCodec->rate = -1;
+ EXPECT_EQ(0, acm->RegisterSendCodec(*sendCodec));
} else {
if (isacConfig.currentRateBitPerSec != 0) {
- sendCodec.rate = isacConfig.currentRateBitPerSec;
+ sendCodec->rate = isacConfig.currentRateBitPerSec;
}
if (isacConfig.currentFrameSizeMsec != 0) {
- sendCodec.pacsize = isacConfig.currentFrameSizeMsec
- * (sendCodec.plfreq / 1000);
+ sendCodec->pacsize = isacConfig.currentFrameSizeMsec
+ * (sendCodec->plfreq / 1000);
}
- EXPECT_EQ(0, acm->RegisterSendCodec(sendCodec));
+ EXPECT_EQ(0, acm->RegisterSendCodec(*sendCodec));
}
}
@@ -238,7 +238,6 @@ void ISACTest::EncodeDecode(int testNr, ACMTestISACConfig& wbISACConfig,
_channel_B2A->ResetStats();
char currentTime[500];
- CodecInst sendCodec;
EventTimerWrapper* myEvent = EventTimerWrapper::Create();
EXPECT_TRUE(myEvent->StartTimer(true, 10));
while (!(_inFileA.EndOfFile() || _inFileA.Rewinded())) {
@@ -248,8 +247,8 @@ void ISACTest::EncodeDecode(int testNr, ACMTestISACConfig& wbISACConfig,
if ((adaptiveMode) && (_testMode != 0)) {
myEvent->Wait(5000);
- EXPECT_EQ(0, _acmA->SendCodec(&sendCodec));
- EXPECT_EQ(0, _acmB->SendCodec(&sendCodec));
+ EXPECT_TRUE(_acmA->SendCodec());
+ EXPECT_TRUE(_acmB->SendCodec());
}
}
« no previous file with comments | « webrtc/modules/audio_coding/main/test/TwoWayCommunication.cc ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698