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:
@ -85,12 +85,10 @@ const CodecInst ACMCodecDB::database_[] = {
|
||||
#ifdef WEBRTC_CODEC_ILBC
|
||||
{102, "ILBC", 8000, 240, 1, 13300},
|
||||
#endif
|
||||
#ifdef WEBRTC_CODEC_G722
|
||||
// Mono
|
||||
{9, "G722", 16000, 320, 1, 64000},
|
||||
// Stereo
|
||||
{119, "G722", 16000, 320, 2, 64000},
|
||||
#endif
|
||||
#ifdef WEBRTC_CODEC_OPUS
|
||||
// Opus internally supports 48, 24, 16, 12, 8 kHz.
|
||||
// Mono and stereo.
|
||||
@ -143,12 +141,10 @@ const ACMCodecDB::CodecSettings ACMCodecDB::codec_settings_[] = {
|
||||
#ifdef WEBRTC_CODEC_ILBC
|
||||
{4, {160, 240, 320, 480}, 0, 1},
|
||||
#endif
|
||||
#ifdef WEBRTC_CODEC_G722
|
||||
// Mono
|
||||
{6, {160, 320, 480, 640, 800, 960}, 0, 2},
|
||||
// Stereo
|
||||
{6, {160, 320, 480, 640, 800, 960}, 0, 2},
|
||||
#endif
|
||||
#ifdef WEBRTC_CODEC_OPUS
|
||||
// Opus supports frames shorter than 10ms,
|
||||
// but it doesn't help us to use them.
|
||||
@ -200,12 +196,10 @@ const NetEqDecoder ACMCodecDB::neteq_decoders_[] = {
|
||||
#ifdef WEBRTC_CODEC_ILBC
|
||||
NetEqDecoder::kDecoderILBC,
|
||||
#endif
|
||||
#ifdef WEBRTC_CODEC_G722
|
||||
// Mono
|
||||
NetEqDecoder::kDecoderG722,
|
||||
// Stereo
|
||||
NetEqDecoder::kDecoderG722_2ch,
|
||||
#endif
|
||||
#ifdef WEBRTC_CODEC_OPUS
|
||||
// Mono and stereo.
|
||||
NetEqDecoder::kDecoderOpus,
|
||||
|
||||
@ -980,7 +980,7 @@ class AcmReceiverBitExactnessOldApi : public ::testing::Test {
|
||||
};
|
||||
|
||||
#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) {
|
||||
Run(8000, PlatformChecksum("2adede965c6f87de7142c51552111d08",
|
||||
"028c0fc414b1c9ab7e582dccdf381e98",
|
||||
@ -1438,7 +1438,6 @@ TEST_F(AcmSenderBitExactnessOldApi, MAYBE_Ilbc_30ms) {
|
||||
#else
|
||||
#define MAYBE_G722_20ms G722_20ms
|
||||
#endif
|
||||
#if defined(WEBRTC_CODEC_G722)
|
||||
TEST_F(AcmSenderBitExactnessOldApi, MAYBE_G722_20ms) {
|
||||
ASSERT_NO_FATAL_FAILURE(SetUpTest("G722", 16000, 1, 9, 320, 160));
|
||||
Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
|
||||
@ -1451,14 +1450,12 @@ TEST_F(AcmSenderBitExactnessOldApi, MAYBE_G722_20ms) {
|
||||
"android_arm64_payload", "android_arm64_clang_payload"),
|
||||
50, test::AcmReceiveTestOldApi::kMonoOutput);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(WEBRTC_ANDROID)
|
||||
#define MAYBE_G722_stereo_20ms DISABLED_G722_stereo_20ms
|
||||
#else
|
||||
#define MAYBE_G722_stereo_20ms G722_stereo_20ms
|
||||
#endif
|
||||
#if defined(WEBRTC_CODEC_G722)
|
||||
TEST_F(AcmSenderBitExactnessOldApi, MAYBE_G722_stereo_20ms) {
|
||||
ASSERT_NO_FATAL_FAILURE(SetUpTest("G722", 16000, 2, 119, 320, 160));
|
||||
Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
|
||||
@ -1471,7 +1468,6 @@ TEST_F(AcmSenderBitExactnessOldApi, MAYBE_G722_stereo_20ms) {
|
||||
"android_arm64_payload", "android_arm64_clang_payload"),
|
||||
50, test::AcmReceiveTestOldApi::kStereoOutput);
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST_F(AcmSenderBitExactnessOldApi, Opus_stereo_20ms) {
|
||||
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/g711/audio_encoder_pcm.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#ifdef WEBRTC_CODEC_G722
|
||||
#include "modules/audio_coding/codecs/g722/audio_encoder_g722.h"
|
||||
#endif
|
||||
#ifdef WEBRTC_CODEC_ILBC
|
||||
#include "modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.h"
|
||||
#endif
|
||||
@ -175,10 +173,8 @@ std::unique_ptr<AudioEncoder> CreateEncoder(
|
||||
if (STR_CASE_CMP(speech_inst.plname, "ilbc") == 0)
|
||||
return std::unique_ptr<AudioEncoder>(new AudioEncoderIlbcImpl(speech_inst));
|
||||
#endif
|
||||
#ifdef WEBRTC_CODEC_G722
|
||||
if (STR_CASE_CMP(speech_inst.plname, "g722") == 0)
|
||||
return std::unique_ptr<AudioEncoder>(new AudioEncoderG722Impl(speech_inst));
|
||||
#endif
|
||||
LOG_F(LS_ERROR) << "Could not create encoder of type " << speech_inst.plname;
|
||||
return std::unique_ptr<AudioEncoder>();
|
||||
}
|
||||
|
||||
@ -58,10 +58,8 @@ class RentACodec {
|
||||
#ifdef WEBRTC_CODEC_ILBC
|
||||
kILBC,
|
||||
#endif
|
||||
#ifdef WEBRTC_CODEC_G722
|
||||
kG722, // Mono
|
||||
kG722_2ch, // Stereo
|
||||
#endif
|
||||
#ifdef WEBRTC_CODEC_OPUS
|
||||
kOpus, // Mono and stereo
|
||||
#endif
|
||||
@ -92,10 +90,6 @@ class RentACodec {
|
||||
#ifndef WEBRTC_CODEC_ILBC
|
||||
kILBC = -1,
|
||||
#endif
|
||||
#ifndef WEBRTC_CODEC_G722
|
||||
kG722 = -1, // Mono
|
||||
kG722_2ch = -1, // Stereo
|
||||
#endif
|
||||
#ifndef WEBRTC_CODEC_OPUS
|
||||
kOpus = -1, // Mono and stereo
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user