blob: 01dc12459eeb3cff9eed0ae15b12b8938a082757 [file] [log] [blame]
kwiberg087bd342017-02-10 08:15:44 -08001# Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
9import("../../webrtc.gni")
10if (is_android) {
11 import("//build/config/android/config.gni")
12 import("//build/config/android/rules.gni")
13}
14
15rtc_source_set("audio_codecs_api") {
16 sources = [
17 "audio_decoder.cc",
18 "audio_decoder.h",
19 "audio_decoder_factory.h",
kwiberg0eacd882017-06-17 15:45:28 -070020 "audio_decoder_factory_template.h",
ossueb1fde42017-05-02 06:46:30 -070021 "audio_encoder.cc",
22 "audio_encoder.h",
23 "audio_encoder_factory.h",
kwiberg65315832017-06-16 10:42:05 -070024 "audio_encoder_factory_template.h",
kwiberg087bd342017-02-10 08:15:44 -080025 "audio_format.cc",
26 "audio_format.h",
27 ]
28 deps = [
kwiberg529662a2017-09-04 05:43:17 -070029 "..:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -070030 "..:optional",
kwiberg087bd342017-02-10 08:15:44 -080031 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +010032 "../../:typedefs",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010033 "../../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +010034 "../../rtc_base:deprecation",
ehmaldonadof6a861a2017-07-19 10:40:47 -070035 "../../rtc_base:rtc_base_approved",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010036 "../../rtc_base:sanitizer",
kwiberg087bd342017-02-10 08:15:44 -080037 ]
38}
39
40rtc_static_library("builtin_audio_decoder_factory") {
41 sources = [
42 "builtin_audio_decoder_factory.cc",
43 "builtin_audio_decoder_factory.h",
44 ]
45 deps = [
46 ":audio_codecs_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -070047 "../../rtc_base:rtc_base_approved",
kwiberge5eb7242017-08-25 03:10:50 -070048 "L16:audio_decoder_L16",
49 "g711:audio_decoder_g711",
Karl Wibergeb254b42017-11-01 15:08:12 +010050 "g722:audio_decoder_g722",
51 "isac:audio_decoder_isac",
kwiberg087bd342017-02-10 08:15:44 -080052 ]
kwiberge5eb7242017-08-25 03:10:50 -070053 defines = []
54 if (rtc_include_ilbc) {
55 deps += [ "ilbc:audio_decoder_ilbc" ]
56 defines += [ "WEBRTC_USE_BUILTIN_ILBC=1" ]
57 } else {
58 defines += [ "WEBRTC_USE_BUILTIN_ILBC=0" ]
59 }
60 if (rtc_include_opus) {
61 deps += [ "opus:audio_decoder_opus" ]
62 defines += [ "WEBRTC_USE_BUILTIN_OPUS=1" ]
63 } else {
64 defines += [ "WEBRTC_USE_BUILTIN_OPUS=0" ]
65 }
kwiberg087bd342017-02-10 08:15:44 -080066}
ossueb1fde42017-05-02 06:46:30 -070067
68rtc_static_library("builtin_audio_encoder_factory") {
69 sources = [
70 "builtin_audio_encoder_factory.cc",
71 "builtin_audio_encoder_factory.h",
72 ]
73 deps = [
74 ":audio_codecs_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -070075 "../../rtc_base:rtc_base_approved",
kwiberge5eb7242017-08-25 03:10:50 -070076 "L16:audio_encoder_L16",
77 "g711:audio_encoder_g711",
Karl Wibergeb254b42017-11-01 15:08:12 +010078 "g722:audio_encoder_g722",
79 "isac:audio_encoder_isac",
ossueb1fde42017-05-02 06:46:30 -070080 ]
kwiberge5eb7242017-08-25 03:10:50 -070081 defines = []
82 if (rtc_include_ilbc) {
83 deps += [ "ilbc:audio_encoder_ilbc" ]
84 defines += [ "WEBRTC_USE_BUILTIN_ILBC=1" ]
85 } else {
86 defines += [ "WEBRTC_USE_BUILTIN_ILBC=0" ]
87 }
88 if (rtc_include_opus) {
89 deps += [ "opus:audio_encoder_opus" ]
90 defines += [ "WEBRTC_USE_BUILTIN_OPUS=1" ]
91 } else {
92 defines += [ "WEBRTC_USE_BUILTIN_OPUS=0" ]
93 }
ossueb1fde42017-05-02 06:46:30 -070094}