Don't select audio codecs depending on GN vars `build_with_{chromium|mozilla}`
BUG=webrtc:8343
Change-Id: I5943006a4da17f72eb88eae9d7ea57574d54f680
Reviewed-on: https://webrtc-review.googlesource.com/9401
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20540}
diff --git a/modules/audio_coding/test/TestAllCodecs.cc b/modules/audio_coding/test/TestAllCodecs.cc
index ff28a28..f7f220f 100644
--- a/modules/audio_coding/test/TestAllCodecs.cc
+++ b/modules/audio_coding/test/TestAllCodecs.cc
@@ -151,7 +151,6 @@
// All codecs are tested for all allowed sampling frequencies, rates and
// packet sizes.
-#ifdef WEBRTC_CODEC_G722
if (test_mode_ != 0) {
printf("===============================================================\n");
}
@@ -171,7 +170,6 @@
RegisterSendCodec('A', codec_g722, 16000, 64000, 960, 0);
Run(channel_a_to_b_);
outfile_b_.Close();
-#endif
#ifdef WEBRTC_CODEC_ILBC
if (test_mode_ != 0) {
printf("===============================================================\n");
@@ -324,9 +322,6 @@
/* Print out all codecs that were not tested in the run */
printf("The following codecs was not included in the test:\n");
-#ifndef WEBRTC_CODEC_G722
- printf(" G.722\n");
-#endif
#ifndef WEBRTC_CODEC_ILBC
printf(" iLBC\n");
#endif
diff --git a/modules/audio_coding/test/TestRedFec.cc b/modules/audio_coding/test/TestRedFec.cc
index 58561c6..034c595 100644
--- a/modules/audio_coding/test/TestRedFec.cc
+++ b/modules/audio_coding/test/TestRedFec.cc
@@ -38,13 +38,9 @@
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";
-#endif
}
TestRedFec::TestRedFec()
@@ -104,11 +100,6 @@
Run();
_outFileB.Close();
-#ifndef WEBRTC_CODEC_G722
- EXPECT_TRUE(false);
- printf("G722 needs to be activated to run this test\n");
- return;
-#else
EXPECT_EQ(0, RegisterSendCodec('A', kNameG722, 16000));
EXPECT_EQ(0, RegisterSendCodec('A', kNameCN, 16000));
@@ -412,8 +403,6 @@
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) {
diff --git a/modules/audio_coding/test/TestStereo.cc b/modules/audio_coding/test/TestStereo.cc
index eca81f8..ba86719 100644
--- a/modules/audio_coding/test/TestStereo.cc
+++ b/modules/audio_coding/test/TestStereo.cc
@@ -114,13 +114,11 @@
test_cntr_(0),
pack_size_samp_(0),
pack_size_bytes_(0),
- counter_(0)
-#ifdef WEBRTC_CODEC_G722
- , g722_pltype_(0)
-#endif
- , l16_8khz_pltype_(-1)
- , l16_16khz_pltype_(-1)
- , l16_32khz_pltype_(-1)
+ counter_(0),
+ g722_pltype_(0),
+ l16_8khz_pltype_(-1),
+ l16_16khz_pltype_(-1),
+ l16_32khz_pltype_(-1)
#ifdef PCMA_AND_PCMU
, pcma_pltype_(-1)
, pcmu_pltype_(-1)
@@ -128,7 +126,7 @@
#ifdef WEBRTC_CODEC_OPUS
, opus_pltype_(-1)
#endif
- {
+{
// test_mode = 0 for silent test (auto test)
test_mode_ = test_mode;
}
@@ -217,7 +215,6 @@
// All codecs are tested for all allowed sampling frequencies, rates and
// packet sizes.
-#ifdef WEBRTC_CODEC_G722
if (test_mode_ != 0) {
printf("===========================================================\n");
printf("Test number: %d\n", test_cntr_ + 1);
@@ -246,7 +243,7 @@
g722_pltype_);
Run(channel_a2b_, audio_channels, codec_channels);
out_file_.Close();
-#endif
+
if (test_mode_ != 0) {
printf("===========================================================\n");
printf("Test number: %d\n", test_cntr_ + 1);
@@ -419,7 +416,6 @@
audio_channels = 1;
codec_channels = 2;
-#ifdef WEBRTC_CODEC_G722
if (test_mode_ != 0) {
printf("===============================================================\n");
printf("Test number: %d\n", test_cntr_ + 1);
@@ -432,7 +428,7 @@
g722_pltype_);
Run(channel_a2b_, audio_channels, codec_channels);
out_file_.Close();
-#endif
+
if (test_mode_ != 0) {
printf("===============================================================\n");
printf("Test number: %d\n", test_cntr_ + 1);
@@ -512,7 +508,6 @@
codec_channels = 1;
channel_a2b_->set_codec_mode(kMono);
-#ifdef WEBRTC_CODEC_G722
// Run stereo audio and mono codec.
if (test_mode_ != 0) {
printf("===============================================================\n");
@@ -533,7 +528,7 @@
EXPECT_EQ(0, acm_a_->SetVAD(false, false, VADNormal));
Run(channel_a2b_, audio_channels, codec_channels);
out_file_.Close();
-#endif
+
if (test_mode_ != 0) {
printf("===============================================================\n");
printf("Test number: %d\n", test_cntr_ + 1);
@@ -659,9 +654,7 @@
// Print out which codecs were tested, and which were not, in the run.
if (test_mode_ != 0) {
printf("\nThe following codecs was INCLUDED in the test:\n");
-#ifdef WEBRTC_CODEC_G722
printf(" G.722\n");
-#endif
printf(" PCM16\n");
printf(" G.711\n");
#ifdef WEBRTC_CODEC_OPUS
diff --git a/modules/audio_coding/test/TestStereo.h b/modules/audio_coding/test/TestStereo.h
index a27d8d7..a454f25 100644
--- a/modules/audio_coding/test/TestStereo.h
+++ b/modules/audio_coding/test/TestStereo.h
@@ -98,9 +98,7 @@
char* send_codec_name_;
// Payload types for stereo codecs and CNG
-#ifdef WEBRTC_CODEC_G722
int g722_pltype_;
-#endif
int l16_8khz_pltype_;
int l16_16khz_pltype_;
int l16_32khz_pltype_;
diff --git a/modules/audio_coding/test/Tester.cc b/modules/audio_coding/test/Tester.cc
index 73625f1..9cd774d 100644
--- a/modules/audio_coding/test/Tester.cc
+++ b/modules/audio_coding/test/Tester.cc
@@ -63,7 +63,7 @@
#endif
#if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \
- defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722)
+ defined(WEBRTC_CODEC_ILBC)
#if defined(WEBRTC_ANDROID)
TEST(AudioCodingModuleTest, DISABLED_TwoWayCommunication) {
#else