RentACodec: New class that takes over part of ACMCodecDB's job
Following CLs will finish the takeover completely. After that,
RentACodec will also start creating and owning codecs, at which point
its name will start making sense.
BUG=webrtc:5028
Review URL: https://codereview.webrtc.org/1412683006
Cr-Commit-Position: refs/heads/master@{#10432}
diff --git a/webrtc/modules/audio_coding/BUILD.gn b/webrtc/modules/audio_coding/BUILD.gn
index 7bbcd3a..d9a1a02 100644
--- a/webrtc/modules/audio_coding/BUILD.gn
+++ b/webrtc/modules/audio_coding/BUILD.gn
@@ -9,6 +9,39 @@
import("//build/config/arm.gni")
import("../../build/webrtc.gni")
+source_set("rent_a_codec") {
+ sources = [
+ "main/acm2/acm_codec_database.cc",
+ "main/acm2/acm_codec_database.h",
+ "main/acm2/rent_a_codec.cc",
+ "main/acm2/rent_a_codec.h",
+ ]
+ configs += [ "../..:common_config" ]
+ public_configs = [ "../..:common_inherited_config" ]
+ deps = [
+ "../..:webrtc_common",
+ ]
+
+ defines = []
+ if (rtc_include_opus) {
+ defines += [ "WEBRTC_CODEC_OPUS" ]
+ }
+ if (!build_with_mozilla) {
+ if (current_cpu == "arm") {
+ defines += [ "WEBRTC_CODEC_ISACFX" ]
+ } else {
+ defines += [ "WEBRTC_CODEC_ISAC" ]
+ }
+ defines += [ "WEBRTC_CODEC_G722" ]
+ }
+ if (!build_with_mozilla && !build_with_chromium) {
+ defines += [
+ "WEBRTC_CODEC_ILBC",
+ "WEBRTC_CODEC_RED",
+ ]
+ }
+}
+
config("audio_coding_config") {
include_dirs = [
"main/interface",
@@ -18,8 +51,6 @@
source_set("audio_coding") {
sources = [
- "main/acm2/acm_codec_database.cc",
- "main/acm2/acm_codec_database.h",
"main/acm2/acm_common_defs.h",
"main/acm2/acm_receiver.cc",
"main/acm2/acm_receiver.h",
@@ -69,6 +100,7 @@
":g711",
":neteq",
":pcm16b",
+ ":rent_a_codec",
"../..:rtc_event_log",
"../..:webrtc_common",
"../../common_audio",