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

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

Issue 1368843003: Don't link with audio codecs that we don't use (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add comment Created 5 years, 3 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/main/test/TestRedFec.cc
diff --git a/webrtc/modules/audio_coding/main/test/TestRedFec.cc b/webrtc/modules/audio_coding/main/test/TestRedFec.cc
index a48b2ebdfec97d24a8f8c24537de6aa8f50ed576..7a512b443337a899709e6ead4eaa42c858b8d7bd 100644
--- a/webrtc/modules/audio_coding/main/test/TestRedFec.cc
+++ b/webrtc/modules/audio_coding/main/test/TestRedFec.cc
@@ -37,11 +37,15 @@ namespace webrtc {
namespace {
const char kNameL16[] = "L16";
const char kNamePCMU[] = "PCMU";
+ const char kNameCN[] = "CN";
+ const char kNameRED[] = "RED";
+
+ // These three are only used by code #ifdeffed on WEBRTC_CODEC_G722.
+#ifdef WEBRTC_CODEC_G722
const char kNameISAC[] = "ISAC";
const char kNameG722[] = "G722";
const char kNameOPUS[] = "opus";
- const char kNameCN[] = "CN";
- const char kNameRED[] = "RED";
+#endif
}
TestRedFec::TestRedFec()
@@ -104,7 +108,7 @@ void TestRedFec::Perform() {
EXPECT_TRUE(false);
printf("G722 needs to be activated to run this test\n");
return;
-#endif
+#else
EXPECT_EQ(0, RegisterSendCodec('A', kNameG722, 16000));
EXPECT_EQ(0, RegisterSendCodec('A', kNameCN, 16000));
@@ -408,6 +412,8 @@ void TestRedFec::Perform() {
EXPECT_FALSE(_acmA->REDStatus());
EXPECT_EQ(0, _acmA->SetCodecFEC(false));
EXPECT_FALSE(_acmA->CodecFEC());
+
+#endif // defined(WEBRTC_CODEC_G722)
}
int32_t TestRedFec::SetVAD(bool enableDTX, bool enableVAD, ACMVADMode vadMode) {
« no previous file with comments | « webrtc/modules/audio_coding/main/audio_coding_module.gypi ('k') | webrtc/modules/audio_coding/main/test/Tester.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698