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}
This commit is contained in:
Karl Wiberg
2017-11-01 15:08:12 +01:00
committed by Commit Bot
parent e0aca5e320
commit eb254b40b3
18 changed files with 34 additions and 135 deletions

View File

@ -151,7 +151,6 @@ void TestAllCodecs::Perform() {
// 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 @@ void TestAllCodecs::Perform() {
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 @@ void TestAllCodecs::Perform() {
/* 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

View File

@ -38,13 +38,9 @@ namespace {
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 @@ void TestRedFec::Perform() {
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 @@ 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) {

View File

@ -114,13 +114,11 @@ TestStereo::TestStereo(int test_mode)
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 @@ TestStereo::TestStereo(int test_mode)
#ifdef WEBRTC_CODEC_OPUS
, opus_pltype_(-1)
#endif
{
{
// test_mode = 0 for silent test (auto test)
test_mode_ = test_mode;
}
@ -217,7 +215,6 @@ void TestStereo::Perform() {
// 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 @@ void TestStereo::Perform() {
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 @@ void TestStereo::Perform() {
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 @@ void TestStereo::Perform() {
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 @@ void TestStereo::Perform() {
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 @@ void TestStereo::Perform() {
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 @@ void TestStereo::Perform() {
// 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

View File

@ -98,9 +98,7 @@ class TestStereo : public ACMTest {
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_;

View File

@ -63,7 +63,7 @@ TEST(AudioCodingModuleTest, TestIsac) {
#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