blob: d415098e981bb7cf203cbc46b84ac76d48acfb5b [file] [log] [blame]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +00001# Copyright (c) 2014 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
mbonadei9aa3f0a2017-01-24 06:58:22 -08009import("../../webrtc.gni")
kjellanderfb114242016-06-13 00:19:48 -070010import("audio_coding.gni")
11import("//build/config/arm.gni")
kjellanderfb114242016-06-13 00:19:48 -070012import("//third_party/protobuf/proto_library.gni")
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000013
kwiberg0edb05b2016-01-19 05:54:28 -080014audio_codec_deps = [
15 ":cng",
16 ":g711",
17 ":pcm16b",
18]
kwiberg0edb05b2016-01-19 05:54:28 -080019if (rtc_include_ilbc) {
kwiberg0edb05b2016-01-19 05:54:28 -080020 audio_codec_deps += [ ":ilbc" ]
21}
22if (rtc_include_opus) {
kwiberg0edb05b2016-01-19 05:54:28 -080023 audio_codec_deps += [ ":webrtc_opus" ]
24}
25if (!build_with_mozilla) {
26 if (current_cpu == "arm") {
kwiberg0edb05b2016-01-19 05:54:28 -080027 audio_codec_deps += [ ":isac_fix" ]
28 } else {
kwiberg0edb05b2016-01-19 05:54:28 -080029 audio_codec_deps += [ ":isac" ]
30 }
kwiberg0edb05b2016-01-19 05:54:28 -080031 audio_codec_deps += [ ":g722" ]
32}
33if (!build_with_mozilla && !build_with_chromium) {
kwiberg0edb05b2016-01-19 05:54:28 -080034 audio_codec_deps += [ ":red" ]
35}
kjellanderfb114242016-06-13 00:19:48 -070036audio_coding_deps = audio_codec_deps + [
37 "../..:webrtc_common",
38 "../../common_audio",
39 "../../system_wrappers",
40 ]
kwiberg0edb05b2016-01-19 05:54:28 -080041
kwibergda2bf4e2016-10-24 13:47:09 -070042rtc_static_library("audio_format_conversion") {
43 sources = [
44 "codecs/audio_format_conversion.cc",
45 "codecs/audio_format_conversion.h",
46 ]
47 deps = [
kwiberga6b82982016-10-24 16:31:17 -070048 "../..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -070049 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -070050 "../../api:optional",
kwiberg087bd342017-02-10 08:15:44 -080051 "../../api/audio_codecs:audio_codecs_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -070052 "../../rtc_base:rtc_base_approved",
kwibergda2bf4e2016-10-24 13:47:09 -070053 ]
54}
55
kjellanderb62dbbe2016-09-23 00:38:52 -070056rtc_static_library("rent_a_codec") {
kwibergfce4a942015-10-27 11:40:24 -070057 sources = [
kjellander3e6db232015-11-26 04:44:54 -080058 "acm2/acm_codec_database.cc",
59 "acm2/acm_codec_database.h",
60 "acm2/rent_a_codec.cc",
61 "acm2/rent_a_codec.h",
kwibergfce4a942015-10-27 11:40:24 -070062 ]
kjellander676e08f2016-12-07 08:23:27 -080063 deps = [
kwiberg529662a2017-09-04 05:43:17 -070064 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -070065 "../../api:optional",
kwiberg087bd342017-02-10 08:15:44 -080066 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -080067 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -070068 "../../rtc_base:protobuf_utils",
69 "../../rtc_base:rtc_base_approved",
kwiberg65cb70d2017-03-03 06:16:28 -080070 "../../system_wrappers",
71 ":audio_coding_module_typedefs",
kwiberg65cb70d2017-03-03 06:16:28 -080072 ":isac_common",
73 ":isac_fix_c",
74 ":neteq_decoder_enum",
kjellander676e08f2016-12-07 08:23:27 -080075 ] + audio_codec_deps
mbonadei7c2c8432017-04-07 00:59:12 -070076
kwiberg0edb05b2016-01-19 05:54:28 -080077 defines = audio_codec_defines
kwibergfce4a942015-10-27 11:40:24 -070078}
79
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000080config("audio_coding_config") {
81 include_dirs = [
kjellander3e6db232015-11-26 04:44:54 -080082 "include",
Henrik Kjellanderff761fb2015-11-04 08:31:52 +010083 "../include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000084 ]
85}
86
kwiberg65cb70d2017-03-03 06:16:28 -080087rtc_source_set("audio_coding_module_typedefs") {
88 sources = [
89 "include/audio_coding_module_typedefs.h",
90 ]
91 deps = [
mbonadei1140f972017-04-26 03:38:35 -070092 "..:module_api",
kwiberg65cb70d2017-03-03 06:16:28 -080093 "../..:webrtc_common",
94 ]
95}
96
kjellanderb62dbbe2016-09-23 00:38:52 -070097rtc_static_library("audio_coding") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000098 sources = [
kjellander3e6db232015-11-26 04:44:54 -080099 "acm2/acm_receiver.cc",
100 "acm2/acm_receiver.h",
101 "acm2/acm_resampler.cc",
102 "acm2/acm_resampler.h",
103 "acm2/audio_coding_module.cc",
kjellander3e6db232015-11-26 04:44:54 -0800104 "acm2/call_statistics.cc",
105 "acm2/call_statistics.h",
106 "acm2/codec_manager.cc",
107 "acm2/codec_manager.h",
kjellander3e6db232015-11-26 04:44:54 -0800108 "include/audio_coding_module.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000109 ]
110
111 defines = []
112
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700113 public_configs = [ ":audio_coding_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000114
kjellanderfb114242016-06-13 00:19:48 -0700115 if (rtc_include_opus) {
116 public_deps = [
117 ":webrtc_opus",
118 ]
119 }
120
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +0000121 if (is_win) {
122 cflags = [
123 # TODO(kjellander): Bug 261: fix this warning.
124 "/wd4373", # virtual function override.
125 ]
126 }
127
kjellanderfb114242016-06-13 00:19:48 -0700128 deps = audio_coding_deps + [
mbonadei1140f972017-04-26 03:38:35 -0700129 "..:module_api",
kwiberg529662a2017-09-04 05:43:17 -0700130 "../../api:array_view",
kwiberg087bd342017-02-10 08:15:44 -0800131 "../../api/audio_codecs:audio_codecs_api",
132 "../../api/audio_codecs:builtin_audio_decoder_factory",
kwiberg65cb70d2017-03-03 06:16:28 -0800133 ":audio_coding_module_typedefs",
kwiberg0edb05b2016-01-19 05:54:28 -0800134 ":neteq",
135 ":rent_a_codec",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700136 "../../rtc_base:rtc_base_approved",
kwiberg84f6a3f2017-09-05 08:43:13 -0700137 "../../api:optional",
skvladcc91d282016-10-03 18:31:22 -0700138 "../../logging:rtc_event_log_api",
kwiberg0edb05b2016-01-19 05:54:28 -0800139 ]
kjellanderfb114242016-06-13 00:19:48 -0700140 defines = audio_coding_defines
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000141}
142
kwiberg087bd342017-02-10 08:15:44 -0800143rtc_static_library("legacy_encoded_audio_frame") {
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000144 sources = [
ossu7f40ba42016-09-21 05:50:37 -0700145 "codecs/legacy_encoded_audio_frame.cc",
146 "codecs/legacy_encoded_audio_frame.h",
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000147 ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200148 deps = [
kwiberg529662a2017-09-04 05:43:17 -0700149 "../../api:array_view",
kwiberg087bd342017-02-10 08:15:44 -0800150 "../../api/audio_codecs:audio_codecs_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700151 "../../rtc_base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200152 ]
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000153}
154
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000155config("cng_config") {
156 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000157 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000158 "codecs/cng/include",
159 ]
160}
161
kjellanderb62dbbe2016-09-23 00:38:52 -0700162rtc_static_library("cng") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000163 sources = [
henrik.lundin@webrtc.orgff1a3e32014-12-10 07:29:08 +0000164 "codecs/cng/audio_encoder_cng.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100165 "codecs/cng/audio_encoder_cng.h",
ossu97ba30e2016-04-25 07:55:58 -0700166 "codecs/cng/webrtc_cng.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100167 "codecs/cng/webrtc_cng.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000168 ]
169
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700170 public_configs = [ ":cng_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000171
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000172 deps = [
kjellander676e08f2016-12-07 08:23:27 -0800173 "../..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -0700174 "../../api:array_view",
ossueb1fde42017-05-02 06:46:30 -0700175 "../../api/audio_codecs:audio_codecs_api",
Henrik Lundind048aa02015-12-03 17:47:21 +0100176 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700177 "../../rtc_base:rtc_base_approved",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000178 ]
179}
180
181config("red_config") {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200182 include_dirs = [ "codecs/red" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000183}
184
kjellanderb62dbbe2016-09-23 00:38:52 -0700185rtc_static_library("red") {
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000186 sources = [
187 "codecs/red/audio_encoder_copy_red.cc",
188 "codecs/red/audio_encoder_copy_red.h",
189 ]
190
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700191 public_configs = [ ":red_config" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000192
193 deps = [
ossueb1fde42017-05-02 06:46:30 -0700194 "../../api/audio_codecs:audio_codecs_api",
Henrik Lundind048aa02015-12-03 17:47:21 +0100195 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700196 "../../rtc_base:rtc_base_approved",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000197 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000198}
199
200config("g711_config") {
201 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000202 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000203 "codecs/g711/include",
204 ]
205}
206
kjellanderb62dbbe2016-09-23 00:38:52 -0700207rtc_static_library("g711") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000208 sources = [
kwiberg6faf5be2015-09-22 06:16:51 -0700209 "codecs/g711/audio_decoder_pcm.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100210 "codecs/g711/audio_decoder_pcm.h",
henrik.lundin@webrtc.orgdef1e972014-10-21 12:48:29 +0000211 "codecs/g711/audio_encoder_pcm.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100212 "codecs/g711/audio_encoder_pcm.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000213 ]
214
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700215 public_configs = [ ":g711_config" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000216
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200217 deps = [
kwiberg087bd342017-02-10 08:15:44 -0800218 ":legacy_encoded_audio_frame",
kjellander676e08f2016-12-07 08:23:27 -0800219 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -0800220 "../../api/audio_codecs:audio_codecs_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700221 "../../rtc_base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200222 ]
kjellander7439f972016-12-05 22:47:46 -0800223 public_deps = [
224 ":g711_c",
225 ]
226}
227
228rtc_source_set("g711_c") {
229 visibility = [ ":*" ] # Only targets in this file can depend on this.
230 sources = [
231 "codecs/g711/g711.c",
232 "codecs/g711/g711.h",
233 "codecs/g711/g711_interface.c",
234 "codecs/g711/g711_interface.h",
235 ]
kjellander676e08f2016-12-07 08:23:27 -0800236 deps = [
237 "../..:webrtc_common",
238 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000239}
240
241config("g722_config") {
242 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000243 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000244 "codecs/g722/include",
245 ]
246}
247
kjellanderb62dbbe2016-09-23 00:38:52 -0700248rtc_static_library("g722") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000249 sources = [
kwibergada4c132015-09-17 03:12:35 -0700250 "codecs/g722/audio_decoder_g722.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100251 "codecs/g722/audio_decoder_g722.h",
kwiberg@webrtc.org0cd55582014-12-02 11:45:51 +0000252 "codecs/g722/audio_encoder_g722.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100253 "codecs/g722/audio_encoder_g722.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000254 ]
255
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700256 public_configs = [ ":g722_config" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000257
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200258 deps = [
kwiberg087bd342017-02-10 08:15:44 -0800259 ":legacy_encoded_audio_frame",
kjellander676e08f2016-12-07 08:23:27 -0800260 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -0800261 "../../api/audio_codecs:audio_codecs_api",
kwibergb8727ae2017-06-17 17:41:59 -0700262 "../../api/audio_codecs/g722:audio_encoder_g722_config",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700263 "../../rtc_base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200264 ]
kjellander7439f972016-12-05 22:47:46 -0800265 public_deps = [
266 ":g722_c",
267 ]
268}
269
270rtc_source_set("g722_c") {
271 visibility = [ ":*" ] # Only targets in this file can depend on this.
272 sources = [
273 "codecs/g722/g722_decode.c",
274 "codecs/g722/g722_enc_dec.h",
275 "codecs/g722/g722_encode.c",
276 "codecs/g722/g722_interface.c",
277 "codecs/g722/g722_interface.h",
278 ]
kjellander676e08f2016-12-07 08:23:27 -0800279 deps = [
280 "../..:webrtc_common",
281 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000282}
283
284config("ilbc_config") {
285 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000286 "../../..",
Henrik Kjellander74640892015-10-29 11:31:02 +0100287 "codecs/ilbc/include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000288 ]
289}
290
kjellanderb62dbbe2016-09-23 00:38:52 -0700291rtc_static_library("ilbc") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000292 sources = [
kwibergfff9f172015-09-16 21:26:32 -0700293 "codecs/ilbc/audio_decoder_ilbc.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100294 "codecs/ilbc/audio_decoder_ilbc.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200295 "codecs/ilbc/audio_encoder_ilbc.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100296 "codecs/ilbc/audio_encoder_ilbc.h",
kjellander7439f972016-12-05 22:47:46 -0800297 ]
298
299 public_configs = [ ":ilbc_config" ]
300
301 deps = [
kwiberg087bd342017-02-10 08:15:44 -0800302 ":legacy_encoded_audio_frame",
kjellander676e08f2016-12-07 08:23:27 -0800303 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -0800304 "../../api/audio_codecs:audio_codecs_api",
solenbergdb3c9b02017-06-28 02:05:04 -0700305 "../../api/audio_codecs/ilbc:audio_encoder_ilbc_config",
kjellander7439f972016-12-05 22:47:46 -0800306 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700307 "../../rtc_base:rtc_base_approved",
kjellander7439f972016-12-05 22:47:46 -0800308 ]
309 public_deps = [
310 ":ilbc_c",
311 ]
312}
313
314rtc_source_set("ilbc_c") {
315 visibility = [ ":*" ] # Only targets in this file can depend on this.
316 sources = [
317 "codecs/ilbc/abs_quant.c",
318 "codecs/ilbc/abs_quant.h",
319 "codecs/ilbc/abs_quant_loop.c",
320 "codecs/ilbc/abs_quant_loop.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000321 "codecs/ilbc/augmented_cb_corr.c",
322 "codecs/ilbc/augmented_cb_corr.h",
323 "codecs/ilbc/bw_expand.c",
324 "codecs/ilbc/bw_expand.h",
325 "codecs/ilbc/cb_construct.c",
326 "codecs/ilbc/cb_construct.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200327 "codecs/ilbc/cb_mem_energy.c",
328 "codecs/ilbc/cb_mem_energy.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000329 "codecs/ilbc/cb_mem_energy_augmentation.c",
330 "codecs/ilbc/cb_mem_energy_augmentation.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000331 "codecs/ilbc/cb_mem_energy_calc.c",
332 "codecs/ilbc/cb_mem_energy_calc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000333 "codecs/ilbc/cb_search.c",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200334 "codecs/ilbc/cb_search.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000335 "codecs/ilbc/cb_search_core.c",
336 "codecs/ilbc/cb_search_core.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000337 "codecs/ilbc/cb_update_best_index.c",
338 "codecs/ilbc/cb_update_best_index.h",
339 "codecs/ilbc/chebyshev.c",
340 "codecs/ilbc/chebyshev.h",
341 "codecs/ilbc/comp_corr.c",
342 "codecs/ilbc/comp_corr.h",
343 "codecs/ilbc/constants.c",
344 "codecs/ilbc/constants.h",
345 "codecs/ilbc/create_augmented_vec.c",
346 "codecs/ilbc/create_augmented_vec.h",
347 "codecs/ilbc/decode.c",
348 "codecs/ilbc/decode.h",
349 "codecs/ilbc/decode_residual.c",
350 "codecs/ilbc/decode_residual.h",
351 "codecs/ilbc/decoder_interpolate_lsf.c",
352 "codecs/ilbc/decoder_interpolate_lsf.h",
353 "codecs/ilbc/defines.h",
354 "codecs/ilbc/do_plc.c",
355 "codecs/ilbc/do_plc.h",
356 "codecs/ilbc/encode.c",
357 "codecs/ilbc/encode.h",
358 "codecs/ilbc/energy_inverse.c",
359 "codecs/ilbc/energy_inverse.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200360 "codecs/ilbc/enh_upsample.c",
361 "codecs/ilbc/enh_upsample.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000362 "codecs/ilbc/enhancer.c",
363 "codecs/ilbc/enhancer.h",
364 "codecs/ilbc/enhancer_interface.c",
365 "codecs/ilbc/enhancer_interface.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000366 "codecs/ilbc/filtered_cb_vecs.c",
367 "codecs/ilbc/filtered_cb_vecs.h",
368 "codecs/ilbc/frame_classify.c",
369 "codecs/ilbc/frame_classify.h",
370 "codecs/ilbc/gain_dequant.c",
371 "codecs/ilbc/gain_dequant.h",
372 "codecs/ilbc/gain_quant.c",
373 "codecs/ilbc/gain_quant.h",
374 "codecs/ilbc/get_cd_vec.c",
375 "codecs/ilbc/get_cd_vec.h",
376 "codecs/ilbc/get_lsp_poly.c",
377 "codecs/ilbc/get_lsp_poly.h",
378 "codecs/ilbc/get_sync_seq.c",
379 "codecs/ilbc/get_sync_seq.h",
380 "codecs/ilbc/hp_input.c",
381 "codecs/ilbc/hp_input.h",
382 "codecs/ilbc/hp_output.c",
383 "codecs/ilbc/hp_output.h",
384 "codecs/ilbc/ilbc.c",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100385 "codecs/ilbc/ilbc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000386 "codecs/ilbc/index_conv_dec.c",
387 "codecs/ilbc/index_conv_dec.h",
388 "codecs/ilbc/index_conv_enc.c",
389 "codecs/ilbc/index_conv_enc.h",
390 "codecs/ilbc/init_decode.c",
391 "codecs/ilbc/init_decode.h",
392 "codecs/ilbc/init_encode.c",
393 "codecs/ilbc/init_encode.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000394 "codecs/ilbc/interpolate.c",
395 "codecs/ilbc/interpolate.h",
396 "codecs/ilbc/interpolate_samples.c",
397 "codecs/ilbc/interpolate_samples.h",
398 "codecs/ilbc/lpc_encode.c",
399 "codecs/ilbc/lpc_encode.h",
400 "codecs/ilbc/lsf_check.c",
401 "codecs/ilbc/lsf_check.h",
402 "codecs/ilbc/lsf_interpolate_to_poly_dec.c",
403 "codecs/ilbc/lsf_interpolate_to_poly_dec.h",
404 "codecs/ilbc/lsf_interpolate_to_poly_enc.c",
405 "codecs/ilbc/lsf_interpolate_to_poly_enc.h",
406 "codecs/ilbc/lsf_to_lsp.c",
407 "codecs/ilbc/lsf_to_lsp.h",
408 "codecs/ilbc/lsf_to_poly.c",
409 "codecs/ilbc/lsf_to_poly.h",
410 "codecs/ilbc/lsp_to_lsf.c",
411 "codecs/ilbc/lsp_to_lsf.h",
412 "codecs/ilbc/my_corr.c",
413 "codecs/ilbc/my_corr.h",
414 "codecs/ilbc/nearest_neighbor.c",
415 "codecs/ilbc/nearest_neighbor.h",
416 "codecs/ilbc/pack_bits.c",
417 "codecs/ilbc/pack_bits.h",
418 "codecs/ilbc/poly_to_lsf.c",
419 "codecs/ilbc/poly_to_lsf.h",
420 "codecs/ilbc/poly_to_lsp.c",
421 "codecs/ilbc/poly_to_lsp.h",
422 "codecs/ilbc/refiner.c",
423 "codecs/ilbc/refiner.h",
424 "codecs/ilbc/simple_interpolate_lsf.c",
425 "codecs/ilbc/simple_interpolate_lsf.h",
426 "codecs/ilbc/simple_lpc_analysis.c",
427 "codecs/ilbc/simple_lpc_analysis.h",
428 "codecs/ilbc/simple_lsf_dequant.c",
429 "codecs/ilbc/simple_lsf_dequant.h",
430 "codecs/ilbc/simple_lsf_quant.c",
431 "codecs/ilbc/simple_lsf_quant.h",
432 "codecs/ilbc/smooth.c",
433 "codecs/ilbc/smooth.h",
434 "codecs/ilbc/smooth_out_data.c",
435 "codecs/ilbc/smooth_out_data.h",
436 "codecs/ilbc/sort_sq.c",
437 "codecs/ilbc/sort_sq.h",
438 "codecs/ilbc/split_vq.c",
439 "codecs/ilbc/split_vq.h",
440 "codecs/ilbc/state_construct.c",
441 "codecs/ilbc/state_construct.h",
442 "codecs/ilbc/state_search.c",
443 "codecs/ilbc/state_search.h",
444 "codecs/ilbc/swap_bytes.c",
445 "codecs/ilbc/swap_bytes.h",
446 "codecs/ilbc/unpack_bits.c",
447 "codecs/ilbc/unpack_bits.h",
448 "codecs/ilbc/vq3.c",
449 "codecs/ilbc/vq3.h",
450 "codecs/ilbc/vq4.c",
451 "codecs/ilbc/vq4.h",
452 "codecs/ilbc/window32_w32.c",
453 "codecs/ilbc/window32_w32.h",
454 "codecs/ilbc/xcorr_coef.c",
455 "codecs/ilbc/xcorr_coef.h",
456 ]
457
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700458 public_configs = [ ":ilbc_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000459
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000460 deps = [
kjellander676e08f2016-12-07 08:23:27 -0800461 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -0800462 "../../api/audio_codecs:audio_codecs_api",
Henrik Lundind048aa02015-12-03 17:47:21 +0100463 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700464 "../../rtc_base:rtc_base_approved",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000465 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000466}
467
kjellanderb62dbbe2016-09-23 00:38:52 -0700468rtc_static_library("isac_common") {
kwiberg608c3cf2015-08-24 02:03:23 -0700469 sources = [
470 "codecs/isac/audio_encoder_isac_t.h",
471 "codecs/isac/audio_encoder_isac_t_impl.h",
472 "codecs/isac/locked_bandwidth_info.cc",
473 "codecs/isac/locked_bandwidth_info.h",
474 ]
kjellander676e08f2016-12-07 08:23:27 -0800475 deps = [
kwiberga6ca5182017-01-30 05:28:54 -0800476 "../..:webrtc_common",
ossua1a040a2017-04-06 10:03:21 -0700477 "../../api/audio_codecs:audio_codecs_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700478 "../../rtc_base:rtc_base_approved",
kjellander676e08f2016-12-07 08:23:27 -0800479 ]
kwiberg608c3cf2015-08-24 02:03:23 -0700480}
481
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000482config("isac_config") {
483 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000484 "../../..",
Henrik Kjellander74640892015-10-29 11:31:02 +0100485 "codecs/isac/main/include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000486 ]
487}
488
kjellanderb62dbbe2016-09-23 00:38:52 -0700489rtc_static_library("isac") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000490 sources = [
kwiberga6ca5182017-01-30 05:28:54 -0800491 "codecs/isac/main/include/audio_decoder_isac.h",
492 "codecs/isac/main/include/audio_encoder_isac.h",
kjellander7439f972016-12-05 22:47:46 -0800493 "codecs/isac/main/source/audio_decoder_isac.cc",
494 "codecs/isac/main/source/audio_encoder_isac.cc",
495 ]
496
497 deps = [
kjellander7439f972016-12-05 22:47:46 -0800498 ":isac_common",
kwiberg087bd342017-02-10 08:15:44 -0800499 "../../api/audio_codecs:audio_codecs_api",
kjellander7439f972016-12-05 22:47:46 -0800500 ]
501 public_deps = [
502 ":isac_c",
503 ]
504}
505
506rtc_static_library("isac_c") {
507 visibility = [ ":*" ] # Only targets in this file can depend on this.
508 sources = [
Henrik Kjellander74640892015-10-29 11:31:02 +0100509 "codecs/isac/main/include/isac.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000510 "codecs/isac/main/source/arith_routines.c",
511 "codecs/isac/main/source/arith_routines.h",
512 "codecs/isac/main/source/arith_routines_hist.c",
513 "codecs/isac/main/source/arith_routines_logist.c",
514 "codecs/isac/main/source/bandwidth_estimator.c",
515 "codecs/isac/main/source/bandwidth_estimator.h",
516 "codecs/isac/main/source/codec.h",
517 "codecs/isac/main/source/crc.c",
518 "codecs/isac/main/source/crc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000519 "codecs/isac/main/source/decode.c",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200520 "codecs/isac/main/source/decode_bwe.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000521 "codecs/isac/main/source/encode.c",
522 "codecs/isac/main/source/encode_lpc_swb.c",
523 "codecs/isac/main/source/encode_lpc_swb.h",
524 "codecs/isac/main/source/entropy_coding.c",
525 "codecs/isac/main/source/entropy_coding.h",
526 "codecs/isac/main/source/fft.c",
527 "codecs/isac/main/source/fft.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200528 "codecs/isac/main/source/filter_functions.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000529 "codecs/isac/main/source/filterbank_tables.c",
530 "codecs/isac/main/source/filterbank_tables.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200531 "codecs/isac/main/source/filterbanks.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000532 "codecs/isac/main/source/intialize.c",
533 "codecs/isac/main/source/isac.c",
Karl Wiberg74043682015-09-22 19:31:40 +0200534 "codecs/isac/main/source/isac_float_type.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000535 "codecs/isac/main/source/lattice.c",
536 "codecs/isac/main/source/lpc_analysis.c",
537 "codecs/isac/main/source/lpc_analysis.h",
538 "codecs/isac/main/source/lpc_gain_swb_tables.c",
539 "codecs/isac/main/source/lpc_gain_swb_tables.h",
540 "codecs/isac/main/source/lpc_shape_swb12_tables.c",
541 "codecs/isac/main/source/lpc_shape_swb12_tables.h",
542 "codecs/isac/main/source/lpc_shape_swb16_tables.c",
543 "codecs/isac/main/source/lpc_shape_swb16_tables.h",
544 "codecs/isac/main/source/lpc_tables.c",
545 "codecs/isac/main/source/lpc_tables.h",
546 "codecs/isac/main/source/os_specific_inline.h",
547 "codecs/isac/main/source/pitch_estimator.c",
548 "codecs/isac/main/source/pitch_estimator.h",
549 "codecs/isac/main/source/pitch_filter.c",
550 "codecs/isac/main/source/pitch_gain_tables.c",
551 "codecs/isac/main/source/pitch_gain_tables.h",
552 "codecs/isac/main/source/pitch_lag_tables.c",
553 "codecs/isac/main/source/pitch_lag_tables.h",
554 "codecs/isac/main/source/settings.h",
555 "codecs/isac/main/source/spectrum_ar_model_tables.c",
556 "codecs/isac/main/source/spectrum_ar_model_tables.h",
557 "codecs/isac/main/source/structs.h",
558 "codecs/isac/main/source/transform.c",
559 ]
560
561 if (is_linux) {
562 libs = [ "m" ]
563 }
564
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700565 public_configs = [ ":isac_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000566
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000567 deps = [
kjellander676e08f2016-12-07 08:23:27 -0800568 ":isac_common",
aleloicfee2152016-08-29 04:09:19 -0700569 "../..:webrtc_common",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000570 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700571 "../../rtc_base:compile_assert_c",
572 "../../rtc_base:rtc_base_approved",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000573 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000574}
575
576config("isac_fix_config") {
577 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000578 "../../..",
Henrik Kjellander74640892015-10-29 11:31:02 +0100579 "codecs/isac/fix/include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000580 ]
581}
582
kjellanderb62dbbe2016-09-23 00:38:52 -0700583rtc_static_library("isac_fix") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000584 sources = [
kjellander7439f972016-12-05 22:47:46 -0800585 "codecs/isac/fix/source/audio_decoder_isacfix.cc",
586 "codecs/isac/fix/source/audio_encoder_isacfix.cc",
587 ]
588
589 public_configs = [ ":isac_fix_config" ]
590
591 deps = [
kjellander7439f972016-12-05 22:47:46 -0800592 ":isac_common",
kwiberg087bd342017-02-10 08:15:44 -0800593 "../../api/audio_codecs:audio_codecs_api",
kjellander7439f972016-12-05 22:47:46 -0800594 "../../common_audio",
595 "../../system_wrappers",
596 ]
597 public_deps = [
598 ":isac_fix_c",
599 ]
600
601 if (rtc_build_with_neon) {
602 deps += [ ":isac_neon" ]
603 }
604}
605
kwiberga6ca5182017-01-30 05:28:54 -0800606rtc_source_set("isac_fix_common") {
607 visibility = [ ":*" ] # Only targets in this file can depend on this.
608 sources = [
609 "codecs/isac/fix/source/codec.h",
610 "codecs/isac/fix/source/fft.c",
611 "codecs/isac/fix/source/fft.h",
612 "codecs/isac/fix/source/settings.h",
613 ]
614 public_configs = [ ":isac_fix_config" ]
615}
kjellander676e08f2016-12-07 08:23:27 -0800616
mbonadei5c0d7032017-07-06 03:48:55 -0700617rtc_source_set("isac_fix_c_arm_asm") {
618 sources = []
619 if (current_cpu == "arm" && arm_version >= 7) {
620 sources += [
621 "codecs/isac/fix/source/lattice_armv7.S",
622 "codecs/isac/fix/source/pitch_filter_armv6.S",
623 ]
624 }
625}
626
kwiberga6ca5182017-01-30 05:28:54 -0800627rtc_source_set("isac_fix_c") {
kjellander7439f972016-12-05 22:47:46 -0800628 visibility = [ ":*" ] # Only targets in this file can depend on this.
629 sources = [
Henrik Kjellander74640892015-10-29 11:31:02 +0100630 "codecs/isac/fix/include/audio_decoder_isacfix.h",
631 "codecs/isac/fix/include/audio_encoder_isacfix.h",
632 "codecs/isac/fix/include/isacfix.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000633 "codecs/isac/fix/source/arith_routines.c",
634 "codecs/isac/fix/source/arith_routines_hist.c",
635 "codecs/isac/fix/source/arith_routines_logist.c",
636 "codecs/isac/fix/source/arith_routins.h",
637 "codecs/isac/fix/source/bandwidth_estimator.c",
638 "codecs/isac/fix/source/bandwidth_estimator.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000639 "codecs/isac/fix/source/decode.c",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200640 "codecs/isac/fix/source/decode_bwe.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000641 "codecs/isac/fix/source/decode_plc.c",
642 "codecs/isac/fix/source/encode.c",
643 "codecs/isac/fix/source/entropy_coding.c",
644 "codecs/isac/fix/source/entropy_coding.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000645 "codecs/isac/fix/source/filterbank_tables.c",
646 "codecs/isac/fix/source/filterbank_tables.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200647 "codecs/isac/fix/source/filterbanks.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000648 "codecs/isac/fix/source/filters.c",
649 "codecs/isac/fix/source/initialize.c",
Karl Wiberg74043682015-09-22 19:31:40 +0200650 "codecs/isac/fix/source/isac_fix_type.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000651 "codecs/isac/fix/source/isacfix.c",
652 "codecs/isac/fix/source/lattice.c",
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700653 "codecs/isac/fix/source/lattice_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000654 "codecs/isac/fix/source/lpc_masking_model.c",
655 "codecs/isac/fix/source/lpc_masking_model.h",
656 "codecs/isac/fix/source/lpc_tables.c",
657 "codecs/isac/fix/source/lpc_tables.h",
658 "codecs/isac/fix/source/pitch_estimator.c",
659 "codecs/isac/fix/source/pitch_estimator.h",
Ljubomir Papuga8f85dbc2015-04-21 16:52:45 -0700660 "codecs/isac/fix/source/pitch_estimator_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000661 "codecs/isac/fix/source/pitch_filter.c",
Ljubomir Papuga8f85dbc2015-04-21 16:52:45 -0700662 "codecs/isac/fix/source/pitch_filter_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000663 "codecs/isac/fix/source/pitch_gain_tables.c",
664 "codecs/isac/fix/source/pitch_gain_tables.h",
665 "codecs/isac/fix/source/pitch_lag_tables.c",
666 "codecs/isac/fix/source/pitch_lag_tables.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000667 "codecs/isac/fix/source/spectrum_ar_model_tables.c",
668 "codecs/isac/fix/source/spectrum_ar_model_tables.h",
669 "codecs/isac/fix/source/structs.h",
670 "codecs/isac/fix/source/transform.c",
671 "codecs/isac/fix/source/transform_tables.c",
672 ]
673
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700674 public_configs = [ ":isac_fix_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000675
kjellander676e08f2016-12-07 08:23:27 -0800676 deps = [
kjellander676e08f2016-12-07 08:23:27 -0800677 ":isac_common",
678 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -0800679 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -0800680 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700681 "../../rtc_base:compile_assert_c",
682 "../../rtc_base:rtc_base_approved",
kjellander676e08f2016-12-07 08:23:27 -0800683 "../../system_wrappers",
684 ]
685
kwiberga6ca5182017-01-30 05:28:54 -0800686 public_deps = [
687 ":isac_fix_common",
688 ]
689
mbonadeie5dc3ce2017-01-25 05:34:46 -0800690 if (rtc_build_with_neon) {
691 deps += [ ":isac_neon" ]
692 }
693
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700694 if (current_cpu == "arm" && arm_version >= 7) {
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700695 sources -= [
696 "codecs/isac/fix/source/lattice_c.c",
697 "codecs/isac/fix/source/pitch_filter_c.c",
698 ]
mbonadei5c0d7032017-07-06 03:48:55 -0700699 deps += [ ":isac_fix_c_arm_asm" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000700 }
701
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000702 if (current_cpu == "mipsel") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000703 sources += [
704 "codecs/isac/fix/source/entropy_coding_mips.c",
705 "codecs/isac/fix/source/filters_mips.c",
706 "codecs/isac/fix/source/lattice_mips.c",
707 "codecs/isac/fix/source/pitch_estimator_mips.c",
708 "codecs/isac/fix/source/transform_mips.c",
709 ]
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700710 sources -= [
711 "codecs/isac/fix/source/lattice_c.c",
712 "codecs/isac/fix/source/pitch_estimator_c.c",
713 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000714 if (mips_dsp_rev > 0) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200715 sources += [ "codecs/isac/fix/source/filterbanks_mips.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000716 }
717 if (mips_dsp_rev > 1) {
718 sources += [
719 "codecs/isac/fix/source/lpc_masking_model_mips.c",
720 "codecs/isac/fix/source/pitch_filter_mips.c",
721 ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200722 sources -= [ "codecs/isac/fix/source/pitch_filter_c.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000723 }
724 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000725}
726
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700727if (rtc_build_with_neon) {
kjellanderb62dbbe2016-09-23 00:38:52 -0700728 rtc_static_library("isac_neon") {
Zhongwei Yaof242e662015-05-06 16:39:17 +0800729 sources = [
730 "codecs/isac/fix/source/entropy_coding_neon.c",
Zhongwei Yaob3cc77f2015-07-28 11:17:40 +0800731 "codecs/isac/fix/source/filterbanks_neon.c",
Zhongwei Yaof242e662015-05-06 16:39:17 +0800732 "codecs/isac/fix/source/filters_neon.c",
733 "codecs/isac/fix/source/lattice_neon.c",
734 "codecs/isac/fix/source/transform_neon.c",
735 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000736
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700737 if (current_cpu != "arm64") {
738 # Enable compilation for the NEON instruction set. This is needed
739 # since //build/config/arm.gni only enables NEON for iOS, not Android.
740 # This provides the same functionality as webrtc/build/arm_neon.gypi.
ehmaldonado38a21322016-09-02 04:10:34 -0700741 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700742 cflags = [ "-mfpu=neon" ]
743 }
744
745 # Disable LTO on NEON targets due to compiler bug.
746 # TODO(fdegans): Enable this. See crbug.com/408997.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000747 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000748 cflags -= [
749 "-flto",
750 "-ffat-lto-objects",
751 ]
752 }
753
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200754 deps = [
kwiberga6ca5182017-01-30 05:28:54 -0800755 ":isac_fix_common",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200756 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700757 "../../rtc_base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200758 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000759 }
760}
761
762config("pcm16b_config") {
763 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000764 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000765 "codecs/pcm16b/include",
766 ]
767}
768
kjellanderb62dbbe2016-09-23 00:38:52 -0700769rtc_static_library("pcm16b") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000770 sources = [
Karl Wibergc0ac6ca2015-09-17 07:47:34 +0200771 "codecs/pcm16b/audio_decoder_pcm16b.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100772 "codecs/pcm16b/audio_decoder_pcm16b.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200773 "codecs/pcm16b/audio_encoder_pcm16b.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100774 "codecs/pcm16b/audio_encoder_pcm16b.h",
kwiberg7ea6e592017-08-16 06:12:57 -0700775 "codecs/pcm16b/pcm16b_common.cc",
776 "codecs/pcm16b/pcm16b_common.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000777 ]
778
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000779 deps = [
780 ":g711",
kwiberg087bd342017-02-10 08:15:44 -0800781 ":legacy_encoded_audio_frame",
kjellander676e08f2016-12-07 08:23:27 -0800782 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -0800783 "../../api/audio_codecs:audio_codecs_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700784 "../../rtc_base:rtc_base_approved",
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000785 ]
kjellander7439f972016-12-05 22:47:46 -0800786 public_deps = [
787 ":pcm16b_c",
788 ]
789 public_configs = [ ":pcm16b_config" ]
790}
791
792rtc_source_set("pcm16b_c") {
793 visibility = [ ":*" ] # Only targets in this file can depend on this.
794 sources = [
795 "codecs/pcm16b/pcm16b.c",
796 "codecs/pcm16b/pcm16b.h",
797 ]
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000798
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700799 public_configs = [ ":pcm16b_config" ]
kjellander676e08f2016-12-07 08:23:27 -0800800 deps = [
801 "../..:webrtc_common",
802 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000803}
804
805config("opus_config") {
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000806 include_dirs = [ "../../.." ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000807}
808
kjellanderb62dbbe2016-09-23 00:38:52 -0700809rtc_static_library("webrtc_opus") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000810 sources = [
Karl Wiberg0b058792015-09-15 17:28:18 +0200811 "codecs/opus/audio_decoder_opus.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100812 "codecs/opus/audio_decoder_opus.h",
kwiberg@webrtc.org663fdd02014-10-29 07:28:36 +0000813 "codecs/opus/audio_encoder_opus.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100814 "codecs/opus/audio_encoder_opus.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000815 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000816
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200817 deps = [
minyue41b9c802016-10-06 07:13:54 -0700818 ":audio_network_adaptor",
kjellander676e08f2016-12-07 08:23:27 -0800819 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -0700820 "../../api:optional",
kwiberg087bd342017-02-10 08:15:44 -0800821 "../../api/audio_codecs:audio_codecs_api",
kwiberg96da0112017-06-30 04:23:22 -0700822 "../../api/audio_codecs/opus:audio_encoder_opus_config",
michaelt566d8202017-01-12 10:17:38 -0800823 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700824 "../../rtc_base:rtc_base_approved",
825 "../../rtc_base:rtc_numerics",
kjellander676e08f2016-12-07 08:23:27 -0800826 "../../system_wrappers",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200827 ]
kjellander7439f972016-12-05 22:47:46 -0800828 public_deps = [
829 ":webrtc_opus_c",
kwiberge5eb7242017-08-25 03:10:50 -0700830 "../../rtc_base:protobuf_utils",
kjellander7439f972016-12-05 22:47:46 -0800831 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000832
michaelta55f0212017-02-02 07:47:19 -0800833 defines = audio_codec_defines
henrik.lundin875862c2016-11-22 02:07:54 -0800834
minyue@webrtc.org7c112f32015-03-17 14:04:56 +0000835 if (rtc_build_opus) {
kjellander7439f972016-12-05 22:47:46 -0800836 public_deps += [ rtc_opus_dir ]
837 } else if (build_with_mozilla) {
838 include_dirs = [ getenv("DIST") + "/include/opus" ]
839 }
840}
841
842rtc_source_set("webrtc_opus_c") {
843 visibility = [ ":*" ] # Only targets in this file can depend on this.
844 sources = [
845 "codecs/opus/opus_inst.h",
846 "codecs/opus/opus_interface.c",
847 "codecs/opus/opus_interface.h",
848 ]
849
minyue2e03c662017-02-01 17:31:11 -0800850 defines = audio_coding_defines
851
kjellander7439f972016-12-05 22:47:46 -0800852 if (rtc_build_opus) {
tfarina702f3972015-09-25 05:57:37 -0700853 public_deps = [
854 rtc_opus_dir,
855 ]
minyue@webrtc.org7c112f32015-03-17 14:04:56 +0000856 } else if (build_with_mozilla) {
857 include_dirs = [ getenv("DIST") + "/include/opus" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000858 }
kjellander7439f972016-12-05 22:47:46 -0800859
860 deps = [
kjellander676e08f2016-12-07 08:23:27 -0800861 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700862 "../../rtc_base:rtc_base_approved",
kjellander7439f972016-12-05 22:47:46 -0800863 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000864}
865
minyue25f6a392016-09-22 22:23:20 -0700866if (rtc_enable_protobuf) {
867 proto_library("ana_debug_dump_proto") {
868 sources = [
869 "audio_network_adaptor/debug_dump.proto",
870 ]
jbudorick58f17252017-07-26 14:49:20 -0700871 deps = [
872 ":ana_config_proto",
873 ]
sakal363a2912017-01-13 06:52:12 -0800874 proto_out_dir = "webrtc/modules/audio_coding/audio_network_adaptor"
minyue25f6a392016-09-22 22:23:20 -0700875 }
minyuea1d9ad02016-10-02 14:53:37 -0700876 proto_library("ana_config_proto") {
877 sources = [
878 "audio_network_adaptor/config.proto",
879 ]
880 proto_out_dir = "webrtc/modules/audio_coding/audio_network_adaptor"
881 }
minyue25f6a392016-09-22 22:23:20 -0700882}
883
eladalon1e7dd312017-09-12 04:38:25 -0700884rtc_static_library("audio_network_adaptor_config") {
885 sources = [
886 "audio_network_adaptor/audio_network_adaptor_config.cc",
887 "audio_network_adaptor/include/audio_network_adaptor_config.h",
888 ]
889 deps = [
890 "../../api:optional",
891 ]
892}
893
minyue0d382ef2016-10-07 07:59:28 -0700894rtc_static_library("audio_network_adaptor") {
minyue7610f852016-09-07 13:51:51 -0700895 sources = [
minyuecaa9cb22016-09-13 13:34:15 -0700896 "audio_network_adaptor/audio_network_adaptor_impl.cc",
897 "audio_network_adaptor/audio_network_adaptor_impl.h",
minyue4aec1d42016-09-21 23:01:26 -0700898 "audio_network_adaptor/bitrate_controller.cc",
899 "audio_network_adaptor/bitrate_controller.h",
minyue2e164c62016-09-14 06:47:36 -0700900 "audio_network_adaptor/channel_controller.cc",
901 "audio_network_adaptor/channel_controller.h",
minyuecaa9cb22016-09-13 13:34:15 -0700902 "audio_network_adaptor/controller.cc",
903 "audio_network_adaptor/controller.h",
904 "audio_network_adaptor/controller_manager.cc",
905 "audio_network_adaptor/controller_manager.h",
minyue25f6a392016-09-22 22:23:20 -0700906 "audio_network_adaptor/debug_dump_writer.cc",
907 "audio_network_adaptor/debug_dump_writer.h",
minyue186cd062016-09-16 05:54:39 -0700908 "audio_network_adaptor/dtx_controller.cc",
909 "audio_network_adaptor/dtx_controller.h",
minyue4b7c9522017-01-24 04:54:59 -0800910 "audio_network_adaptor/event_log_writer.cc",
911 "audio_network_adaptor/event_log_writer.h",
elad.alon6d7900d2017-03-24 04:12:56 -0700912 "audio_network_adaptor/fec_controller_plr_based.cc",
913 "audio_network_adaptor/fec_controller_plr_based.h",
914 "audio_network_adaptor/fec_controller_rplr_based.cc",
915 "audio_network_adaptor/fec_controller_rplr_based.h",
minyuee35d3292016-09-21 16:00:31 -0700916 "audio_network_adaptor/frame_length_controller.cc",
917 "audio_network_adaptor/frame_length_controller.h",
minyue7610f852016-09-07 13:51:51 -0700918 "audio_network_adaptor/include/audio_network_adaptor.h",
elad.alon326263a2017-03-29 03:16:58 -0700919 "audio_network_adaptor/util/threshold_curve.h",
minyue7610f852016-09-07 13:51:51 -0700920 ]
minyue25f6a392016-09-22 22:23:20 -0700921
eladalon1e7dd312017-09-12 04:38:25 -0700922 public_deps = [
923 ":audio_network_adaptor_config",
924 ]
925
minyue41b9c802016-10-06 07:13:54 -0700926 deps = [
927 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -0700928 "../../api:optional",
ivoce1198e02017-09-08 08:13:19 -0700929 "../../api/audio_codecs:audio_codecs_api",
kjellander676e08f2016-12-07 08:23:27 -0800930 "../../common_audio",
minyue4b7c9522017-01-24 04:54:59 -0800931 "../../logging:rtc_event_log_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700932 "../../rtc_base:protobuf_utils",
933 "../../rtc_base:rtc_base_approved",
minyue41b9c802016-10-06 07:13:54 -0700934 "../../system_wrappers",
935 ]
936
minyue25f6a392016-09-22 22:23:20 -0700937 if (rtc_enable_protobuf) {
minyue41b9c802016-10-06 07:13:54 -0700938 deps += [
minyuea1d9ad02016-10-02 14:53:37 -0700939 ":ana_config_proto",
minyue25f6a392016-09-22 22:23:20 -0700940 ":ana_debug_dump_proto",
941 ]
minyue25f6a392016-09-22 22:23:20 -0700942 }
minyue4b7c9522017-01-24 04:54:59 -0800943
944 if (!build_with_chromium && is_clang) {
945 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
946 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
947 }
minyue7610f852016-09-07 13:51:51 -0700948}
949
kwiberg65cb70d2017-03-03 06:16:28 -0800950rtc_source_set("neteq_decoder_enum") {
951 sources = [
952 "neteq/neteq_decoder_enum.cc",
953 "neteq/neteq_decoder_enum.h",
954 ]
955 deps = [
kwiberg84f6a3f2017-09-05 08:43:13 -0700956 "../../api:optional",
kwiberg65cb70d2017-03-03 06:16:28 -0800957 "../../api/audio_codecs:audio_codecs_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700958 "../../rtc_base:rtc_base_approved",
kwiberg65cb70d2017-03-03 06:16:28 -0800959 ]
960}
kjellander676e08f2016-12-07 08:23:27 -0800961
kwiberg65cb70d2017-03-03 06:16:28 -0800962rtc_static_library("neteq") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000963 sources = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000964 "neteq/accelerate.cc",
965 "neteq/accelerate.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000966 "neteq/audio_decoder_impl.cc",
967 "neteq/audio_decoder_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000968 "neteq/audio_multi_vector.cc",
969 "neteq/audio_multi_vector.h",
970 "neteq/audio_vector.cc",
971 "neteq/audio_vector.h",
972 "neteq/background_noise.cc",
973 "neteq/background_noise.h",
974 "neteq/buffer_level_filter.cc",
975 "neteq/buffer_level_filter.h",
976 "neteq/comfort_noise.cc",
977 "neteq/comfort_noise.h",
minyue53ff70f2016-05-02 01:50:30 -0700978 "neteq/cross_correlation.cc",
979 "neteq/cross_correlation.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000980 "neteq/decision_logic.cc",
981 "neteq/decision_logic.h",
982 "neteq/decision_logic_fax.cc",
983 "neteq/decision_logic_fax.h",
984 "neteq/decision_logic_normal.cc",
985 "neteq/decision_logic_normal.h",
986 "neteq/decoder_database.cc",
987 "neteq/decoder_database.h",
988 "neteq/defines.h",
989 "neteq/delay_manager.cc",
990 "neteq/delay_manager.h",
991 "neteq/delay_peak_detector.cc",
992 "neteq/delay_peak_detector.h",
993 "neteq/dsp_helper.cc",
994 "neteq/dsp_helper.h",
995 "neteq/dtmf_buffer.cc",
996 "neteq/dtmf_buffer.h",
997 "neteq/dtmf_tone_generator.cc",
998 "neteq/dtmf_tone_generator.h",
999 "neteq/expand.cc",
1000 "neteq/expand.h",
Henrik Kjellander74640892015-10-29 11:31:02 +01001001 "neteq/include/neteq.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001002 "neteq/merge.cc",
1003 "neteq/merge.h",
henrik.lundin91951862016-06-08 06:43:41 -07001004 "neteq/nack_tracker.cc",
1005 "neteq/nack_tracker.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +02001006 "neteq/neteq.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001007 "neteq/neteq_impl.cc",
1008 "neteq/neteq_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001009 "neteq/normal.cc",
1010 "neteq/normal.h",
henrik.lundin84f8cd62016-04-26 07:45:16 -07001011 "neteq/packet.cc",
1012 "neteq/packet.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001013 "neteq/packet_buffer.cc",
1014 "neteq/packet_buffer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001015 "neteq/post_decode_vad.cc",
1016 "neteq/post_decode_vad.h",
1017 "neteq/preemptive_expand.cc",
1018 "neteq/preemptive_expand.h",
1019 "neteq/random_vector.cc",
1020 "neteq/random_vector.h",
ossua70695a2016-09-22 02:06:28 -07001021 "neteq/red_payload_splitter.cc",
1022 "neteq/red_payload_splitter.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001023 "neteq/rtcp.cc",
1024 "neteq/rtcp.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +02001025 "neteq/statistics_calculator.cc",
1026 "neteq/statistics_calculator.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001027 "neteq/sync_buffer.cc",
1028 "neteq/sync_buffer.h",
henrik.lundin8053f792016-04-22 13:21:43 -07001029 "neteq/tick_timer.cc",
1030 "neteq/tick_timer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001031 "neteq/time_stretch.cc",
1032 "neteq/time_stretch.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +02001033 "neteq/timestamp_scaler.cc",
1034 "neteq/timestamp_scaler.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001035 ]
1036
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001037 deps = [
kwiberg65cb70d2017-03-03 06:16:28 -08001038 ":audio_coding_module_typedefs",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001039 ":cng",
1040 ":g711",
kjellander676e08f2016-12-07 08:23:27 -08001041 ":isac_fix",
kwiberg65cb70d2017-03-03 06:16:28 -08001042 ":neteq_decoder_enum",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001043 ":pcm16b",
mbonadei1140f972017-04-26 03:38:35 -07001044 "..:module_api",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +00001045 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -07001046 "../../api:optional",
kwiberg087bd342017-02-10 08:15:44 -08001047 "../../api/audio_codecs:audio_codecs_api",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001048 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001049 "../../rtc_base:gtest_prod",
1050 "../../rtc_base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001051 "../../system_wrappers",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001052 ]
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +00001053
1054 defines = []
1055
kwibergf8c2bac2016-01-18 06:38:32 -08001056 if (rtc_include_ilbc) {
1057 defines += [ "WEBRTC_CODEC_ILBC" ]
1058 deps += [ ":ilbc" ]
1059 }
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +00001060 if (rtc_include_opus) {
1061 defines += [ "WEBRTC_CODEC_OPUS" ]
1062 deps += [ ":webrtc_opus" ]
1063 }
kwiberg98ab3a42015-09-30 21:54:21 -07001064 if (!build_with_mozilla) {
1065 if (current_cpu == "arm") {
1066 defines += [ "WEBRTC_CODEC_ISACFX" ]
1067 deps += [ ":isac_fix" ]
1068 } else {
1069 defines += [ "WEBRTC_CODEC_ISAC" ]
1070 deps += [ ":isac" ]
1071 }
1072 defines += [ "WEBRTC_CODEC_G722" ]
1073 deps += [ ":g722" ]
1074 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +00001075}
kjellanderfb114242016-06-13 00:19:48 -07001076
henrik.lundin58466f62016-10-05 02:27:42 -07001077# Although providing only test support, this target must be outside of the
1078# rtc_include_tests conditional. The reason is that it supports fuzzer tests
1079# that ultimately are built and run as a part of the Chromium ecosystem, which
1080# does not set the rtc_include_tests flag.
henrik.lundinb637a942017-04-28 00:59:45 -07001081rtc_source_set("neteq_tools_minimal") {
henrik.lundin58466f62016-10-05 02:27:42 -07001082 sources = [
henrik.lundinb637a942017-04-28 00:59:45 -07001083 "neteq/tools/audio_sink.cc",
1084 "neteq/tools/audio_sink.h",
henrik.lundin58466f62016-10-05 02:27:42 -07001085 "neteq/tools/encode_neteq_input.cc",
1086 "neteq/tools/encode_neteq_input.h",
henrik.lundin7a38fd22017-04-28 01:35:53 -07001087 "neteq/tools/neteq_input.cc",
henrik.lundinb637a942017-04-28 00:59:45 -07001088 "neteq/tools/neteq_input.h",
henrik.lundin58466f62016-10-05 02:27:42 -07001089 "neteq/tools/neteq_test.cc",
1090 "neteq/tools/neteq_test.h",
henrik.lundinb637a942017-04-28 00:59:45 -07001091 "neteq/tools/packet.cc",
1092 "neteq/tools/packet.h",
1093 "neteq/tools/packet_source.cc",
1094 "neteq/tools/packet_source.h",
henrik.lundin58466f62016-10-05 02:27:42 -07001095 ]
1096
kjellandere40a7ee2016-10-16 23:56:12 -07001097 if (!build_with_chromium && is_clang) {
1098 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
henrik.lundin58466f62016-10-05 02:27:42 -07001099 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1100 }
kjellander676e08f2016-12-07 08:23:27 -08001101
1102 deps = [
kjellander676e08f2016-12-07 08:23:27 -08001103 ":neteq",
henrik.lundinb637a942017-04-28 00:59:45 -07001104 "..:module_api",
kjellander676e08f2016-12-07 08:23:27 -08001105 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -07001106 "../../api:optional",
ossueb1fde42017-05-02 06:46:30 -07001107 "../../api/audio_codecs:audio_codecs_api",
kwiberg087bd342017-02-10 08:15:44 -08001108 "../../api/audio_codecs:builtin_audio_decoder_factory",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001109 "../../rtc_base:rtc_base_approved",
henrik.lundinb637a942017-04-28 00:59:45 -07001110 "../rtp_rtcp",
kjellander676e08f2016-12-07 08:23:27 -08001111 ]
henrik.lundin58466f62016-10-05 02:27:42 -07001112}
1113
mbonadei3edccb92017-06-01 04:47:20 -07001114rtc_source_set("neteq_test_tools") {
1115 testonly = true
1116 sources = [
1117 "neteq/tools/audio_checksum.h",
1118 "neteq/tools/audio_loop.cc",
1119 "neteq/tools/audio_loop.h",
1120 "neteq/tools/constant_pcm_packet_source.cc",
1121 "neteq/tools/constant_pcm_packet_source.h",
1122 "neteq/tools/output_audio_file.h",
1123 "neteq/tools/output_wav_file.h",
1124 "neteq/tools/rtp_file_source.cc",
1125 "neteq/tools/rtp_file_source.h",
1126 "neteq/tools/rtp_generator.cc",
1127 "neteq/tools/rtp_generator.h",
1128 ]
1129
1130 public_configs = [ ":neteq_tools_config" ]
1131
1132 if (!build_with_chromium && is_clang) {
1133 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
1134 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1135 }
1136
1137 deps = [
1138 ":pcm16b",
1139 "..:module_api",
1140 "../..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -07001141 "../../api:array_view",
mbonadei3edccb92017-06-01 04:47:20 -07001142 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001143 "../../rtc_base:rtc_base_approved",
1144 "../../rtc_base:rtc_base_tests_utils",
mbonadei3edccb92017-06-01 04:47:20 -07001145 "../../test:rtp_test_utils",
1146 "../rtp_rtcp",
1147 ]
1148
1149 public_deps = [
1150 ":neteq_tools",
1151 ":neteq_tools_minimal",
1152 ]
1153
1154 if (rtc_enable_protobuf) {
1155 sources += [
1156 "neteq/tools/neteq_packet_source_input.cc",
1157 "neteq/tools/neteq_packet_source_input.h",
1158 ]
1159 deps += [ ":rtc_event_log_source" ]
1160 }
1161}
1162
1163config("neteq_tools_config") {
1164 include_dirs = [ "tools" ]
1165}
1166
1167rtc_source_set("neteq_tools") {
1168 sources = [
1169 "neteq/tools/fake_decode_from_file.cc",
1170 "neteq/tools/fake_decode_from_file.h",
1171 "neteq/tools/input_audio_file.cc",
1172 "neteq/tools/input_audio_file.h",
henrik.lundin3c938fc2017-06-14 06:09:58 -07001173 "neteq/tools/neteq_delay_analyzer.cc",
1174 "neteq/tools/neteq_delay_analyzer.h",
mbonadei3edccb92017-06-01 04:47:20 -07001175 "neteq/tools/neteq_replacement_input.cc",
1176 "neteq/tools/neteq_replacement_input.h",
1177 "neteq/tools/resample_input_audio_file.cc",
1178 "neteq/tools/resample_input_audio_file.h",
1179 ]
1180
1181 public_configs = [ ":neteq_tools_config" ]
1182
1183 if (!build_with_chromium && is_clang) {
1184 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
1185 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1186 }
1187
1188 deps = [
1189 "../..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -07001190 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -07001191 "../../api:optional",
mbonadei3edccb92017-06-01 04:47:20 -07001192 "../../api/audio_codecs:audio_codecs_api",
mbonadei3edccb92017-06-01 04:47:20 -07001193 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001194 "../../rtc_base:rtc_base_approved",
mbonadei3edccb92017-06-01 04:47:20 -07001195 "../rtp_rtcp",
1196 ]
1197
1198 public_deps = [
1199 ":neteq_tools_minimal",
1200 ]
1201}
1202
1203if (rtc_enable_protobuf) {
1204 rtc_static_library("rtc_event_log_source") {
1205 testonly = true
1206
1207 # TODO(kjellander): Remove (bugs.webrtc.org/6828)
1208 # Needs call.h to be moved to webrtc/api first.
1209 check_includes = false
1210
1211 sources = [
1212 "neteq/tools/rtc_event_log_source.cc",
1213 "neteq/tools/rtc_event_log_source.h",
1214 ]
1215
1216 if (!build_with_chromium && is_clang) {
1217 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
1218 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1219 }
1220
1221 deps = [
mbonadei3edccb92017-06-01 04:47:20 -07001222 "../../logging:rtc_event_log_parser",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001223 "../../rtc_base:rtc_base_approved",
mbonadei3edccb92017-06-01 04:47:20 -07001224 ]
1225 public_deps = [
1226 "../../logging:rtc_event_log_proto",
1227 ]
1228 }
1229}
1230
kjellanderfb114242016-06-13 00:19:48 -07001231if (rtc_include_tests) {
kjellander6ceab082016-10-28 05:44:03 -07001232 group("audio_coding_tests") {
1233 testonly = true
1234 public_deps = [
1235 ":RTPchange",
1236 ":RTPencode",
1237 ":RTPjitter",
1238 ":RTPtimeshift",
1239 ":acm_receive_test",
1240 ":acm_send_test",
kjellander6ceab082016-10-28 05:44:03 -07001241 ":audio_codec_speed_tests",
1242 ":audio_decoder_unittests",
1243 ":audio_decoder_unittests",
1244 ":delay_test",
1245 ":g711_test",
1246 ":g722_test",
1247 ":ilbc_test",
1248 ":insert_packet_with_timing",
1249 ":isac_api_test",
1250 ":isac_fix_test",
1251 ":isac_switch_samprate_test",
1252 ":isac_test",
1253 ":neteq_ilbc_quality_test",
1254 ":neteq_isac_quality_test",
1255 ":neteq_opus_quality_test",
1256 ":neteq_pcmu_quality_test",
1257 ":neteq_speed_test",
1258 ":rtp_analyze",
1259 ":rtpcat",
1260 ":webrtc_opus_fec_test",
1261 ]
1262 if (rtc_enable_protobuf) {
1263 public_deps += [ ":neteq_rtpplay" ]
1264 }
1265 }
1266
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001267 rtc_source_set("audio_coding_modules_tests") {
1268 testonly = true
kjellandere0629c02017-04-25 04:04:50 -07001269
1270 # Skip restricting visibility on mobile platforms since the tests on those
1271 # gets additional generated targets which would require many lines here to
1272 # cover (which would be confusing to read and hard to maintain).
1273 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -07001274 visibility = [ "..:modules_tests" ]
kjellandere0629c02017-04-25 04:04:50 -07001275 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001276 sources = [
henrik.lundina8e2c632017-05-11 07:18:06 -07001277 "test/ACMTest.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001278 "test/APITest.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001279 "test/APITest.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001280 "test/Channel.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001281 "test/Channel.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001282 "test/EncodeDecodeTest.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001283 "test/EncodeDecodeTest.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001284 "test/PCMFile.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001285 "test/PCMFile.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001286 "test/PacketLossTest.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001287 "test/PacketLossTest.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001288 "test/RTPFile.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001289 "test/RTPFile.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001290 "test/TestAllCodecs.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001291 "test/TestAllCodecs.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001292 "test/TestRedFec.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001293 "test/TestRedFec.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001294 "test/TestStereo.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001295 "test/TestStereo.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001296 "test/TestVADDTX.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001297 "test/TestVADDTX.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001298 "test/Tester.cc",
1299 "test/TwoWayCommunication.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001300 "test/TwoWayCommunication.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001301 "test/iSACTest.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001302 "test/iSACTest.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001303 "test/opus_test.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001304 "test/opus_test.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001305 "test/target_delay_unittest.cc",
1306 "test/utility.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001307 "test/utility.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001308 ]
1309 deps = [
1310 ":audio_coding",
kwiberg65cb70d2017-03-03 06:16:28 -08001311 ":audio_coding_module_typedefs",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001312 ":audio_format_conversion",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001313 ":pcm16b_c",
mbonadei1140f972017-04-26 03:38:35 -07001314 "..:module_api",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001315 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -07001316 "../../api:optional",
kwiberg087bd342017-02-10 08:15:44 -08001317 "../../api/audio_codecs:builtin_audio_decoder_factory",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001318 "../../rtc_base:rtc_base_approved",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001319 "../../system_wrappers:system_wrappers",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001320 "../../test:test_support",
1321 ]
1322 defines = audio_coding_defines
1323 if (is_win) {
1324 cflags = [
1325 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
1326 "/wd4373", # virtual function override.
1327 ]
1328 }
1329 if (!build_with_chromium && is_clang) {
1330 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
1331 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1332 }
1333 }
1334
ehmaldonado021eef32017-01-05 07:09:50 -08001335 rtc_source_set("audio_coding_perf_tests") {
1336 testonly = true
kjellandere0629c02017-04-25 04:04:50 -07001337
1338 # Skip restricting visibility on mobile platforms since the tests on those
1339 # gets additional generated targets which would require many lines here to
1340 # cover (which would be confusing to read and hard to maintain).
1341 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -07001342 visibility = [ "../..:webrtc_perf_tests" ]
kjellandere0629c02017-04-25 04:04:50 -07001343 }
ehmaldonado021eef32017-01-05 07:09:50 -08001344 sources = [
1345 "codecs/opus/opus_complexity_unittest.cc",
1346 "neteq/test/neteq_performance_unittest.cc",
1347 ]
1348 deps = [
1349 ":neteq_test_support",
henrik.lundinb637a942017-04-28 00:59:45 -07001350 ":neteq_test_tools",
ehmaldonado021eef32017-01-05 07:09:50 -08001351 ":webrtc_opus",
1352 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001353 "../../rtc_base:protobuf_utils",
1354 "../../rtc_base:rtc_base_approved",
ehmaldonado021eef32017-01-05 07:09:50 -08001355 "../../system_wrappers:system_wrappers",
1356 "../../test:test_support",
1357 ]
mbonadei7c2c8432017-04-07 00:59:12 -07001358
ehmaldonado021eef32017-01-05 07:09:50 -08001359 if (!build_with_chromium && is_clang) {
1360 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
1361 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1362 }
1363 }
1364
ehmaldonado38a21322016-09-02 04:10:34 -07001365 rtc_source_set("acm_receive_test") {
kjellanderfb114242016-06-13 00:19:48 -07001366 testonly = true
1367 sources = [
henrik.lundin2504c0a2016-10-06 01:31:32 -07001368 "acm2/acm_receive_test.cc",
1369 "acm2/acm_receive_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001370 ]
1371
kjellanderfb114242016-06-13 00:19:48 -07001372 defines = audio_coding_defines
1373
1374 deps = audio_coding_deps + [
1375 ":audio_coding",
kjellander676e08f2016-12-07 08:23:27 -08001376 ":audio_format_conversion",
kwiberg087bd342017-02-10 08:15:44 -08001377 "../../api/audio_codecs:audio_codecs_api",
1378 "../../api/audio_codecs:builtin_audio_decoder_factory",
henrik.lundinb637a942017-04-28 00:59:45 -07001379 ":neteq_tools",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001380 "../../rtc_base:rtc_base_approved",
kjellander676e08f2016-12-07 08:23:27 -08001381 "../../test:test_support",
kjellanderfb114242016-06-13 00:19:48 -07001382 "//testing/gtest",
1383 ]
1384 }
1385
ehmaldonado38a21322016-09-02 04:10:34 -07001386 rtc_source_set("acm_send_test") {
kjellanderfb114242016-06-13 00:19:48 -07001387 testonly = true
1388 sources = [
henrik.lundin2504c0a2016-10-06 01:31:32 -07001389 "acm2/acm_send_test.cc",
1390 "acm2/acm_send_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001391 ]
1392
kjellanderfb114242016-06-13 00:19:48 -07001393 defines = audio_coding_defines
1394
1395 deps = audio_coding_deps + [
1396 ":audio_coding",
henrik.lundinb637a942017-04-28 00:59:45 -07001397 ":neteq_tools",
ossueb1fde42017-05-02 06:46:30 -07001398 "../../api/audio_codecs:audio_codecs_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001399 "../../rtc_base:rtc_base_approved",
kjellander676e08f2016-12-07 08:23:27 -08001400 "../../test:test_support",
kjellanderfb114242016-06-13 00:19:48 -07001401 "//testing/gtest",
1402 ]
1403 }
1404
ehmaldonado38a21322016-09-02 04:10:34 -07001405 rtc_executable("delay_test") {
aleloi333f2062016-07-28 01:21:29 -07001406 testonly = true
1407 sources = [
1408 "test/Channel.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001409 "test/Channel.h",
aleloi333f2062016-07-28 01:21:29 -07001410 "test/PCMFile.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001411 "test/PCMFile.h",
aleloi333f2062016-07-28 01:21:29 -07001412 "test/delay_test.cc",
1413 "test/utility.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001414 "test/utility.h",
aleloi333f2062016-07-28 01:21:29 -07001415 ]
1416
aleloi333f2062016-07-28 01:21:29 -07001417 deps = [
1418 ":audio_coding",
kwiberg65cb70d2017-03-03 06:16:28 -08001419 ":audio_coding_module_typedefs",
kwibergda2bf4e2016-10-24 13:47:09 -07001420 ":audio_format_conversion",
mbonadei1140f972017-04-26 03:38:35 -07001421 "..:module_api",
aleloi333f2062016-07-28 01:21:29 -07001422 "../../:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -07001423 "../../api:optional",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001424 "../../rtc_base:rtc_base_approved",
aleloi333f2062016-07-28 01:21:29 -07001425 "../../system_wrappers",
1426 "../../system_wrappers:system_wrappers_default",
1427 "../../test:test_support",
1428 "../rtp_rtcp",
1429 "//testing/gtest",
aleloi333f2062016-07-28 01:21:29 -07001430 ]
1431 } # delay_test
1432
ehmaldonado38a21322016-09-02 04:10:34 -07001433 rtc_executable("insert_packet_with_timing") {
aleloi00730c72016-07-28 01:27:10 -07001434 testonly = true
1435 sources = [
1436 "test/Channel.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001437 "test/Channel.h",
aleloi00730c72016-07-28 01:27:10 -07001438 "test/PCMFile.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001439 "test/PCMFile.h",
aleloi00730c72016-07-28 01:27:10 -07001440 "test/insert_packet_with_timing.cc",
1441 ]
1442
kjellandere40a7ee2016-10-16 23:56:12 -07001443 if (!build_with_chromium && is_clang) {
1444 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001445 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloi00730c72016-07-28 01:27:10 -07001446 }
1447
1448 deps = [
1449 ":audio_coding",
kwibergda2bf4e2016-10-24 13:47:09 -07001450 ":audio_format_conversion",
mbonadei1140f972017-04-26 03:38:35 -07001451 "..:module_api",
aleloi00730c72016-07-28 01:27:10 -07001452 "../../:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -07001453 "../../api:optional",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001454 "../../rtc_base:rtc_base_approved",
aleloi00730c72016-07-28 01:27:10 -07001455 "../../system_wrappers",
1456 "../../system_wrappers:system_wrappers_default",
1457 "../../test:test_support",
1458 "../rtp_rtcp",
1459 "//testing/gtest",
aleloi00730c72016-07-28 01:27:10 -07001460 ]
1461 } # insert_packet_with_timing
1462
ehmaldonado3a7f35b2016-09-14 05:10:01 -07001463 audio_decoder_unittests_resources =
jianjun.zhuc0247402017-07-11 06:20:45 -07001464 [ "../../../resources/audio_coding/testfile32kHz.pcm" ]
kjellander32c4a202016-08-30 02:53:49 -07001465
1466 if (is_ios) {
1467 bundle_data("audio_decoder_unittests_bundle_data") {
1468 testonly = true
1469 sources = audio_decoder_unittests_resources
1470 outputs = [
1471 "{{bundle_resources_dir}}/{{source_file_part}}",
1472 ]
1473 }
1474 }
1475
ehmaldonado38a21322016-09-02 04:10:34 -07001476 rtc_test("audio_decoder_unittests") {
charujainddf3e4a2016-08-01 07:49:42 -07001477 testonly = true
1478 sources = [
1479 "neteq/audio_decoder_unittest.cc",
1480 ]
1481
kjellandere40a7ee2016-10-16 23:56:12 -07001482 if (!build_with_chromium && is_clang) {
1483 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001484 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
charujainddf3e4a2016-08-01 07:49:42 -07001485 }
1486
1487 deps = []
1488
1489 defines = neteq_defines
1490
1491 deps += audio_coding_deps
1492 deps += [
ehmaldonado87b8e9f2017-02-07 06:26:29 -08001493 ":ilbc",
charujainddf3e4a2016-08-01 07:49:42 -07001494 ":isac",
1495 ":isac_fix",
1496 ":neteq",
henrik.lundinb637a942017-04-28 00:59:45 -07001497 ":neteq_tools",
kwiberg087bd342017-02-10 08:15:44 -08001498 "../../api/audio_codecs:audio_codecs_api",
kwiberg96da0112017-06-30 04:23:22 -07001499 "../../api/audio_codecs/opus:audio_encoder_opus",
kjellander6ceab082016-10-28 05:44:03 -07001500 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001501 "../../rtc_base:protobuf_utils",
ehmaldonado26bddb92016-11-30 06:12:01 -08001502 "../../test:test_main",
charujainddf3e4a2016-08-01 07:49:42 -07001503 "//testing/gtest",
1504 ]
1505
ehmaldonado3a7f35b2016-09-14 05:10:01 -07001506 data = audio_decoder_unittests_resources
1507
charujainddf3e4a2016-08-01 07:49:42 -07001508 if (is_android) {
1509 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -07001510 shard_timeout = 900
charujainddf3e4a2016-08-01 07:49:42 -07001511 }
kjellander32c4a202016-08-30 02:53:49 -07001512 if (is_ios) {
1513 deps += [ ":audio_decoder_unittests_bundle_data" ]
charujainddf3e4a2016-08-01 07:49:42 -07001514 }
1515 } # audio_decoder_unittests
1516
kjellanderfb114242016-06-13 00:19:48 -07001517 if (rtc_enable_protobuf) {
1518 proto_library("neteq_unittest_proto") {
1519 sources = [
1520 "neteq/neteq_unittest.proto",
1521 ]
kjellandere3e902e2017-02-28 08:01:46 -08001522 proto_out_dir = "webrtc/modules/audio_coding/neteq"
kjellanderfb114242016-06-13 00:19:48 -07001523 }
henrik.lundin03153f12016-06-21 05:38:42 -07001524
ehmaldonado38a21322016-09-02 04:10:34 -07001525 rtc_test("neteq_rtpplay") {
henrik.lundin03153f12016-06-21 05:38:42 -07001526 testonly = true
1527 defines = []
mbonadei1140f972017-04-26 03:38:35 -07001528 deps = [
1529 "..:module_api",
1530 ]
henrik.lundin03153f12016-06-21 05:38:42 -07001531 sources = [
1532 "neteq/tools/neteq_rtpplay.cc",
1533 ]
1534
kjellandere40a7ee2016-10-16 23:56:12 -07001535 if (!build_with_chromium && is_clang) {
1536 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001537 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
henrik.lundin03153f12016-06-21 05:38:42 -07001538 }
1539
1540 if (is_win) {
1541 cflags = [
1542 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
1543 "/wd4373", # virtual function override.
1544 ]
1545 }
1546
1547 deps += [
1548 ":neteq",
henrik.lundinb637a942017-04-28 00:59:45 -07001549 ":neteq_test_tools",
kjellander676e08f2016-12-07 08:23:27 -08001550 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001551 "../../rtc_base:rtc_base_approved",
henrik.lundin03153f12016-06-21 05:38:42 -07001552 "../../system_wrappers:system_wrappers_default",
1553 "../../test:test_support",
henrik.lundin03153f12016-06-21 05:38:42 -07001554 ]
1555 }
kjellanderfb114242016-06-13 00:19:48 -07001556 }
1557
minyue81f1da32017-07-27 05:49:57 -07001558 audio_codec_speed_tests_resources = [
1559 "//resources/audio_coding/music_stereo_48kHz.pcm",
1560 "//resources/audio_coding/speech_mono_16kHz.pcm",
1561 "//resources/audio_coding/speech_mono_32_48kHz.pcm",
1562 ]
1563
1564 if (is_ios) {
1565 bundle_data("audio_codec_speed_tests_data") {
1566 testonly = true
1567 sources = audio_codec_speed_tests_resources
1568 outputs = [
1569 "{{bundle_resources_dir}}/{{source_file_part}}",
1570 ]
1571 }
1572 }
1573
ehmaldonado38a21322016-09-02 04:10:34 -07001574 rtc_test("audio_codec_speed_tests") {
aleloie6b60a42016-07-28 02:34:30 -07001575 testonly = true
1576 defines = []
1577 deps = []
1578 sources = [
1579 "codecs/isac/fix/test/isac_speed_test.cc",
1580 "codecs/opus/opus_speed_test.cc",
1581 "codecs/tools/audio_codec_speed_test.cc",
1582 "codecs/tools/audio_codec_speed_test.h",
1583 ]
1584
kjellandere40a7ee2016-10-16 23:56:12 -07001585 if (!build_with_chromium && is_clang) {
1586 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001587 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloie6b60a42016-07-28 02:34:30 -07001588 }
1589
minyue81f1da32017-07-27 05:49:57 -07001590 data = audio_codec_speed_tests_resources
1591
aleloie6b60a42016-07-28 02:34:30 -07001592 if (is_android) {
1593 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -07001594 shard_timeout = 900
aleloie6b60a42016-07-28 02:34:30 -07001595 }
1596
minyue81f1da32017-07-27 05:49:57 -07001597 if (is_ios) {
1598 deps += [ ":audio_codec_speed_tests_data" ]
1599 }
1600
aleloie6b60a42016-07-28 02:34:30 -07001601 deps += [
1602 ":isac_fix",
1603 ":webrtc_opus",
kjellander676e08f2016-12-07 08:23:27 -08001604 "../..:webrtc_common",
Stefan Holmer1acbd682017-09-01 15:29:28 +02001605 "../../api:libjingle_peerconnection_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001606 "../../rtc_base:rtc_base_approved",
Stefan Holmer1acbd682017-09-01 15:29:28 +02001607 "../../system_wrappers:metrics_default",
aleloie6b60a42016-07-28 02:34:30 -07001608 "../../system_wrappers:system_wrappers_default",
Stefan Holmer1acbd682017-09-01 15:29:28 +02001609 "../../test:field_trial",
ehmaldonado26bddb92016-11-30 06:12:01 -08001610 "../../test:test_main",
kjellander6ceab082016-10-28 05:44:03 -07001611 "../audio_processing",
aleloie6b60a42016-07-28 02:34:30 -07001612 "//testing/gtest",
1613 ]
1614 }
1615
ehmaldonado38a21322016-09-02 04:10:34 -07001616 rtc_source_set("neteq_test_support") {
kjellanderfb114242016-06-13 00:19:48 -07001617 testonly = true
1618 sources = [
1619 "neteq/tools/neteq_external_decoder_test.cc",
1620 "neteq/tools/neteq_external_decoder_test.h",
1621 "neteq/tools/neteq_performance_test.cc",
1622 "neteq/tools/neteq_performance_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001623 ]
1624
kjellandere40a7ee2016-10-16 23:56:12 -07001625 if (!build_with_chromium && is_clang) {
1626 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001627 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -07001628 }
1629
1630 deps = [
1631 ":neteq",
henrik.lundinb637a942017-04-28 00:59:45 -07001632 ":neteq_test_tools",
kjellanderfb114242016-06-13 00:19:48 -07001633 ":pcm16b",
mbonadei1140f972017-04-26 03:38:35 -07001634 "..:module_api",
kjellander676e08f2016-12-07 08:23:27 -08001635 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001636 "../../api/audio_codecs:audio_codecs_api",
1637 "../../api/audio_codecs:builtin_audio_decoder_factory",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001638 "../../rtc_base:rtc_base_approved",
kjellander676e08f2016-12-07 08:23:27 -08001639 "../../system_wrappers",
1640 "../../test:test_support",
kjellanderfb114242016-06-13 00:19:48 -07001641 "//testing/gtest",
kjellanderfb114242016-06-13 00:19:48 -07001642 ]
1643 }
1644
ehmaldonado38a21322016-09-02 04:10:34 -07001645 rtc_source_set("neteq_quality_test_support") {
ehmaldonado861da3c2016-08-19 07:02:24 -07001646 testonly = true
1647 sources = [
1648 "neteq/tools/neteq_quality_test.cc",
1649 "neteq/tools/neteq_quality_test.h",
1650 ]
1651
kjellandere40a7ee2016-10-16 23:56:12 -07001652 if (!build_with_chromium && is_clang) {
1653 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001654 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ehmaldonado861da3c2016-08-19 07:02:24 -07001655 }
1656
1657 deps = [
1658 ":neteq",
henrik.lundinb637a942017-04-28 00:59:45 -07001659 ":neteq_test_tools",
mbonadei1140f972017-04-26 03:38:35 -07001660 "..:module_api",
kjellander676e08f2016-12-07 08:23:27 -08001661 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001662 "../../api/audio_codecs:builtin_audio_decoder_factory",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001663 "../../rtc_base:rtc_base_approved",
kjellander676e08f2016-12-07 08:23:27 -08001664 "../../test:test_support",
ehmaldonado6c46eaa2016-08-22 09:48:02 -07001665 "//testing/gtest",
ehmaldonado861da3c2016-08-19 07:02:24 -07001666 ]
1667 }
1668
henrik.lundinb637a942017-04-28 00:59:45 -07001669 rtc_source_set("neteq_test_tools_deprecated") {
aleloi3022a342016-07-26 06:36:03 -07001670 testonly = true
1671 sources = [
1672 "neteq/test/NETEQTEST_DummyRTPpacket.cc",
1673 "neteq/test/NETEQTEST_DummyRTPpacket.h",
1674 "neteq/test/NETEQTEST_RTPpacket.cc",
1675 "neteq/test/NETEQTEST_RTPpacket.h",
1676 ]
1677
1678 deps = [
1679 ":cng",
1680 ":g711",
1681 ":g722",
1682 ":ilbc",
1683 ":isac",
1684 ":pcm16b",
mbonadei1140f972017-04-26 03:38:35 -07001685 "..:module_api",
aleloi3022a342016-07-26 06:36:03 -07001686 "../..:webrtc_common",
1687 "//testing/gtest",
1688 ]
1689
1690 include_dirs = [
1691 "neteq/include",
1692 "neteq/test",
1693 "../../",
1694 ]
1695
1696 if (is_win) {
1697 cflags = [
1698 # Disable warnings to enable Win64 build, issue 1323.
1699 "/wd4267", # size_t to int truncation
1700 ]
1701 }
1702 }
aleloi47bded42016-07-26 06:46:19 -07001703
aleloi82667732016-08-02 01:45:50 -07001704 config("RTPencode_config") {
1705 defines = [
1706 "CODEC_ILBC",
1707 "CODEC_PCM16B",
1708 "CODEC_G711",
1709 "CODEC_G722",
1710 "CODEC_ISAC",
1711 "CODEC_PCM16B_WB",
1712 "CODEC_ISAC_SWB",
1713 "CODEC_PCM16B_32KHZ",
1714 "CODEC_PCM16B_48KHZ",
1715 "CODEC_CNGCODEC8",
1716 "CODEC_CNGCODEC16",
1717 "CODEC_CNGCODEC32",
1718 "CODEC_ATEVENT_DECODE",
1719 "CODEC_RED",
1720 "CODEC_OPUS",
1721 ]
1722 }
1723
ehmaldonado38a21322016-09-02 04:10:34 -07001724 rtc_executable("RTPencode") {
aleloi82667732016-08-02 01:45:50 -07001725 testonly = true
1726
1727 deps = [
1728 # TODO(hlundin): Make RTPencode use ACM to encode files.
1729 ":cng",
1730 ":g711",
1731 ":g722",
1732 ":ilbc",
1733 ":isac",
kjellander676e08f2016-12-07 08:23:27 -08001734 ":neteq",
henrik.lundinb637a942017-04-28 00:59:45 -07001735 ":neteq_test_tools_deprecated",
aleloi82667732016-08-02 01:45:50 -07001736 ":pcm16b",
1737 ":webrtc_opus",
kjellander676e08f2016-12-07 08:23:27 -08001738 "../..:webrtc_common",
aleloi82667732016-08-02 01:45:50 -07001739 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001740 "../../rtc_base:rtc_base_approved",
Stefan Holmer1acbd682017-09-01 15:29:28 +02001741 "../../system_wrappers:metrics_default",
1742 "../../test:field_trial",
aleloi82667732016-08-02 01:45:50 -07001743 ]
1744
1745 configs += [ ":RTPencode_config" ]
1746
1747 sources = [
henrik.lundina8e2c632017-05-11 07:18:06 -07001748 "neteq/test/PayloadTypes.h",
aleloi82667732016-08-02 01:45:50 -07001749 "neteq/test/RTPencode.cc",
1750 ]
1751
1752 include_dirs = [
1753 "neteq/include",
1754 "neteq/test",
1755 ]
1756
1757 if (is_win) {
1758 cflags = [
1759 # Disable warnings to enable Win64 build, issue 1323.
1760 "/wd4267", # size_t to int truncation
1761 ]
1762 }
1763 }
1764
ehmaldonado38a21322016-09-02 04:10:34 -07001765 rtc_executable("RTPchange") {
aleloi76cbe192016-08-02 02:05:03 -07001766 testonly = true
1767
1768 sources = [
1769 "neteq/test/RTPchange.cc",
1770 ]
1771
1772 deps = [
henrik.lundinb637a942017-04-28 00:59:45 -07001773 ":neteq_test_tools_deprecated",
aleloi76cbe192016-08-02 02:05:03 -07001774 ]
1775 }
1776
ehmaldonado38a21322016-09-02 04:10:34 -07001777 rtc_executable("rtpcat") {
aleloi5556dcb2016-08-02 04:27:25 -07001778 testonly = true
1779
1780 sources = [
1781 "neteq/tools/rtpcat.cc",
1782 ]
1783
1784 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -07001785 "../../rtc_base:rtc_base_approved",
aleloi5556dcb2016-08-02 04:27:25 -07001786 "../../system_wrappers:system_wrappers_default",
1787 "../../test:rtp_test_utils",
1788 "//testing/gtest",
1789 ]
1790 }
1791
ehmaldonado38a21322016-09-02 04:10:34 -07001792 rtc_executable("RTPtimeshift") {
aleloi5a746502016-08-02 06:06:33 -07001793 testonly = true
1794
1795 sources = [
1796 "neteq/test/RTPtimeshift.cc",
1797 ]
1798
1799 deps = [
henrik.lundinb637a942017-04-28 00:59:45 -07001800 ":neteq_test_tools_deprecated",
kjellander676e08f2016-12-07 08:23:27 -08001801 "../../test:test_support",
aleloi5a746502016-08-02 06:06:33 -07001802 "//testing/gtest",
1803 ]
1804 }
1805
ehmaldonado38a21322016-09-02 04:10:34 -07001806 rtc_executable("RTPjitter") {
aleloi17dfa742016-08-03 01:17:25 -07001807 testonly = true
1808 deps = [
1809 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001810 "../../rtc_base:rtc_base_approved",
kjellander676e08f2016-12-07 08:23:27 -08001811 "../../test:test_support",
aleloi17dfa742016-08-03 01:17:25 -07001812 "//testing/gtest",
1813 ]
1814 sources = [
1815 "neteq/test/RTPjitter.cc",
1816 ]
1817 }
1818
ehmaldonado38a21322016-09-02 04:10:34 -07001819 rtc_executable("rtp_analyze") {
aleloi47bded42016-07-26 06:46:19 -07001820 testonly = true
1821
1822 sources = [
1823 "neteq/tools/rtp_analyze.cc",
1824 ]
1825
1826 deps = [
1827 ":neteq",
henrik.lundinb637a942017-04-28 00:59:45 -07001828 ":neteq_test_tools",
aleloi47bded42016-07-26 06:46:19 -07001829 ":pcm16b",
oprypin6e09d872017-08-31 03:21:39 -07001830 "../../rtc_base:rtc_base_approved",
aleloi47bded42016-07-26 06:46:19 -07001831 "../../system_wrappers:system_wrappers_default",
1832 "//testing/gtest",
aleloi47bded42016-07-26 06:46:19 -07001833 ]
1834
kjellandere40a7ee2016-10-16 23:56:12 -07001835 if (!build_with_chromium && is_clang) {
1836 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001837 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloi47bded42016-07-26 06:46:19 -07001838 }
1839 }
aleloi630c6d52016-08-10 02:11:30 -07001840
ehmaldonado38a21322016-09-02 04:10:34 -07001841 rtc_executable("neteq_opus_quality_test") {
aleloi630c6d52016-08-10 02:11:30 -07001842 testonly = true
1843
1844 sources = [
1845 "neteq/test/neteq_opus_quality_test.cc",
1846 ]
1847
1848 deps = [
1849 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001850 ":neteq_quality_test_support",
henrik.lundinb637a942017-04-28 00:59:45 -07001851 ":neteq_tools",
aleloi630c6d52016-08-10 02:11:30 -07001852 ":webrtc_opus",
oprypin9b2f20c2017-08-29 05:51:57 -07001853 "../../rtc_base:rtc_base_approved",
ehmaldonado26bddb92016-11-30 06:12:01 -08001854 "../../test:test_main",
aleloi630c6d52016-08-10 02:11:30 -07001855 "//testing/gtest",
aleloi630c6d52016-08-10 02:11:30 -07001856 ]
aleloi630c6d52016-08-10 02:11:30 -07001857 }
aleloi116fd612016-08-10 04:16:36 -07001858
ehmaldonado38a21322016-09-02 04:10:34 -07001859 rtc_executable("neteq_speed_test") {
aleloi116fd612016-08-10 04:16:36 -07001860 testonly = true
1861
1862 sources = [
1863 "neteq/test/neteq_speed_test.cc",
1864 ]
1865
1866 deps = [
1867 ":neteq",
1868 ":neteq_test_support",
kjellander676e08f2016-12-07 08:23:27 -08001869 "../..:webrtc_common",
oprypin6e09d872017-08-31 03:21:39 -07001870 "../../rtc_base:rtc_base_approved",
aleloi116fd612016-08-10 04:16:36 -07001871 "../../system_wrappers:system_wrappers_default",
1872 "../../test:test_support",
aleloi116fd612016-08-10 04:16:36 -07001873 ]
1874 }
aleloi63910122016-08-10 04:41:14 -07001875
ehmaldonado38a21322016-09-02 04:10:34 -07001876 rtc_executable("neteq_ilbc_quality_test") {
aleloi0e0be0a2016-08-10 04:55:20 -07001877 testonly = true
1878
1879 sources = [
1880 "neteq/test/neteq_ilbc_quality_test.cc",
1881 ]
1882
1883 deps = [
1884 ":ilbc",
1885 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001886 ":neteq_quality_test_support",
henrik.lundinb637a942017-04-28 00:59:45 -07001887 ":neteq_tools",
kjellander676e08f2016-12-07 08:23:27 -08001888 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001889 "../../rtc_base:rtc_base_approved",
aleloi0e0be0a2016-08-10 04:55:20 -07001890 "../../system_wrappers:system_wrappers_default",
ehmaldonado26bddb92016-11-30 06:12:01 -08001891 "../../test:test_main",
aleloi0e0be0a2016-08-10 04:55:20 -07001892 "//testing/gtest",
aleloi0e0be0a2016-08-10 04:55:20 -07001893 ]
1894 }
aleloi6df36dc2016-08-10 05:04:47 -07001895
ehmaldonado38a21322016-09-02 04:10:34 -07001896 rtc_executable("neteq_isac_quality_test") {
aleloi6df36dc2016-08-10 05:04:47 -07001897 testonly = true
1898
1899 sources = [
1900 "neteq/test/neteq_isac_quality_test.cc",
1901 ]
1902
1903 deps = [
1904 ":isac_fix",
1905 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001906 ":neteq_quality_test_support",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001907 "../../rtc_base:rtc_base_approved",
ehmaldonado26bddb92016-11-30 06:12:01 -08001908 "../../test:test_main",
aleloi6df36dc2016-08-10 05:04:47 -07001909 "//testing/gtest",
aleloi6df36dc2016-08-10 05:04:47 -07001910 ]
1911 }
aleloic4ac7002016-08-10 05:06:27 -07001912
ehmaldonado38a21322016-09-02 04:10:34 -07001913 rtc_executable("neteq_pcmu_quality_test") {
aleloic4ac7002016-08-10 05:06:27 -07001914 testonly = true
1915
1916 sources = [
1917 "neteq/test/neteq_pcmu_quality_test.cc",
1918 ]
1919
1920 deps = [
1921 ":g711",
1922 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001923 ":neteq_quality_test_support",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001924 "../../rtc_base:rtc_base_approved",
ehmaldonado26bddb92016-11-30 06:12:01 -08001925 "../../test:test_main",
aleloic4ac7002016-08-10 05:06:27 -07001926 "//testing/gtest",
aleloic4ac7002016-08-10 05:06:27 -07001927 ]
1928 }
aleloib7186d02016-08-16 01:47:16 -07001929
ehmaldonado38a21322016-09-02 04:10:34 -07001930 rtc_executable("isac_fix_test") {
aleloib7186d02016-08-16 01:47:16 -07001931 testonly = true
1932
1933 sources = [
1934 "codecs/isac/fix/test/kenny.cc",
1935 ]
1936
1937 deps = [
1938 ":isac_fix",
1939 "../../test:test_support",
1940 ]
1941
ehmaldonado25586ce2017-09-07 23:18:35 -07001942 data = [
1943 "../../../resources/speech_and_misc_wb.pcm",
1944 ]
1945
aleloib7186d02016-08-16 01:47:16 -07001946 if (is_win) {
1947 cflags = [
1948 # Disable warnings to enable Win64 build, issue 1323.
1949 "/wd4267", # size_t to int truncation
1950 ]
1951 }
1952 }
aleloi16f55a12016-08-23 08:08:23 -07001953
ehmaldonadod02fe4b2016-08-26 13:31:24 -07001954 config("isac_test_warnings_config") {
1955 if (is_win && is_clang) {
1956 cflags = [
1957 # Disable warnings failing when compiling with Clang on Windows.
1958 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
1959 "-Wno-format",
1960 ]
1961 }
1962 }
1963
kjellander7439f972016-12-05 22:47:46 -08001964 rtc_source_set("isac_test_util") {
1965 testonly = true
1966 sources = [
1967 "codecs/isac/main/util/utility.c",
1968 ]
1969 }
1970
ehmaldonado38a21322016-09-02 04:10:34 -07001971 rtc_executable("isac_test") {
ivoce51b41a2016-08-24 02:25:57 -07001972 testonly = true
1973
1974 sources = [
1975 "codecs/isac/main/test/simpleKenny.c",
ivoce51b41a2016-08-24 02:25:57 -07001976 ]
1977
1978 include_dirs = [
1979 "codecs/isac/main/include",
1980 "codecs/isac/main/test",
1981 "codecs/isac/main/util",
1982 ]
1983
1984 deps = [
1985 ":isac",
kjellander7439f972016-12-05 22:47:46 -08001986 ":isac_test_util",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001987 "../../rtc_base:rtc_base_approved",
ivoce51b41a2016-08-24 02:25:57 -07001988 ]
1989
ehmaldonadod02fe4b2016-08-26 13:31:24 -07001990 configs += [ ":isac_test_warnings_config" ]
ivoce51b41a2016-08-24 02:25:57 -07001991 }
1992
ehmaldonado38a21322016-09-02 04:10:34 -07001993 rtc_executable("g711_test") {
aleloi16f55a12016-08-23 08:08:23 -07001994 testonly = true
1995
1996 sources = [
1997 "codecs/g711/test/testG711.cc",
1998 ]
1999
aleloi16f55a12016-08-23 08:08:23 -07002000 deps = [
2001 ":g711",
2002 ]
2003 }
aleloi9a117842016-08-23 08:36:10 -07002004
ehmaldonado38a21322016-09-02 04:10:34 -07002005 rtc_executable("g722_test") {
aleloi9a117842016-08-23 08:36:10 -07002006 testonly = true
2007
2008 sources = [
2009 "codecs/g722/test/testG722.cc",
2010 ]
2011
aleloi9a117842016-08-23 08:36:10 -07002012 deps = [
2013 ":g722",
2014 "../..:webrtc_common",
2015 ]
2016 }
ivoc2c670db2016-08-24 06:11:18 -07002017
ehmaldonado38a21322016-09-02 04:10:34 -07002018 rtc_executable("isac_api_test") {
aleloicfee2152016-08-29 04:09:19 -07002019 testonly = true
2020
2021 sources = [
2022 "codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc",
aleloicfee2152016-08-29 04:09:19 -07002023 ]
2024
aleloicfee2152016-08-29 04:09:19 -07002025 deps = [
2026 ":isac",
kjellander7439f972016-12-05 22:47:46 -08002027 ":isac_test_util",
ehmaldonadof6a861a2017-07-19 10:40:47 -07002028 "../../rtc_base:rtc_base_approved",
aleloicfee2152016-08-29 04:09:19 -07002029 ]
2030
2031 include_dirs = [
2032 "codecs/isac/main/include",
2033 "codecs/isac/main/test",
2034 "codecs/isac/main/util",
2035 ]
2036 }
2037
ehmaldonado38a21322016-09-02 04:10:34 -07002038 rtc_executable("isac_switch_samprate_test") {
aleloicfee2152016-08-29 04:09:19 -07002039 testonly = true
2040
2041 sources = [
2042 "codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc",
aleloicfee2152016-08-29 04:09:19 -07002043 ]
2044
aleloicfee2152016-08-29 04:09:19 -07002045 deps = [
2046 ":isac",
kjellander7439f972016-12-05 22:47:46 -08002047 ":isac_test_util",
aleloicfee2152016-08-29 04:09:19 -07002048 ]
2049
2050 include_dirs = [
2051 "codecs/isac/main/include",
2052 "codecs/isac/main/test",
2053 "codecs/isac/main/util",
2054 "../../common_audio/signal_processing/include",
2055 ]
2056 }
2057
ehmaldonado38a21322016-09-02 04:10:34 -07002058 rtc_executable("ilbc_test") {
aleloicfee2152016-08-29 04:09:19 -07002059 testonly = true
2060
2061 sources = [
2062 "codecs/ilbc/test/iLBC_test.c",
2063 ]
2064
aleloicfee2152016-08-29 04:09:19 -07002065 deps = [
2066 ":ilbc",
aleloicfee2152016-08-29 04:09:19 -07002067 ]
2068 }
2069
ehmaldonado38a21322016-09-02 04:10:34 -07002070 rtc_executable("webrtc_opus_fec_test") {
ivoc2c670db2016-08-24 06:11:18 -07002071 testonly = true
2072
2073 sources = [
2074 "codecs/opus/opus_fec_test.cc",
2075 ]
2076
2077 deps = [
2078 ":webrtc_opus",
ivoc2c670db2016-08-24 06:11:18 -07002079 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -07002080 "../../rtc_base:rtc_base_approved",
ehmaldonado26bddb92016-11-30 06:12:01 -08002081 "../../test:test_main",
ivoc2c670db2016-08-24 06:11:18 -07002082 "//testing/gtest",
2083 ]
2084
kjellandere40a7ee2016-10-16 23:56:12 -07002085 if (!build_with_chromium && is_clang) {
2086 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07002087 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ivoc2c670db2016-08-24 06:11:18 -07002088 }
2089 }
ehmaldonado36268652017-01-19 08:27:11 -08002090
2091 rtc_source_set("audio_coding_unittests") {
2092 testonly = true
2093
kjellandere0629c02017-04-25 04:04:50 -07002094 # Skip restricting visibility on mobile platforms since the tests on those
2095 # gets additional generated targets which would require many lines here to
2096 # cover (which would be confusing to read and hard to maintain).
2097 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -07002098 visibility = [ "..:modules_unittests" ]
kjellandere0629c02017-04-25 04:04:50 -07002099 }
ehmaldonado36268652017-01-19 08:27:11 -08002100 sources = [
2101 "acm2/acm_receiver_unittest.cc",
2102 "acm2/audio_coding_module_unittest.cc",
2103 "acm2/call_statistics_unittest.cc",
2104 "acm2/codec_manager_unittest.cc",
2105 "acm2/rent_a_codec_unittest.cc",
2106 "audio_network_adaptor/audio_network_adaptor_impl_unittest.cc",
2107 "audio_network_adaptor/bitrate_controller_unittest.cc",
2108 "audio_network_adaptor/channel_controller_unittest.cc",
2109 "audio_network_adaptor/controller_manager_unittest.cc",
2110 "audio_network_adaptor/dtx_controller_unittest.cc",
minyue4b7c9522017-01-24 04:54:59 -08002111 "audio_network_adaptor/event_log_writer_unittest.cc",
elad.alon6d7900d2017-03-24 04:12:56 -07002112 "audio_network_adaptor/fec_controller_plr_based_unittest.cc",
2113 "audio_network_adaptor/fec_controller_rplr_based_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -08002114 "audio_network_adaptor/frame_length_controller_unittest.cc",
2115 "audio_network_adaptor/mock/mock_controller.h",
2116 "audio_network_adaptor/mock/mock_controller_manager.h",
elad.alon326263a2017-03-29 03:16:58 -07002117 "audio_network_adaptor/util/threshold_curve_unittest.cc",
kwiberg087bd342017-02-10 08:15:44 -08002118 "codecs/builtin_audio_decoder_factory_unittest.cc",
ossua1a040a2017-04-06 10:03:21 -07002119 "codecs/builtin_audio_encoder_factory_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -08002120 "codecs/cng/audio_encoder_cng_unittest.cc",
2121 "codecs/cng/cng_unittest.cc",
2122 "codecs/ilbc/ilbc_unittest.cc",
2123 "codecs/isac/fix/source/filterbanks_unittest.cc",
2124 "codecs/isac/fix/source/filters_unittest.cc",
2125 "codecs/isac/fix/source/lpc_masking_model_unittest.cc",
2126 "codecs/isac/fix/source/transform_unittest.cc",
2127 "codecs/isac/main/source/audio_encoder_isac_unittest.cc",
2128 "codecs/isac/main/source/isac_unittest.cc",
2129 "codecs/isac/unittest.cc",
2130 "codecs/legacy_encoded_audio_frame_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -08002131 "codecs/opus/audio_encoder_opus_unittest.cc",
2132 "codecs/opus/opus_unittest.cc",
2133 "codecs/red/audio_encoder_copy_red_unittest.cc",
2134 "neteq/audio_multi_vector_unittest.cc",
2135 "neteq/audio_vector_unittest.cc",
2136 "neteq/background_noise_unittest.cc",
2137 "neteq/buffer_level_filter_unittest.cc",
2138 "neteq/comfort_noise_unittest.cc",
2139 "neteq/decision_logic_unittest.cc",
2140 "neteq/decoder_database_unittest.cc",
2141 "neteq/delay_manager_unittest.cc",
2142 "neteq/delay_peak_detector_unittest.cc",
2143 "neteq/dsp_helper_unittest.cc",
2144 "neteq/dtmf_buffer_unittest.cc",
2145 "neteq/dtmf_tone_generator_unittest.cc",
2146 "neteq/expand_unittest.cc",
2147 "neteq/merge_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -08002148 "neteq/mock/mock_buffer_level_filter.h",
2149 "neteq/mock/mock_decoder_database.h",
2150 "neteq/mock/mock_delay_manager.h",
2151 "neteq/mock/mock_delay_peak_detector.h",
2152 "neteq/mock/mock_dtmf_buffer.h",
2153 "neteq/mock/mock_dtmf_tone_generator.h",
2154 "neteq/mock/mock_expand.h",
2155 "neteq/mock/mock_external_decoder_pcm16b.h",
2156 "neteq/mock/mock_packet_buffer.h",
2157 "neteq/mock/mock_red_payload_splitter.h",
minyue-webrtcfae474c2017-07-05 11:17:40 +02002158 "neteq/mock/mock_statistics_calculator.h",
ehmaldonado36268652017-01-19 08:27:11 -08002159 "neteq/nack_tracker_unittest.cc",
2160 "neteq/neteq_external_decoder_unittest.cc",
2161 "neteq/neteq_impl_unittest.cc",
2162 "neteq/neteq_network_stats_unittest.cc",
2163 "neteq/neteq_stereo_unittest.cc",
2164 "neteq/neteq_unittest.cc",
2165 "neteq/normal_unittest.cc",
2166 "neteq/packet_buffer_unittest.cc",
2167 "neteq/post_decode_vad_unittest.cc",
2168 "neteq/random_vector_unittest.cc",
2169 "neteq/red_payload_splitter_unittest.cc",
2170 "neteq/sync_buffer_unittest.cc",
2171 "neteq/tick_timer_unittest.cc",
2172 "neteq/time_stretch_unittest.cc",
2173 "neteq/timestamp_scaler_unittest.cc",
2174 "neteq/tools/input_audio_file_unittest.cc",
2175 "neteq/tools/packet_unittest.cc",
2176 ]
2177
2178 deps = [
2179 ":acm_receive_test",
2180 ":acm_send_test",
2181 ":audio_coding",
kwiberg65cb70d2017-03-03 06:16:28 -08002182 ":audio_coding_module_typedefs",
ehmaldonado36268652017-01-19 08:27:11 -08002183 ":audio_format_conversion",
2184 ":audio_network_adaptor",
ehmaldonado36268652017-01-19 08:27:11 -08002185 ":cng",
2186 ":g711",
2187 ":ilbc",
kwiberga6ca5182017-01-30 05:28:54 -08002188 ":isac",
ehmaldonado36268652017-01-19 08:27:11 -08002189 ":isac_c",
2190 ":isac_fix",
kwiberg087bd342017-02-10 08:15:44 -08002191 ":legacy_encoded_audio_frame",
ehmaldonado36268652017-01-19 08:27:11 -08002192 ":neteq",
2193 ":neteq_test_support",
henrik.lundinb637a942017-04-28 00:59:45 -07002194 ":neteq_test_tools",
ehmaldonado36268652017-01-19 08:27:11 -08002195 ":pcm16b",
2196 ":red",
2197 ":rent_a_codec",
2198 ":webrtc_opus",
mbonadei1140f972017-04-26 03:38:35 -07002199 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -08002200 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08002201 "../../api/audio_codecs:audio_codecs_api",
2202 "../../api/audio_codecs:builtin_audio_decoder_factory",
ossueb1fde42017-05-02 06:46:30 -07002203 "../../api/audio_codecs:builtin_audio_encoder_factory",
ehmaldonado36268652017-01-19 08:27:11 -08002204 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -07002205 "../../rtc_base:protobuf_utils",
2206 "../../rtc_base:rtc_base",
2207 "../../rtc_base:rtc_base_approved",
2208 "../../rtc_base:rtc_base_tests_utils",
ehmaldonado36268652017-01-19 08:27:11 -08002209 "../../system_wrappers:system_wrappers",
kwiberg37e99fd2017-04-10 05:15:48 -07002210 "../../test:audio_codec_mocks",
ehmaldonado36268652017-01-19 08:27:11 -08002211 "../../test:field_trial",
2212 "../../test:rtp_test_utils",
2213 "../../test:test_common",
2214 "../../test:test_support",
2215 "//testing/gmock",
2216 "//testing/gtest",
ehmaldonado36268652017-01-19 08:27:11 -08002217 ]
2218
2219 defines = audio_coding_defines
2220
2221 if (rtc_enable_protobuf) {
minyue-webrtc7ed35f42017-06-13 11:49:29 +02002222 defines += [ "WEBRTC_NETEQ_UNITTEST_BITEXACT" ]
ehmaldonado36268652017-01-19 08:27:11 -08002223 deps += [
2224 ":ana_config_proto",
2225 ":neteq_unittest_proto",
2226 ]
2227 }
2228
2229 if (!build_with_chromium && is_clang) {
2230 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
2231 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
2232 }
2233 }
kjellanderfb114242016-06-13 00:19:48 -07002234}
kwiberg087bd342017-02-10 08:15:44 -08002235
2236# For backwards compatibility only! Use
2237# webrtc/api/audio_codecs:audio_codecs_api instead.
2238# TODO(kwiberg): Remove this.
2239rtc_source_set("audio_decoder_interface") {
2240 sources = [
2241 "codecs/audio_decoder.h",
2242 ]
2243 deps = [
2244 "../../api/audio_codecs:audio_codecs_api",
2245 ]
2246}
2247
2248# For backwards compatibility only! Use
ossueb1fde42017-05-02 06:46:30 -07002249# webrtc/api/audio_codecs:audio_codecs_api instead.
2250# TODO(ossu): Remove this.
2251rtc_source_set("audio_encoder_interface") {
2252 sources = [
2253 "codecs/audio_encoder.h",
2254 ]
2255 deps = [
2256 "../../api/audio_codecs:audio_codecs_api",
2257 ]
2258}
2259
2260# For backwards compatibility only! Use
kwiberg087bd342017-02-10 08:15:44 -08002261# webrtc/api/audio_codecs:builtin_audio_decoder_factory instead.
2262# TODO(kwiberg): Remove this.
2263rtc_source_set("builtin_audio_decoder_factory") {
2264 sources = [
2265 "codecs/builtin_audio_decoder_factory.h",
2266 ]
2267 deps = [
2268 "../../api/audio_codecs:builtin_audio_decoder_factory",
2269 ]
2270}
ossueb1fde42017-05-02 06:46:30 -07002271
2272# For backwards compatibility only! Use
2273# webrtc/api/audio_codecs:builtin_audio_decoder_factory instead.
2274# TODO(ossu): Remove this.
2275rtc_source_set("builtin_audio_encoder_factory") {
2276 sources = [
2277 "codecs/builtin_audio_encoder_factory.h",
2278 ]
2279 deps = [
2280 "../../api/audio_codecs:builtin_audio_encoder_factory",
2281 ]
2282}