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

Unified Diff: webrtc/modules/audio_coding/main/test/TwoWayCommunication.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
Index: webrtc/modules/audio_coding/main/test/TwoWayCommunication.cc
diff --git a/webrtc/modules/audio_coding/main/test/TwoWayCommunication.cc b/webrtc/modules/audio_coding/main/test/TwoWayCommunication.cc
index 2ff2a85afe82679a613581c2944f250d6c2ed865..725cbf74d720fd40bab5b02c7e3b0d57f1821241 100644
--- a/webrtc/modules/audio_coding/main/test/TwoWayCommunication.cc
+++ b/webrtc/modules/audio_coding/main/test/TwoWayCommunication.cc
@@ -250,10 +250,8 @@ void TwoWayCommunication::Perform() {
AudioFrame audioFrame;
- CodecInst codecInst_B;
- CodecInst dummy;
-
- EXPECT_EQ(0, _acmB->SendCodec(&codecInst_B));
+ auto codecInst_B = _acmB->SendCodec();
+ ASSERT_TRUE(codecInst_B);
// In the following loop we tests that the code can handle misuse of the APIs.
// In the middle of a session with data flowing between two sides, called A
@@ -285,15 +283,15 @@ void TwoWayCommunication::Perform() {
}
// Re-register send codec on side B.
if (((secPassed % 5) == 4) && (msecPassed >= 990)) {
- EXPECT_EQ(0, _acmB->RegisterSendCodec(codecInst_B));
- EXPECT_EQ(0, _acmB->SendCodec(&dummy));
+ EXPECT_EQ(0, _acmB->RegisterSendCodec(*codecInst_B));
+ EXPECT_TRUE(_acmB->SendCodec());
}
// Initialize receiver on side A.
if (((secPassed % 7) == 6) && (msecPassed == 0))
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(0, _acmA->RegisterReceiveCodec(*codecInst_B));
}
}
}
« no previous file with comments | « webrtc/modules/audio_coding/main/test/TestVADDTX.cc ('k') | webrtc/modules/audio_coding/main/test/iSACTest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698