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:
@ -43,6 +43,8 @@ rtc_static_library("builtin_audio_decoder_factory") {
|
|||||||
"../../rtc_base:rtc_base_approved",
|
"../../rtc_base:rtc_base_approved",
|
||||||
"L16:audio_decoder_L16",
|
"L16:audio_decoder_L16",
|
||||||
"g711:audio_decoder_g711",
|
"g711:audio_decoder_g711",
|
||||||
|
"g722:audio_decoder_g722",
|
||||||
|
"isac:audio_decoder_isac",
|
||||||
]
|
]
|
||||||
defines = []
|
defines = []
|
||||||
if (rtc_include_ilbc) {
|
if (rtc_include_ilbc) {
|
||||||
@ -57,21 +59,6 @@ rtc_static_library("builtin_audio_decoder_factory") {
|
|||||||
} else {
|
} else {
|
||||||
defines += [ "WEBRTC_USE_BUILTIN_OPUS=0" ]
|
defines += [ "WEBRTC_USE_BUILTIN_OPUS=0" ]
|
||||||
}
|
}
|
||||||
if (build_with_mozilla) {
|
|
||||||
defines += [
|
|
||||||
"WEBRTC_USE_BUILTIN_G722=0",
|
|
||||||
"WEBRTC_USE_BUILTIN_ISAC=0",
|
|
||||||
]
|
|
||||||
} else {
|
|
||||||
deps += [
|
|
||||||
"g722:audio_decoder_g722",
|
|
||||||
"isac:audio_decoder_isac",
|
|
||||||
]
|
|
||||||
defines += [
|
|
||||||
"WEBRTC_USE_BUILTIN_G722=1",
|
|
||||||
"WEBRTC_USE_BUILTIN_ISAC=1",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rtc_static_library("builtin_audio_encoder_factory") {
|
rtc_static_library("builtin_audio_encoder_factory") {
|
||||||
@ -84,6 +71,8 @@ rtc_static_library("builtin_audio_encoder_factory") {
|
|||||||
"../../rtc_base:rtc_base_approved",
|
"../../rtc_base:rtc_base_approved",
|
||||||
"L16:audio_encoder_L16",
|
"L16:audio_encoder_L16",
|
||||||
"g711:audio_encoder_g711",
|
"g711:audio_encoder_g711",
|
||||||
|
"g722:audio_encoder_g722",
|
||||||
|
"isac:audio_encoder_isac",
|
||||||
]
|
]
|
||||||
defines = []
|
defines = []
|
||||||
if (rtc_include_ilbc) {
|
if (rtc_include_ilbc) {
|
||||||
@ -98,19 +87,4 @@ rtc_static_library("builtin_audio_encoder_factory") {
|
|||||||
} else {
|
} else {
|
||||||
defines += [ "WEBRTC_USE_BUILTIN_OPUS=0" ]
|
defines += [ "WEBRTC_USE_BUILTIN_OPUS=0" ]
|
||||||
}
|
}
|
||||||
if (build_with_mozilla) {
|
|
||||||
defines += [
|
|
||||||
"WEBRTC_USE_BUILTIN_G722=0",
|
|
||||||
"WEBRTC_USE_BUILTIN_ISAC=0",
|
|
||||||
]
|
|
||||||
} else {
|
|
||||||
deps += [
|
|
||||||
"g722:audio_encoder_g722",
|
|
||||||
"isac:audio_encoder_isac",
|
|
||||||
]
|
|
||||||
defines += [
|
|
||||||
"WEBRTC_USE_BUILTIN_G722=1",
|
|
||||||
"WEBRTC_USE_BUILTIN_ISAC=1",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -16,15 +16,11 @@
|
|||||||
#include "api/audio_codecs/L16/audio_decoder_L16.h"
|
#include "api/audio_codecs/L16/audio_decoder_L16.h"
|
||||||
#include "api/audio_codecs/audio_decoder_factory_template.h"
|
#include "api/audio_codecs/audio_decoder_factory_template.h"
|
||||||
#include "api/audio_codecs/g711/audio_decoder_g711.h"
|
#include "api/audio_codecs/g711/audio_decoder_g711.h"
|
||||||
#if WEBRTC_USE_BUILTIN_G722
|
#include "api/audio_codecs/g722/audio_decoder_g722.h"
|
||||||
#include "api/audio_codecs/g722/audio_decoder_g722.h" // nogncheck
|
|
||||||
#endif
|
|
||||||
#if WEBRTC_USE_BUILTIN_ILBC
|
#if WEBRTC_USE_BUILTIN_ILBC
|
||||||
#include "api/audio_codecs/ilbc/audio_decoder_ilbc.h" // nogncheck
|
#include "api/audio_codecs/ilbc/audio_decoder_ilbc.h" // nogncheck
|
||||||
#endif
|
#endif
|
||||||
#if WEBRTC_USE_BUILTIN_ISAC
|
#include "api/audio_codecs/isac/audio_decoder_isac.h"
|
||||||
#include "api/audio_codecs/isac/audio_decoder_isac.h" // nogncheck
|
|
||||||
#endif
|
|
||||||
#if WEBRTC_USE_BUILTIN_OPUS
|
#if WEBRTC_USE_BUILTIN_OPUS
|
||||||
#include "api/audio_codecs/opus/audio_decoder_opus.h" // nogncheck
|
#include "api/audio_codecs/opus/audio_decoder_opus.h" // nogncheck
|
||||||
#endif
|
#endif
|
||||||
@ -57,13 +53,7 @@ rtc::scoped_refptr<AudioDecoderFactory> CreateBuiltinAudioDecoderFactory() {
|
|||||||
AudioDecoderOpus,
|
AudioDecoderOpus,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if WEBRTC_USE_BUILTIN_ISAC
|
AudioDecoderIsac, AudioDecoderG722,
|
||||||
AudioDecoderIsac,
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if WEBRTC_USE_BUILTIN_G722
|
|
||||||
AudioDecoderG722,
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if WEBRTC_USE_BUILTIN_ILBC
|
#if WEBRTC_USE_BUILTIN_ILBC
|
||||||
AudioDecoderIlbc,
|
AudioDecoderIlbc,
|
||||||
|
@ -16,15 +16,11 @@
|
|||||||
#include "api/audio_codecs/L16/audio_encoder_L16.h"
|
#include "api/audio_codecs/L16/audio_encoder_L16.h"
|
||||||
#include "api/audio_codecs/audio_encoder_factory_template.h"
|
#include "api/audio_codecs/audio_encoder_factory_template.h"
|
||||||
#include "api/audio_codecs/g711/audio_encoder_g711.h"
|
#include "api/audio_codecs/g711/audio_encoder_g711.h"
|
||||||
#if WEBRTC_USE_BUILTIN_G722
|
#include "api/audio_codecs/g722/audio_encoder_g722.h"
|
||||||
#include "api/audio_codecs/g722/audio_encoder_g722.h" // nogncheck
|
|
||||||
#endif
|
|
||||||
#if WEBRTC_USE_BUILTIN_ILBC
|
#if WEBRTC_USE_BUILTIN_ILBC
|
||||||
#include "api/audio_codecs/ilbc/audio_encoder_ilbc.h" // nogncheck
|
#include "api/audio_codecs/ilbc/audio_encoder_ilbc.h" // nogncheck
|
||||||
#endif
|
#endif
|
||||||
#if WEBRTC_USE_BUILTIN_ISAC
|
#include "api/audio_codecs/isac/audio_encoder_isac.h"
|
||||||
#include "api/audio_codecs/isac/audio_encoder_isac.h" // nogncheck
|
|
||||||
#endif
|
|
||||||
#if WEBRTC_USE_BUILTIN_OPUS
|
#if WEBRTC_USE_BUILTIN_OPUS
|
||||||
#include "api/audio_codecs/opus/audio_encoder_opus.h" // nogncheck
|
#include "api/audio_codecs/opus/audio_encoder_opus.h" // nogncheck
|
||||||
#endif
|
#endif
|
||||||
@ -61,13 +57,7 @@ rtc::scoped_refptr<AudioEncoderFactory> CreateBuiltinAudioEncoderFactory() {
|
|||||||
AudioEncoderOpus,
|
AudioEncoderOpus,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if WEBRTC_USE_BUILTIN_ISAC
|
AudioEncoderIsac, AudioEncoderG722,
|
||||||
AudioEncoderIsac,
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if WEBRTC_USE_BUILTIN_G722
|
|
||||||
AudioEncoderG722,
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if WEBRTC_USE_BUILTIN_ILBC
|
#if WEBRTC_USE_BUILTIN_ILBC
|
||||||
AudioEncoderIlbc,
|
AudioEncoderIlbc,
|
||||||
|
@ -22,14 +22,12 @@ if (rtc_include_ilbc) {
|
|||||||
if (rtc_include_opus) {
|
if (rtc_include_opus) {
|
||||||
audio_codec_deps += [ ":webrtc_opus" ]
|
audio_codec_deps += [ ":webrtc_opus" ]
|
||||||
}
|
}
|
||||||
if (!build_with_mozilla) {
|
if (current_cpu == "arm") {
|
||||||
if (current_cpu == "arm") {
|
|
||||||
audio_codec_deps += [ ":isac_fix" ]
|
audio_codec_deps += [ ":isac_fix" ]
|
||||||
} else {
|
} else {
|
||||||
audio_codec_deps += [ ":isac" ]
|
audio_codec_deps += [ ":isac" ]
|
||||||
}
|
|
||||||
audio_codec_deps += [ ":g722" ]
|
|
||||||
}
|
}
|
||||||
|
audio_codec_deps += [ ":g722" ]
|
||||||
if (!build_with_mozilla && !build_with_chromium) {
|
if (!build_with_mozilla && !build_with_chromium) {
|
||||||
audio_codec_deps += [ ":red" ]
|
audio_codec_deps += [ ":red" ]
|
||||||
}
|
}
|
||||||
|
@ -85,12 +85,10 @@ const CodecInst ACMCodecDB::database_[] = {
|
|||||||
#ifdef WEBRTC_CODEC_ILBC
|
#ifdef WEBRTC_CODEC_ILBC
|
||||||
{102, "ILBC", 8000, 240, 1, 13300},
|
{102, "ILBC", 8000, 240, 1, 13300},
|
||||||
#endif
|
#endif
|
||||||
#ifdef WEBRTC_CODEC_G722
|
|
||||||
// Mono
|
// Mono
|
||||||
{9, "G722", 16000, 320, 1, 64000},
|
{9, "G722", 16000, 320, 1, 64000},
|
||||||
// Stereo
|
// Stereo
|
||||||
{119, "G722", 16000, 320, 2, 64000},
|
{119, "G722", 16000, 320, 2, 64000},
|
||||||
#endif
|
|
||||||
#ifdef WEBRTC_CODEC_OPUS
|
#ifdef WEBRTC_CODEC_OPUS
|
||||||
// Opus internally supports 48, 24, 16, 12, 8 kHz.
|
// Opus internally supports 48, 24, 16, 12, 8 kHz.
|
||||||
// Mono and stereo.
|
// Mono and stereo.
|
||||||
@ -143,12 +141,10 @@ const ACMCodecDB::CodecSettings ACMCodecDB::codec_settings_[] = {
|
|||||||
#ifdef WEBRTC_CODEC_ILBC
|
#ifdef WEBRTC_CODEC_ILBC
|
||||||
{4, {160, 240, 320, 480}, 0, 1},
|
{4, {160, 240, 320, 480}, 0, 1},
|
||||||
#endif
|
#endif
|
||||||
#ifdef WEBRTC_CODEC_G722
|
|
||||||
// Mono
|
// Mono
|
||||||
{6, {160, 320, 480, 640, 800, 960}, 0, 2},
|
{6, {160, 320, 480, 640, 800, 960}, 0, 2},
|
||||||
// Stereo
|
// Stereo
|
||||||
{6, {160, 320, 480, 640, 800, 960}, 0, 2},
|
{6, {160, 320, 480, 640, 800, 960}, 0, 2},
|
||||||
#endif
|
|
||||||
#ifdef WEBRTC_CODEC_OPUS
|
#ifdef WEBRTC_CODEC_OPUS
|
||||||
// Opus supports frames shorter than 10ms,
|
// Opus supports frames shorter than 10ms,
|
||||||
// but it doesn't help us to use them.
|
// but it doesn't help us to use them.
|
||||||
@ -200,12 +196,10 @@ const NetEqDecoder ACMCodecDB::neteq_decoders_[] = {
|
|||||||
#ifdef WEBRTC_CODEC_ILBC
|
#ifdef WEBRTC_CODEC_ILBC
|
||||||
NetEqDecoder::kDecoderILBC,
|
NetEqDecoder::kDecoderILBC,
|
||||||
#endif
|
#endif
|
||||||
#ifdef WEBRTC_CODEC_G722
|
|
||||||
// Mono
|
// Mono
|
||||||
NetEqDecoder::kDecoderG722,
|
NetEqDecoder::kDecoderG722,
|
||||||
// Stereo
|
// Stereo
|
||||||
NetEqDecoder::kDecoderG722_2ch,
|
NetEqDecoder::kDecoderG722_2ch,
|
||||||
#endif
|
|
||||||
#ifdef WEBRTC_CODEC_OPUS
|
#ifdef WEBRTC_CODEC_OPUS
|
||||||
// Mono and stereo.
|
// Mono and stereo.
|
||||||
NetEqDecoder::kDecoderOpus,
|
NetEqDecoder::kDecoderOpus,
|
||||||
|
@ -980,7 +980,7 @@ class AcmReceiverBitExactnessOldApi : public ::testing::Test {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \
|
#if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \
|
||||||
defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722)
|
defined(WEBRTC_CODEC_ILBC)
|
||||||
TEST_F(AcmReceiverBitExactnessOldApi, 8kHzOutput) {
|
TEST_F(AcmReceiverBitExactnessOldApi, 8kHzOutput) {
|
||||||
Run(8000, PlatformChecksum("2adede965c6f87de7142c51552111d08",
|
Run(8000, PlatformChecksum("2adede965c6f87de7142c51552111d08",
|
||||||
"028c0fc414b1c9ab7e582dccdf381e98",
|
"028c0fc414b1c9ab7e582dccdf381e98",
|
||||||
@ -1438,7 +1438,6 @@ TEST_F(AcmSenderBitExactnessOldApi, MAYBE_Ilbc_30ms) {
|
|||||||
#else
|
#else
|
||||||
#define MAYBE_G722_20ms G722_20ms
|
#define MAYBE_G722_20ms G722_20ms
|
||||||
#endif
|
#endif
|
||||||
#if defined(WEBRTC_CODEC_G722)
|
|
||||||
TEST_F(AcmSenderBitExactnessOldApi, MAYBE_G722_20ms) {
|
TEST_F(AcmSenderBitExactnessOldApi, MAYBE_G722_20ms) {
|
||||||
ASSERT_NO_FATAL_FAILURE(SetUpTest("G722", 16000, 1, 9, 320, 160));
|
ASSERT_NO_FATAL_FAILURE(SetUpTest("G722", 16000, 1, 9, 320, 160));
|
||||||
Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
|
Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
|
||||||
@ -1451,14 +1450,12 @@ TEST_F(AcmSenderBitExactnessOldApi, MAYBE_G722_20ms) {
|
|||||||
"android_arm64_payload", "android_arm64_clang_payload"),
|
"android_arm64_payload", "android_arm64_clang_payload"),
|
||||||
50, test::AcmReceiveTestOldApi::kMonoOutput);
|
50, test::AcmReceiveTestOldApi::kMonoOutput);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(WEBRTC_ANDROID)
|
#if defined(WEBRTC_ANDROID)
|
||||||
#define MAYBE_G722_stereo_20ms DISABLED_G722_stereo_20ms
|
#define MAYBE_G722_stereo_20ms DISABLED_G722_stereo_20ms
|
||||||
#else
|
#else
|
||||||
#define MAYBE_G722_stereo_20ms G722_stereo_20ms
|
#define MAYBE_G722_stereo_20ms G722_stereo_20ms
|
||||||
#endif
|
#endif
|
||||||
#if defined(WEBRTC_CODEC_G722)
|
|
||||||
TEST_F(AcmSenderBitExactnessOldApi, MAYBE_G722_stereo_20ms) {
|
TEST_F(AcmSenderBitExactnessOldApi, MAYBE_G722_stereo_20ms) {
|
||||||
ASSERT_NO_FATAL_FAILURE(SetUpTest("G722", 16000, 2, 119, 320, 160));
|
ASSERT_NO_FATAL_FAILURE(SetUpTest("G722", 16000, 2, 119, 320, 160));
|
||||||
Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
|
Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
|
||||||
@ -1471,7 +1468,6 @@ TEST_F(AcmSenderBitExactnessOldApi, MAYBE_G722_stereo_20ms) {
|
|||||||
"android_arm64_payload", "android_arm64_clang_payload"),
|
"android_arm64_payload", "android_arm64_clang_payload"),
|
||||||
50, test::AcmReceiveTestOldApi::kStereoOutput);
|
50, test::AcmReceiveTestOldApi::kStereoOutput);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
TEST_F(AcmSenderBitExactnessOldApi, Opus_stereo_20ms) {
|
TEST_F(AcmSenderBitExactnessOldApi, Opus_stereo_20ms) {
|
||||||
ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 2, 120, 960, 960));
|
ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 2, 120, 960, 960));
|
||||||
|
@ -16,9 +16,7 @@
|
|||||||
#include "modules/audio_coding/codecs/cng/audio_encoder_cng.h"
|
#include "modules/audio_coding/codecs/cng/audio_encoder_cng.h"
|
||||||
#include "modules/audio_coding/codecs/g711/audio_encoder_pcm.h"
|
#include "modules/audio_coding/codecs/g711/audio_encoder_pcm.h"
|
||||||
#include "rtc_base/logging.h"
|
#include "rtc_base/logging.h"
|
||||||
#ifdef WEBRTC_CODEC_G722
|
|
||||||
#include "modules/audio_coding/codecs/g722/audio_encoder_g722.h"
|
#include "modules/audio_coding/codecs/g722/audio_encoder_g722.h"
|
||||||
#endif
|
|
||||||
#ifdef WEBRTC_CODEC_ILBC
|
#ifdef WEBRTC_CODEC_ILBC
|
||||||
#include "modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.h"
|
#include "modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.h"
|
||||||
#endif
|
#endif
|
||||||
@ -175,10 +173,8 @@ std::unique_ptr<AudioEncoder> CreateEncoder(
|
|||||||
if (STR_CASE_CMP(speech_inst.plname, "ilbc") == 0)
|
if (STR_CASE_CMP(speech_inst.plname, "ilbc") == 0)
|
||||||
return std::unique_ptr<AudioEncoder>(new AudioEncoderIlbcImpl(speech_inst));
|
return std::unique_ptr<AudioEncoder>(new AudioEncoderIlbcImpl(speech_inst));
|
||||||
#endif
|
#endif
|
||||||
#ifdef WEBRTC_CODEC_G722
|
|
||||||
if (STR_CASE_CMP(speech_inst.plname, "g722") == 0)
|
if (STR_CASE_CMP(speech_inst.plname, "g722") == 0)
|
||||||
return std::unique_ptr<AudioEncoder>(new AudioEncoderG722Impl(speech_inst));
|
return std::unique_ptr<AudioEncoder>(new AudioEncoderG722Impl(speech_inst));
|
||||||
#endif
|
|
||||||
LOG_F(LS_ERROR) << "Could not create encoder of type " << speech_inst.plname;
|
LOG_F(LS_ERROR) << "Could not create encoder of type " << speech_inst.plname;
|
||||||
return std::unique_ptr<AudioEncoder>();
|
return std::unique_ptr<AudioEncoder>();
|
||||||
}
|
}
|
||||||
|
@ -58,10 +58,8 @@ class RentACodec {
|
|||||||
#ifdef WEBRTC_CODEC_ILBC
|
#ifdef WEBRTC_CODEC_ILBC
|
||||||
kILBC,
|
kILBC,
|
||||||
#endif
|
#endif
|
||||||
#ifdef WEBRTC_CODEC_G722
|
|
||||||
kG722, // Mono
|
kG722, // Mono
|
||||||
kG722_2ch, // Stereo
|
kG722_2ch, // Stereo
|
||||||
#endif
|
|
||||||
#ifdef WEBRTC_CODEC_OPUS
|
#ifdef WEBRTC_CODEC_OPUS
|
||||||
kOpus, // Mono and stereo
|
kOpus, // Mono and stereo
|
||||||
#endif
|
#endif
|
||||||
@ -92,10 +90,6 @@ class RentACodec {
|
|||||||
#ifndef WEBRTC_CODEC_ILBC
|
#ifndef WEBRTC_CODEC_ILBC
|
||||||
kILBC = -1,
|
kILBC = -1,
|
||||||
#endif
|
#endif
|
||||||
#ifndef WEBRTC_CODEC_G722
|
|
||||||
kG722 = -1, // Mono
|
|
||||||
kG722_2ch = -1, // Stereo
|
|
||||||
#endif
|
|
||||||
#ifndef WEBRTC_CODEC_OPUS
|
#ifndef WEBRTC_CODEC_OPUS
|
||||||
kOpus = -1, // Mono and stereo
|
kOpus = -1, // Mono and stereo
|
||||||
#endif
|
#endif
|
||||||
|
@ -20,13 +20,10 @@ if (rtc_opus_support_120ms_ptime) {
|
|||||||
} else {
|
} else {
|
||||||
audio_codec_defines += [ "WEBRTC_OPUS_SUPPORT_120MS_PTIME=0" ]
|
audio_codec_defines += [ "WEBRTC_OPUS_SUPPORT_120MS_PTIME=0" ]
|
||||||
}
|
}
|
||||||
if (!build_with_mozilla) {
|
if (current_cpu == "arm") {
|
||||||
if (current_cpu == "arm") {
|
|
||||||
audio_codec_defines += [ "WEBRTC_CODEC_ISACFX" ]
|
audio_codec_defines += [ "WEBRTC_CODEC_ISACFX" ]
|
||||||
} else {
|
} else {
|
||||||
audio_codec_defines += [ "WEBRTC_CODEC_ISAC" ]
|
audio_codec_defines += [ "WEBRTC_CODEC_ISAC" ]
|
||||||
}
|
|
||||||
audio_codec_defines += [ "WEBRTC_CODEC_G722" ]
|
|
||||||
}
|
}
|
||||||
if (!build_with_mozilla && !build_with_chromium) {
|
if (!build_with_mozilla && !build_with_chromium) {
|
||||||
audio_codec_defines += [ "WEBRTC_CODEC_RED" ]
|
audio_codec_defines += [ "WEBRTC_CODEC_RED" ]
|
||||||
|
@ -131,9 +131,7 @@ TEST(BuiltinAudioEncoderFactoryTest, SupportsTheExpectedFormats) {
|
|||||||
#ifdef WEBRTC_CODEC_ISAC
|
#ifdef WEBRTC_CODEC_ISAC
|
||||||
{"isac", 32000, 1},
|
{"isac", 32000, 1},
|
||||||
#endif
|
#endif
|
||||||
#ifdef WEBRTC_CODEC_G722
|
|
||||||
{"G722", 8000, 1},
|
{"G722", 8000, 1},
|
||||||
#endif
|
|
||||||
#ifdef WEBRTC_CODEC_ILBC
|
#ifdef WEBRTC_CODEC_ILBC
|
||||||
{"ilbc", 8000, 1},
|
{"ilbc", 8000, 1},
|
||||||
#endif
|
#endif
|
||||||
|
@ -450,8 +450,7 @@ void NetEqDecodingTest::PopulateCng(int frame_index,
|
|||||||
|
|
||||||
#if !defined(WEBRTC_IOS) && defined(WEBRTC_NETEQ_UNITTEST_BITEXACT) && \
|
#if !defined(WEBRTC_IOS) && defined(WEBRTC_NETEQ_UNITTEST_BITEXACT) && \
|
||||||
(defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \
|
(defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \
|
||||||
defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722) && \
|
defined(WEBRTC_CODEC_ILBC) && !defined(WEBRTC_ARCH_ARM64)
|
||||||
!defined(WEBRTC_ARCH_ARM64)
|
|
||||||
#define MAYBE_TestBitExactness TestBitExactness
|
#define MAYBE_TestBitExactness TestBitExactness
|
||||||
#else
|
#else
|
||||||
#define MAYBE_TestBitExactness DISABLED_TestBitExactness
|
#define MAYBE_TestBitExactness DISABLED_TestBitExactness
|
||||||
|
@ -151,7 +151,6 @@ void TestAllCodecs::Perform() {
|
|||||||
|
|
||||||
// All codecs are tested for all allowed sampling frequencies, rates and
|
// All codecs are tested for all allowed sampling frequencies, rates and
|
||||||
// packet sizes.
|
// packet sizes.
|
||||||
#ifdef WEBRTC_CODEC_G722
|
|
||||||
if (test_mode_ != 0) {
|
if (test_mode_ != 0) {
|
||||||
printf("===============================================================\n");
|
printf("===============================================================\n");
|
||||||
}
|
}
|
||||||
@ -171,7 +170,6 @@ void TestAllCodecs::Perform() {
|
|||||||
RegisterSendCodec('A', codec_g722, 16000, 64000, 960, 0);
|
RegisterSendCodec('A', codec_g722, 16000, 64000, 960, 0);
|
||||||
Run(channel_a_to_b_);
|
Run(channel_a_to_b_);
|
||||||
outfile_b_.Close();
|
outfile_b_.Close();
|
||||||
#endif
|
|
||||||
#ifdef WEBRTC_CODEC_ILBC
|
#ifdef WEBRTC_CODEC_ILBC
|
||||||
if (test_mode_ != 0) {
|
if (test_mode_ != 0) {
|
||||||
printf("===============================================================\n");
|
printf("===============================================================\n");
|
||||||
@ -324,9 +322,6 @@ void TestAllCodecs::Perform() {
|
|||||||
|
|
||||||
/* Print out all codecs that were not tested in the run */
|
/* Print out all codecs that were not tested in the run */
|
||||||
printf("The following codecs was not included in the test:\n");
|
printf("The following codecs was not included in the test:\n");
|
||||||
#ifndef WEBRTC_CODEC_G722
|
|
||||||
printf(" G.722\n");
|
|
||||||
#endif
|
|
||||||
#ifndef WEBRTC_CODEC_ILBC
|
#ifndef WEBRTC_CODEC_ILBC
|
||||||
printf(" iLBC\n");
|
printf(" iLBC\n");
|
||||||
#endif
|
#endif
|
||||||
|
@ -38,13 +38,9 @@ namespace {
|
|||||||
const char kNamePCMU[] = "PCMU";
|
const char kNamePCMU[] = "PCMU";
|
||||||
const char kNameCN[] = "CN";
|
const char kNameCN[] = "CN";
|
||||||
const char kNameRED[] = "RED";
|
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 kNameISAC[] = "ISAC";
|
||||||
const char kNameG722[] = "G722";
|
const char kNameG722[] = "G722";
|
||||||
const char kNameOPUS[] = "opus";
|
const char kNameOPUS[] = "opus";
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TestRedFec::TestRedFec()
|
TestRedFec::TestRedFec()
|
||||||
@ -104,11 +100,6 @@ void TestRedFec::Perform() {
|
|||||||
Run();
|
Run();
|
||||||
_outFileB.Close();
|
_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', kNameG722, 16000));
|
||||||
EXPECT_EQ(0, RegisterSendCodec('A', kNameCN, 16000));
|
EXPECT_EQ(0, RegisterSendCodec('A', kNameCN, 16000));
|
||||||
|
|
||||||
@ -412,8 +403,6 @@ void TestRedFec::Perform() {
|
|||||||
EXPECT_FALSE(_acmA->REDStatus());
|
EXPECT_FALSE(_acmA->REDStatus());
|
||||||
EXPECT_EQ(0, _acmA->SetCodecFEC(false));
|
EXPECT_EQ(0, _acmA->SetCodecFEC(false));
|
||||||
EXPECT_FALSE(_acmA->CodecFEC());
|
EXPECT_FALSE(_acmA->CodecFEC());
|
||||||
|
|
||||||
#endif // defined(WEBRTC_CODEC_G722)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t TestRedFec::SetVAD(bool enableDTX, bool enableVAD, ACMVADMode vadMode) {
|
int32_t TestRedFec::SetVAD(bool enableDTX, bool enableVAD, ACMVADMode vadMode) {
|
||||||
|
@ -114,13 +114,11 @@ TestStereo::TestStereo(int test_mode)
|
|||||||
test_cntr_(0),
|
test_cntr_(0),
|
||||||
pack_size_samp_(0),
|
pack_size_samp_(0),
|
||||||
pack_size_bytes_(0),
|
pack_size_bytes_(0),
|
||||||
counter_(0)
|
counter_(0),
|
||||||
#ifdef WEBRTC_CODEC_G722
|
g722_pltype_(0),
|
||||||
, g722_pltype_(0)
|
l16_8khz_pltype_(-1),
|
||||||
#endif
|
l16_16khz_pltype_(-1),
|
||||||
, l16_8khz_pltype_(-1)
|
l16_32khz_pltype_(-1)
|
||||||
, l16_16khz_pltype_(-1)
|
|
||||||
, l16_32khz_pltype_(-1)
|
|
||||||
#ifdef PCMA_AND_PCMU
|
#ifdef PCMA_AND_PCMU
|
||||||
, pcma_pltype_(-1)
|
, pcma_pltype_(-1)
|
||||||
, pcmu_pltype_(-1)
|
, pcmu_pltype_(-1)
|
||||||
@ -128,7 +126,7 @@ TestStereo::TestStereo(int test_mode)
|
|||||||
#ifdef WEBRTC_CODEC_OPUS
|
#ifdef WEBRTC_CODEC_OPUS
|
||||||
, opus_pltype_(-1)
|
, opus_pltype_(-1)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
// test_mode = 0 for silent test (auto test)
|
// test_mode = 0 for silent test (auto test)
|
||||||
test_mode_ = test_mode;
|
test_mode_ = test_mode;
|
||||||
}
|
}
|
||||||
@ -217,7 +215,6 @@ void TestStereo::Perform() {
|
|||||||
|
|
||||||
// All codecs are tested for all allowed sampling frequencies, rates and
|
// All codecs are tested for all allowed sampling frequencies, rates and
|
||||||
// packet sizes.
|
// packet sizes.
|
||||||
#ifdef WEBRTC_CODEC_G722
|
|
||||||
if (test_mode_ != 0) {
|
if (test_mode_ != 0) {
|
||||||
printf("===========================================================\n");
|
printf("===========================================================\n");
|
||||||
printf("Test number: %d\n", test_cntr_ + 1);
|
printf("Test number: %d\n", test_cntr_ + 1);
|
||||||
@ -246,7 +243,7 @@ void TestStereo::Perform() {
|
|||||||
g722_pltype_);
|
g722_pltype_);
|
||||||
Run(channel_a2b_, audio_channels, codec_channels);
|
Run(channel_a2b_, audio_channels, codec_channels);
|
||||||
out_file_.Close();
|
out_file_.Close();
|
||||||
#endif
|
|
||||||
if (test_mode_ != 0) {
|
if (test_mode_ != 0) {
|
||||||
printf("===========================================================\n");
|
printf("===========================================================\n");
|
||||||
printf("Test number: %d\n", test_cntr_ + 1);
|
printf("Test number: %d\n", test_cntr_ + 1);
|
||||||
@ -419,7 +416,6 @@ void TestStereo::Perform() {
|
|||||||
audio_channels = 1;
|
audio_channels = 1;
|
||||||
codec_channels = 2;
|
codec_channels = 2;
|
||||||
|
|
||||||
#ifdef WEBRTC_CODEC_G722
|
|
||||||
if (test_mode_ != 0) {
|
if (test_mode_ != 0) {
|
||||||
printf("===============================================================\n");
|
printf("===============================================================\n");
|
||||||
printf("Test number: %d\n", test_cntr_ + 1);
|
printf("Test number: %d\n", test_cntr_ + 1);
|
||||||
@ -432,7 +428,7 @@ void TestStereo::Perform() {
|
|||||||
g722_pltype_);
|
g722_pltype_);
|
||||||
Run(channel_a2b_, audio_channels, codec_channels);
|
Run(channel_a2b_, audio_channels, codec_channels);
|
||||||
out_file_.Close();
|
out_file_.Close();
|
||||||
#endif
|
|
||||||
if (test_mode_ != 0) {
|
if (test_mode_ != 0) {
|
||||||
printf("===============================================================\n");
|
printf("===============================================================\n");
|
||||||
printf("Test number: %d\n", test_cntr_ + 1);
|
printf("Test number: %d\n", test_cntr_ + 1);
|
||||||
@ -512,7 +508,6 @@ void TestStereo::Perform() {
|
|||||||
codec_channels = 1;
|
codec_channels = 1;
|
||||||
channel_a2b_->set_codec_mode(kMono);
|
channel_a2b_->set_codec_mode(kMono);
|
||||||
|
|
||||||
#ifdef WEBRTC_CODEC_G722
|
|
||||||
// Run stereo audio and mono codec.
|
// Run stereo audio and mono codec.
|
||||||
if (test_mode_ != 0) {
|
if (test_mode_ != 0) {
|
||||||
printf("===============================================================\n");
|
printf("===============================================================\n");
|
||||||
@ -533,7 +528,7 @@ void TestStereo::Perform() {
|
|||||||
EXPECT_EQ(0, acm_a_->SetVAD(false, false, VADNormal));
|
EXPECT_EQ(0, acm_a_->SetVAD(false, false, VADNormal));
|
||||||
Run(channel_a2b_, audio_channels, codec_channels);
|
Run(channel_a2b_, audio_channels, codec_channels);
|
||||||
out_file_.Close();
|
out_file_.Close();
|
||||||
#endif
|
|
||||||
if (test_mode_ != 0) {
|
if (test_mode_ != 0) {
|
||||||
printf("===============================================================\n");
|
printf("===============================================================\n");
|
||||||
printf("Test number: %d\n", test_cntr_ + 1);
|
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.
|
// Print out which codecs were tested, and which were not, in the run.
|
||||||
if (test_mode_ != 0) {
|
if (test_mode_ != 0) {
|
||||||
printf("\nThe following codecs was INCLUDED in the test:\n");
|
printf("\nThe following codecs was INCLUDED in the test:\n");
|
||||||
#ifdef WEBRTC_CODEC_G722
|
|
||||||
printf(" G.722\n");
|
printf(" G.722\n");
|
||||||
#endif
|
|
||||||
printf(" PCM16\n");
|
printf(" PCM16\n");
|
||||||
printf(" G.711\n");
|
printf(" G.711\n");
|
||||||
#ifdef WEBRTC_CODEC_OPUS
|
#ifdef WEBRTC_CODEC_OPUS
|
||||||
|
@ -98,9 +98,7 @@ class TestStereo : public ACMTest {
|
|||||||
char* send_codec_name_;
|
char* send_codec_name_;
|
||||||
|
|
||||||
// Payload types for stereo codecs and CNG
|
// Payload types for stereo codecs and CNG
|
||||||
#ifdef WEBRTC_CODEC_G722
|
|
||||||
int g722_pltype_;
|
int g722_pltype_;
|
||||||
#endif
|
|
||||||
int l16_8khz_pltype_;
|
int l16_8khz_pltype_;
|
||||||
int l16_16khz_pltype_;
|
int l16_16khz_pltype_;
|
||||||
int l16_32khz_pltype_;
|
int l16_32khz_pltype_;
|
||||||
|
@ -63,7 +63,7 @@ TEST(AudioCodingModuleTest, TestIsac) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \
|
#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)
|
#if defined(WEBRTC_ANDROID)
|
||||||
TEST(AudioCodingModuleTest, DISABLED_TwoWayCommunication) {
|
TEST(AudioCodingModuleTest, DISABLED_TwoWayCommunication) {
|
||||||
#else
|
#else
|
||||||
|
@ -1388,12 +1388,10 @@ int32_t ModuleFileUtility::set_codec_info(const CodecInst& codecInst)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef WEBRTC_CODEC_G722
|
|
||||||
else if(STR_CASE_CMP(codecInst.plname, "G722") == 0)
|
else if(STR_CASE_CMP(codecInst.plname, "G722") == 0)
|
||||||
{
|
{
|
||||||
_codecId = kCodecG722;
|
_codecId = kCodecG722;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if(_codecId == kCodecNoCodec)
|
if(_codecId == kCodecNoCodec)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -33,6 +33,9 @@ if (is_ios) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare_args() {
|
declare_args() {
|
||||||
|
# Include the iLBC audio codec?
|
||||||
|
rtc_include_ilbc = true
|
||||||
|
|
||||||
# Disable this to avoid building the Opus audio codec.
|
# Disable this to avoid building the Opus audio codec.
|
||||||
rtc_include_opus = true
|
rtc_include_opus = true
|
||||||
|
|
||||||
@ -173,9 +176,6 @@ declare_args() {
|
|||||||
# depend on the possibly overridden variables in the first
|
# depend on the possibly overridden variables in the first
|
||||||
# declare_args block.
|
# declare_args block.
|
||||||
declare_args() {
|
declare_args() {
|
||||||
# Include the iLBC audio codec?
|
|
||||||
rtc_include_ilbc = !(build_with_chromium || build_with_mozilla)
|
|
||||||
|
|
||||||
rtc_restrict_logging = build_with_chromium
|
rtc_restrict_logging = build_with_chromium
|
||||||
|
|
||||||
# Excluded in Chromium since its prerequisites don't require Pulse Audio.
|
# Excluded in Chromium since its prerequisites don't require Pulse Audio.
|
||||||
|
Reference in New Issue
Block a user