Revert of Don't link with audio codecs that we don't use (patchset #4 id:60001 of https://codereview.webrtc.org/1349393003/ )
Reason for revert: Breaking Chromium FYI bots. Original issue's description: > Don't link with audio codecs that we don't use > > We used to link with all audio codecs unconditionally (except Opus); > this patch makes gyp and gn only link to the ones that are used. > > (This unfortunately fails to have a measurable impact on Chromium > binary size, at least on x86_64 Linux; it turns out that iLBC and iSAC > fix were already being excluded from Chromium by some other means > (likely just the linker omitting compilation units with no incoming > references).) > > BUG=webrtc:4557 > > Committed: https://crrev.com/f66a9251424351ea6d631c54dd1feb64cc13d809 > Cr-Commit-Position: refs/heads/master@{#10046} TBR=henrik.lundin@webrtc.org,tina.legrand@webrtc.org,kjellander@webrtc.org,kwiberg@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:4557 Review URL: https://codereview.webrtc.org/1368933002 Cr-Commit-Position: refs/heads/master@{#10069}
This commit is contained in:
@ -13,7 +13,11 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#ifndef AUDIO_DECODER_UNITTEST
|
||||
// If this is compiled as a part of the audio_deoder_unittest, the codec
|
||||
// selection is made in the gypi file instead of in engine_configurations.h.
|
||||
#include "webrtc/engine_configurations.h"
|
||||
#endif
|
||||
#include "webrtc/base/constructormagic.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/audio_decoder.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/cng/include/webrtc_cng.h"
|
||||
|
||||
@ -562,6 +562,7 @@ TEST_F(AudioDecoderIsacSwbTest, EncodeDecode) {
|
||||
int tolerance = 19757;
|
||||
double mse = 8.18e6;
|
||||
int delay = 160; // Delay from input to output.
|
||||
EXPECT_TRUE(CodecSupported(kDecoderISACswb));
|
||||
EncodeDecodeTest(0, tolerance, mse, delay);
|
||||
ReInitTest();
|
||||
EXPECT_FALSE(decoder_->HasDecodePlc());
|
||||
@ -675,10 +676,8 @@ TEST(AudioDecoder, CodecSampleRateHz) {
|
||||
EXPECT_EQ(8000, CodecSampleRateHz(kDecoderPCMa_2ch));
|
||||
EXPECT_EQ(8000, CodecSampleRateHz(kDecoderILBC));
|
||||
EXPECT_EQ(16000, CodecSampleRateHz(kDecoderISAC));
|
||||
#ifndef WEBRTC_ARCH_ARM
|
||||
EXPECT_EQ(32000, CodecSampleRateHz(kDecoderISACswb));
|
||||
EXPECT_EQ(32000, CodecSampleRateHz(kDecoderISACfb));
|
||||
#endif
|
||||
EXPECT_EQ(8000, CodecSampleRateHz(kDecoderPCM16B));
|
||||
EXPECT_EQ(16000, CodecSampleRateHz(kDecoderPCM16Bwb));
|
||||
EXPECT_EQ(32000, CodecSampleRateHz(kDecoderPCM16Bswb32kHz));
|
||||
@ -703,19 +702,14 @@ TEST(AudioDecoder, CodecSampleRateHz) {
|
||||
}
|
||||
|
||||
TEST(AudioDecoder, CodecSupported) {
|
||||
#ifdef WEBRTC_ARCH_ARM
|
||||
static const bool has_isac_swb = false;
|
||||
#else
|
||||
static const bool has_isac_swb = true;
|
||||
#endif
|
||||
EXPECT_TRUE(CodecSupported(kDecoderPCMu));
|
||||
EXPECT_TRUE(CodecSupported(kDecoderPCMa));
|
||||
EXPECT_TRUE(CodecSupported(kDecoderPCMu_2ch));
|
||||
EXPECT_TRUE(CodecSupported(kDecoderPCMa_2ch));
|
||||
EXPECT_TRUE(CodecSupported(kDecoderILBC));
|
||||
EXPECT_TRUE(CodecSupported(kDecoderISAC));
|
||||
EXPECT_EQ(has_isac_swb, CodecSupported(kDecoderISACswb));
|
||||
EXPECT_EQ(has_isac_swb, CodecSupported(kDecoderISACfb));
|
||||
EXPECT_TRUE(CodecSupported(kDecoderISACswb));
|
||||
EXPECT_TRUE(CodecSupported(kDecoderISACfb));
|
||||
EXPECT_TRUE(CodecSupported(kDecoderPCM16B));
|
||||
EXPECT_TRUE(CodecSupported(kDecoderPCM16Bwb));
|
||||
EXPECT_TRUE(CodecSupported(kDecoderPCM16Bswb32kHz));
|
||||
|
||||
@ -11,6 +11,10 @@
|
||||
'codecs': [
|
||||
'cng',
|
||||
'g711',
|
||||
'g722',
|
||||
'ilbc',
|
||||
'isac',
|
||||
'isac_fix',
|
||||
'pcm16b',
|
||||
],
|
||||
'neteq_defines': [],
|
||||
@ -19,23 +23,6 @@
|
||||
'codecs': ['webrtc_opus',],
|
||||
'neteq_defines': ['WEBRTC_CODEC_OPUS',],
|
||||
}],
|
||||
['build_with_mozilla==0', {
|
||||
'conditions': [
|
||||
['target_arch=="arm"', {
|
||||
'codecs': ['isac_fix',],
|
||||
'neteq_defines': ['WEBRTC_CODEC_ISACFX',],
|
||||
}, {
|
||||
'codecs': ['isac',],
|
||||
'neteq_defines': ['WEBRTC_CODEC_ISAC',],
|
||||
}],
|
||||
],
|
||||
'codecs': ['g722',],
|
||||
'neteq_defines': ['WEBRTC_CODEC_G722',],
|
||||
}],
|
||||
['build_with_mozilla==0 and build_with_chromium==0', {
|
||||
'codecs': ['ilbc',],
|
||||
'neteq_defines': ['WEBRTC_CODEC_ILBC',],
|
||||
}],
|
||||
],
|
||||
'neteq_dependencies': [
|
||||
'<@(codecs)',
|
||||
@ -133,10 +120,6 @@
|
||||
'type': '<(gtest_target_type)',
|
||||
'dependencies': [
|
||||
'<@(codecs)',
|
||||
'g722',
|
||||
'ilbc',
|
||||
'isac',
|
||||
'isac_fix',
|
||||
'audio_decoder_interface',
|
||||
'neteq_unittest_tools',
|
||||
'<(DEPTH)/testing/gtest.gyp:gtest',
|
||||
@ -144,6 +127,11 @@
|
||||
'<(webrtc_root)/test/test.gyp:test_support_main',
|
||||
],
|
||||
'defines': [
|
||||
'AUDIO_DECODER_UNITTEST',
|
||||
'WEBRTC_CODEC_G722',
|
||||
'WEBRTC_CODEC_ILBC',
|
||||
'WEBRTC_CODEC_ISACFX',
|
||||
'WEBRTC_CODEC_ISAC',
|
||||
'<@(neteq_defines)',
|
||||
],
|
||||
'sources': [
|
||||
|
||||
Reference in New Issue
Block a user