blob: 32d5336ce91e614bf13408a5f121d63251a27618 [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
minyue0d382ef2016-10-07 07:59:28 -0700884rtc_static_library("audio_network_adaptor") {
minyue7610f852016-09-07 13:51:51 -0700885 sources = [
886 "audio_network_adaptor/audio_network_adaptor.cc",
minyuecaa9cb22016-09-13 13:34:15 -0700887 "audio_network_adaptor/audio_network_adaptor_impl.cc",
888 "audio_network_adaptor/audio_network_adaptor_impl.h",
minyue4aec1d42016-09-21 23:01:26 -0700889 "audio_network_adaptor/bitrate_controller.cc",
890 "audio_network_adaptor/bitrate_controller.h",
minyue2e164c62016-09-14 06:47:36 -0700891 "audio_network_adaptor/channel_controller.cc",
892 "audio_network_adaptor/channel_controller.h",
minyuecaa9cb22016-09-13 13:34:15 -0700893 "audio_network_adaptor/controller.cc",
894 "audio_network_adaptor/controller.h",
895 "audio_network_adaptor/controller_manager.cc",
896 "audio_network_adaptor/controller_manager.h",
minyue25f6a392016-09-22 22:23:20 -0700897 "audio_network_adaptor/debug_dump_writer.cc",
898 "audio_network_adaptor/debug_dump_writer.h",
minyue186cd062016-09-16 05:54:39 -0700899 "audio_network_adaptor/dtx_controller.cc",
900 "audio_network_adaptor/dtx_controller.h",
minyue4b7c9522017-01-24 04:54:59 -0800901 "audio_network_adaptor/event_log_writer.cc",
902 "audio_network_adaptor/event_log_writer.h",
elad.alon6d7900d2017-03-24 04:12:56 -0700903 "audio_network_adaptor/fec_controller_plr_based.cc",
904 "audio_network_adaptor/fec_controller_plr_based.h",
905 "audio_network_adaptor/fec_controller_rplr_based.cc",
906 "audio_network_adaptor/fec_controller_rplr_based.h",
minyuee35d3292016-09-21 16:00:31 -0700907 "audio_network_adaptor/frame_length_controller.cc",
908 "audio_network_adaptor/frame_length_controller.h",
minyue7610f852016-09-07 13:51:51 -0700909 "audio_network_adaptor/include/audio_network_adaptor.h",
elad.alon326263a2017-03-29 03:16:58 -0700910 "audio_network_adaptor/util/threshold_curve.h",
minyue7610f852016-09-07 13:51:51 -0700911 ]
minyue25f6a392016-09-22 22:23:20 -0700912
minyue41b9c802016-10-06 07:13:54 -0700913 deps = [
914 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -0700915 "../../api:optional",
kjellander676e08f2016-12-07 08:23:27 -0800916 "../../common_audio",
minyue4b7c9522017-01-24 04:54:59 -0800917 "../../logging:rtc_event_log_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700918 "../../rtc_base:protobuf_utils",
919 "../../rtc_base:rtc_base_approved",
minyue41b9c802016-10-06 07:13:54 -0700920 "../../system_wrappers",
921 ]
922
minyue25f6a392016-09-22 22:23:20 -0700923 if (rtc_enable_protobuf) {
minyue41b9c802016-10-06 07:13:54 -0700924 deps += [
minyuea1d9ad02016-10-02 14:53:37 -0700925 ":ana_config_proto",
minyue25f6a392016-09-22 22:23:20 -0700926 ":ana_debug_dump_proto",
927 ]
minyue25f6a392016-09-22 22:23:20 -0700928 }
minyue4b7c9522017-01-24 04:54:59 -0800929
930 if (!build_with_chromium && is_clang) {
931 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
932 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
933 }
minyue7610f852016-09-07 13:51:51 -0700934}
935
kwiberg65cb70d2017-03-03 06:16:28 -0800936rtc_source_set("neteq_decoder_enum") {
937 sources = [
938 "neteq/neteq_decoder_enum.cc",
939 "neteq/neteq_decoder_enum.h",
940 ]
941 deps = [
kwiberg84f6a3f2017-09-05 08:43:13 -0700942 "../../api:optional",
kwiberg65cb70d2017-03-03 06:16:28 -0800943 "../../api/audio_codecs:audio_codecs_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700944 "../../rtc_base:rtc_base_approved",
kwiberg65cb70d2017-03-03 06:16:28 -0800945 ]
946}
kjellander676e08f2016-12-07 08:23:27 -0800947
kwiberg65cb70d2017-03-03 06:16:28 -0800948rtc_static_library("neteq") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000949 sources = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000950 "neteq/accelerate.cc",
951 "neteq/accelerate.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000952 "neteq/audio_decoder_impl.cc",
953 "neteq/audio_decoder_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000954 "neteq/audio_multi_vector.cc",
955 "neteq/audio_multi_vector.h",
956 "neteq/audio_vector.cc",
957 "neteq/audio_vector.h",
958 "neteq/background_noise.cc",
959 "neteq/background_noise.h",
960 "neteq/buffer_level_filter.cc",
961 "neteq/buffer_level_filter.h",
962 "neteq/comfort_noise.cc",
963 "neteq/comfort_noise.h",
minyue53ff70f2016-05-02 01:50:30 -0700964 "neteq/cross_correlation.cc",
965 "neteq/cross_correlation.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000966 "neteq/decision_logic.cc",
967 "neteq/decision_logic.h",
968 "neteq/decision_logic_fax.cc",
969 "neteq/decision_logic_fax.h",
970 "neteq/decision_logic_normal.cc",
971 "neteq/decision_logic_normal.h",
972 "neteq/decoder_database.cc",
973 "neteq/decoder_database.h",
974 "neteq/defines.h",
975 "neteq/delay_manager.cc",
976 "neteq/delay_manager.h",
977 "neteq/delay_peak_detector.cc",
978 "neteq/delay_peak_detector.h",
979 "neteq/dsp_helper.cc",
980 "neteq/dsp_helper.h",
981 "neteq/dtmf_buffer.cc",
982 "neteq/dtmf_buffer.h",
983 "neteq/dtmf_tone_generator.cc",
984 "neteq/dtmf_tone_generator.h",
985 "neteq/expand.cc",
986 "neteq/expand.h",
Henrik Kjellander74640892015-10-29 11:31:02 +0100987 "neteq/include/neteq.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000988 "neteq/merge.cc",
989 "neteq/merge.h",
henrik.lundin91951862016-06-08 06:43:41 -0700990 "neteq/nack_tracker.cc",
991 "neteq/nack_tracker.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200992 "neteq/neteq.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000993 "neteq/neteq_impl.cc",
994 "neteq/neteq_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000995 "neteq/normal.cc",
996 "neteq/normal.h",
henrik.lundin84f8cd62016-04-26 07:45:16 -0700997 "neteq/packet.cc",
998 "neteq/packet.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000999 "neteq/packet_buffer.cc",
1000 "neteq/packet_buffer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001001 "neteq/post_decode_vad.cc",
1002 "neteq/post_decode_vad.h",
1003 "neteq/preemptive_expand.cc",
1004 "neteq/preemptive_expand.h",
1005 "neteq/random_vector.cc",
1006 "neteq/random_vector.h",
ossua70695a2016-09-22 02:06:28 -07001007 "neteq/red_payload_splitter.cc",
1008 "neteq/red_payload_splitter.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001009 "neteq/rtcp.cc",
1010 "neteq/rtcp.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +02001011 "neteq/statistics_calculator.cc",
1012 "neteq/statistics_calculator.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001013 "neteq/sync_buffer.cc",
1014 "neteq/sync_buffer.h",
henrik.lundin8053f792016-04-22 13:21:43 -07001015 "neteq/tick_timer.cc",
1016 "neteq/tick_timer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001017 "neteq/time_stretch.cc",
1018 "neteq/time_stretch.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +02001019 "neteq/timestamp_scaler.cc",
1020 "neteq/timestamp_scaler.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001021 ]
1022
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001023 deps = [
kwiberg65cb70d2017-03-03 06:16:28 -08001024 ":audio_coding_module_typedefs",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001025 ":cng",
1026 ":g711",
kjellander676e08f2016-12-07 08:23:27 -08001027 ":isac_fix",
kwiberg65cb70d2017-03-03 06:16:28 -08001028 ":neteq_decoder_enum",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001029 ":pcm16b",
mbonadei1140f972017-04-26 03:38:35 -07001030 "..:module_api",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +00001031 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -07001032 "../../api:optional",
kwiberg087bd342017-02-10 08:15:44 -08001033 "../../api/audio_codecs:audio_codecs_api",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001034 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001035 "../../rtc_base:gtest_prod",
1036 "../../rtc_base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001037 "../../system_wrappers",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00001038 ]
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +00001039
1040 defines = []
1041
kwibergf8c2bac2016-01-18 06:38:32 -08001042 if (rtc_include_ilbc) {
1043 defines += [ "WEBRTC_CODEC_ILBC" ]
1044 deps += [ ":ilbc" ]
1045 }
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +00001046 if (rtc_include_opus) {
1047 defines += [ "WEBRTC_CODEC_OPUS" ]
1048 deps += [ ":webrtc_opus" ]
1049 }
kwiberg98ab3a42015-09-30 21:54:21 -07001050 if (!build_with_mozilla) {
1051 if (current_cpu == "arm") {
1052 defines += [ "WEBRTC_CODEC_ISACFX" ]
1053 deps += [ ":isac_fix" ]
1054 } else {
1055 defines += [ "WEBRTC_CODEC_ISAC" ]
1056 deps += [ ":isac" ]
1057 }
1058 defines += [ "WEBRTC_CODEC_G722" ]
1059 deps += [ ":g722" ]
1060 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +00001061}
kjellanderfb114242016-06-13 00:19:48 -07001062
henrik.lundin58466f62016-10-05 02:27:42 -07001063# Although providing only test support, this target must be outside of the
1064# rtc_include_tests conditional. The reason is that it supports fuzzer tests
1065# that ultimately are built and run as a part of the Chromium ecosystem, which
1066# does not set the rtc_include_tests flag.
henrik.lundinb637a942017-04-28 00:59:45 -07001067rtc_source_set("neteq_tools_minimal") {
henrik.lundin58466f62016-10-05 02:27:42 -07001068 sources = [
henrik.lundinb637a942017-04-28 00:59:45 -07001069 "neteq/tools/audio_sink.cc",
1070 "neteq/tools/audio_sink.h",
henrik.lundin58466f62016-10-05 02:27:42 -07001071 "neteq/tools/encode_neteq_input.cc",
1072 "neteq/tools/encode_neteq_input.h",
henrik.lundin7a38fd22017-04-28 01:35:53 -07001073 "neteq/tools/neteq_input.cc",
henrik.lundinb637a942017-04-28 00:59:45 -07001074 "neteq/tools/neteq_input.h",
henrik.lundin58466f62016-10-05 02:27:42 -07001075 "neteq/tools/neteq_test.cc",
1076 "neteq/tools/neteq_test.h",
henrik.lundinb637a942017-04-28 00:59:45 -07001077 "neteq/tools/packet.cc",
1078 "neteq/tools/packet.h",
1079 "neteq/tools/packet_source.cc",
1080 "neteq/tools/packet_source.h",
henrik.lundin58466f62016-10-05 02:27:42 -07001081 ]
1082
kjellandere40a7ee2016-10-16 23:56:12 -07001083 if (!build_with_chromium && is_clang) {
1084 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
henrik.lundin58466f62016-10-05 02:27:42 -07001085 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1086 }
kjellander676e08f2016-12-07 08:23:27 -08001087
1088 deps = [
kjellander676e08f2016-12-07 08:23:27 -08001089 ":neteq",
henrik.lundinb637a942017-04-28 00:59:45 -07001090 "..:module_api",
kjellander676e08f2016-12-07 08:23:27 -08001091 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -07001092 "../../api:optional",
ossueb1fde42017-05-02 06:46:30 -07001093 "../../api/audio_codecs:audio_codecs_api",
kwiberg087bd342017-02-10 08:15:44 -08001094 "../../api/audio_codecs:builtin_audio_decoder_factory",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001095 "../../rtc_base:rtc_base_approved",
henrik.lundinb637a942017-04-28 00:59:45 -07001096 "../rtp_rtcp",
kjellander676e08f2016-12-07 08:23:27 -08001097 ]
henrik.lundin58466f62016-10-05 02:27:42 -07001098}
1099
mbonadei3edccb92017-06-01 04:47:20 -07001100rtc_source_set("neteq_test_tools") {
1101 testonly = true
1102 sources = [
1103 "neteq/tools/audio_checksum.h",
1104 "neteq/tools/audio_loop.cc",
1105 "neteq/tools/audio_loop.h",
1106 "neteq/tools/constant_pcm_packet_source.cc",
1107 "neteq/tools/constant_pcm_packet_source.h",
1108 "neteq/tools/output_audio_file.h",
1109 "neteq/tools/output_wav_file.h",
1110 "neteq/tools/rtp_file_source.cc",
1111 "neteq/tools/rtp_file_source.h",
1112 "neteq/tools/rtp_generator.cc",
1113 "neteq/tools/rtp_generator.h",
1114 ]
1115
1116 public_configs = [ ":neteq_tools_config" ]
1117
1118 if (!build_with_chromium && is_clang) {
1119 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
1120 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1121 }
1122
1123 deps = [
1124 ":pcm16b",
1125 "..:module_api",
1126 "../..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -07001127 "../../api:array_view",
mbonadei3edccb92017-06-01 04:47:20 -07001128 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001129 "../../rtc_base:rtc_base_approved",
1130 "../../rtc_base:rtc_base_tests_utils",
mbonadei3edccb92017-06-01 04:47:20 -07001131 "../../test:rtp_test_utils",
1132 "../rtp_rtcp",
1133 ]
1134
1135 public_deps = [
1136 ":neteq_tools",
1137 ":neteq_tools_minimal",
1138 ]
1139
1140 if (rtc_enable_protobuf) {
1141 sources += [
1142 "neteq/tools/neteq_packet_source_input.cc",
1143 "neteq/tools/neteq_packet_source_input.h",
1144 ]
1145 deps += [ ":rtc_event_log_source" ]
1146 }
1147}
1148
1149config("neteq_tools_config") {
1150 include_dirs = [ "tools" ]
1151}
1152
1153rtc_source_set("neteq_tools") {
1154 sources = [
1155 "neteq/tools/fake_decode_from_file.cc",
1156 "neteq/tools/fake_decode_from_file.h",
1157 "neteq/tools/input_audio_file.cc",
1158 "neteq/tools/input_audio_file.h",
henrik.lundin3c938fc2017-06-14 06:09:58 -07001159 "neteq/tools/neteq_delay_analyzer.cc",
1160 "neteq/tools/neteq_delay_analyzer.h",
mbonadei3edccb92017-06-01 04:47:20 -07001161 "neteq/tools/neteq_replacement_input.cc",
1162 "neteq/tools/neteq_replacement_input.h",
1163 "neteq/tools/resample_input_audio_file.cc",
1164 "neteq/tools/resample_input_audio_file.h",
1165 ]
1166
1167 public_configs = [ ":neteq_tools_config" ]
1168
1169 if (!build_with_chromium && is_clang) {
1170 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
1171 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1172 }
1173
1174 deps = [
1175 "../..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -07001176 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -07001177 "../../api:optional",
mbonadei3edccb92017-06-01 04:47:20 -07001178 "../../api/audio_codecs:audio_codecs_api",
mbonadei3edccb92017-06-01 04:47:20 -07001179 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001180 "../../rtc_base:rtc_base_approved",
mbonadei3edccb92017-06-01 04:47:20 -07001181 "../rtp_rtcp",
1182 ]
1183
1184 public_deps = [
1185 ":neteq_tools_minimal",
1186 ]
1187}
1188
1189if (rtc_enable_protobuf) {
1190 rtc_static_library("rtc_event_log_source") {
1191 testonly = true
1192
1193 # TODO(kjellander): Remove (bugs.webrtc.org/6828)
1194 # Needs call.h to be moved to webrtc/api first.
1195 check_includes = false
1196
1197 sources = [
1198 "neteq/tools/rtc_event_log_source.cc",
1199 "neteq/tools/rtc_event_log_source.h",
1200 ]
1201
1202 if (!build_with_chromium && is_clang) {
1203 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
1204 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1205 }
1206
1207 deps = [
mbonadei3edccb92017-06-01 04:47:20 -07001208 "../../logging:rtc_event_log_parser",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001209 "../../rtc_base:rtc_base_approved",
mbonadei3edccb92017-06-01 04:47:20 -07001210 ]
1211 public_deps = [
1212 "../../logging:rtc_event_log_proto",
1213 ]
1214 }
1215}
1216
kjellanderfb114242016-06-13 00:19:48 -07001217if (rtc_include_tests) {
kjellander6ceab082016-10-28 05:44:03 -07001218 group("audio_coding_tests") {
1219 testonly = true
1220 public_deps = [
1221 ":RTPchange",
1222 ":RTPencode",
1223 ":RTPjitter",
1224 ":RTPtimeshift",
1225 ":acm_receive_test",
1226 ":acm_send_test",
kjellander6ceab082016-10-28 05:44:03 -07001227 ":audio_codec_speed_tests",
1228 ":audio_decoder_unittests",
1229 ":audio_decoder_unittests",
1230 ":delay_test",
1231 ":g711_test",
1232 ":g722_test",
1233 ":ilbc_test",
1234 ":insert_packet_with_timing",
1235 ":isac_api_test",
1236 ":isac_fix_test",
1237 ":isac_switch_samprate_test",
1238 ":isac_test",
1239 ":neteq_ilbc_quality_test",
1240 ":neteq_isac_quality_test",
1241 ":neteq_opus_quality_test",
1242 ":neteq_pcmu_quality_test",
1243 ":neteq_speed_test",
1244 ":rtp_analyze",
1245 ":rtpcat",
1246 ":webrtc_opus_fec_test",
1247 ]
1248 if (rtc_enable_protobuf) {
1249 public_deps += [ ":neteq_rtpplay" ]
1250 }
1251 }
1252
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001253 rtc_source_set("audio_coding_modules_tests") {
1254 testonly = true
kjellandere0629c02017-04-25 04:04:50 -07001255
1256 # Skip restricting visibility on mobile platforms since the tests on those
1257 # gets additional generated targets which would require many lines here to
1258 # cover (which would be confusing to read and hard to maintain).
1259 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -07001260 visibility = [ "..:modules_tests" ]
kjellandere0629c02017-04-25 04:04:50 -07001261 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001262 sources = [
henrik.lundina8e2c632017-05-11 07:18:06 -07001263 "test/ACMTest.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001264 "test/APITest.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001265 "test/APITest.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001266 "test/Channel.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001267 "test/Channel.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001268 "test/EncodeDecodeTest.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001269 "test/EncodeDecodeTest.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001270 "test/PCMFile.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001271 "test/PCMFile.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001272 "test/PacketLossTest.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001273 "test/PacketLossTest.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001274 "test/RTPFile.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001275 "test/RTPFile.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001276 "test/TestAllCodecs.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001277 "test/TestAllCodecs.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001278 "test/TestRedFec.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001279 "test/TestRedFec.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001280 "test/TestStereo.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001281 "test/TestStereo.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001282 "test/TestVADDTX.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001283 "test/TestVADDTX.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001284 "test/Tester.cc",
1285 "test/TwoWayCommunication.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001286 "test/TwoWayCommunication.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001287 "test/iSACTest.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001288 "test/iSACTest.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001289 "test/opus_test.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001290 "test/opus_test.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001291 "test/target_delay_unittest.cc",
1292 "test/utility.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001293 "test/utility.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001294 ]
1295 deps = [
1296 ":audio_coding",
kwiberg65cb70d2017-03-03 06:16:28 -08001297 ":audio_coding_module_typedefs",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001298 ":audio_format_conversion",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001299 ":pcm16b_c",
mbonadei1140f972017-04-26 03:38:35 -07001300 "..:module_api",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001301 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -07001302 "../../api:optional",
kwiberg087bd342017-02-10 08:15:44 -08001303 "../../api/audio_codecs:builtin_audio_decoder_factory",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001304 "../../rtc_base:rtc_base_approved",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001305 "../../system_wrappers:system_wrappers",
ehmaldonado9cbb0a12017-01-30 03:07:03 -08001306 "../../test:test_support",
1307 ]
1308 defines = audio_coding_defines
1309 if (is_win) {
1310 cflags = [
1311 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
1312 "/wd4373", # virtual function override.
1313 ]
1314 }
1315 if (!build_with_chromium && is_clang) {
1316 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
1317 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1318 }
1319 }
1320
ehmaldonado021eef32017-01-05 07:09:50 -08001321 rtc_source_set("audio_coding_perf_tests") {
1322 testonly = true
kjellandere0629c02017-04-25 04:04:50 -07001323
1324 # Skip restricting visibility on mobile platforms since the tests on those
1325 # gets additional generated targets which would require many lines here to
1326 # cover (which would be confusing to read and hard to maintain).
1327 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -07001328 visibility = [ "../..:webrtc_perf_tests" ]
kjellandere0629c02017-04-25 04:04:50 -07001329 }
ehmaldonado021eef32017-01-05 07:09:50 -08001330 sources = [
1331 "codecs/opus/opus_complexity_unittest.cc",
1332 "neteq/test/neteq_performance_unittest.cc",
1333 ]
1334 deps = [
1335 ":neteq_test_support",
henrik.lundinb637a942017-04-28 00:59:45 -07001336 ":neteq_test_tools",
ehmaldonado021eef32017-01-05 07:09:50 -08001337 ":webrtc_opus",
1338 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001339 "../../rtc_base:protobuf_utils",
1340 "../../rtc_base:rtc_base_approved",
ehmaldonado021eef32017-01-05 07:09:50 -08001341 "../../system_wrappers:system_wrappers",
1342 "../../test:test_support",
1343 ]
mbonadei7c2c8432017-04-07 00:59:12 -07001344
ehmaldonado021eef32017-01-05 07:09:50 -08001345 if (!build_with_chromium && is_clang) {
1346 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
1347 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1348 }
1349 }
1350
ehmaldonado38a21322016-09-02 04:10:34 -07001351 rtc_source_set("acm_receive_test") {
kjellanderfb114242016-06-13 00:19:48 -07001352 testonly = true
1353 sources = [
henrik.lundin2504c0a2016-10-06 01:31:32 -07001354 "acm2/acm_receive_test.cc",
1355 "acm2/acm_receive_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001356 ]
1357
kjellanderfb114242016-06-13 00:19:48 -07001358 defines = audio_coding_defines
1359
1360 deps = audio_coding_deps + [
1361 ":audio_coding",
kjellander676e08f2016-12-07 08:23:27 -08001362 ":audio_format_conversion",
kwiberg087bd342017-02-10 08:15:44 -08001363 "../../api/audio_codecs:audio_codecs_api",
1364 "../../api/audio_codecs:builtin_audio_decoder_factory",
henrik.lundinb637a942017-04-28 00:59:45 -07001365 ":neteq_tools",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001366 "../../rtc_base:rtc_base_approved",
kjellander676e08f2016-12-07 08:23:27 -08001367 "../../test:test_support",
kjellanderfb114242016-06-13 00:19:48 -07001368 "//testing/gtest",
1369 ]
1370 }
1371
ehmaldonado38a21322016-09-02 04:10:34 -07001372 rtc_source_set("acm_send_test") {
kjellanderfb114242016-06-13 00:19:48 -07001373 testonly = true
1374 sources = [
henrik.lundin2504c0a2016-10-06 01:31:32 -07001375 "acm2/acm_send_test.cc",
1376 "acm2/acm_send_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001377 ]
1378
kjellanderfb114242016-06-13 00:19:48 -07001379 defines = audio_coding_defines
1380
1381 deps = audio_coding_deps + [
1382 ":audio_coding",
henrik.lundinb637a942017-04-28 00:59:45 -07001383 ":neteq_tools",
ossueb1fde42017-05-02 06:46:30 -07001384 "../../api/audio_codecs:audio_codecs_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001385 "../../rtc_base:rtc_base_approved",
kjellander676e08f2016-12-07 08:23:27 -08001386 "../../test:test_support",
kjellanderfb114242016-06-13 00:19:48 -07001387 "//testing/gtest",
1388 ]
1389 }
1390
ehmaldonado38a21322016-09-02 04:10:34 -07001391 rtc_executable("delay_test") {
aleloi333f2062016-07-28 01:21:29 -07001392 testonly = true
1393 sources = [
1394 "test/Channel.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001395 "test/Channel.h",
aleloi333f2062016-07-28 01:21:29 -07001396 "test/PCMFile.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001397 "test/PCMFile.h",
aleloi333f2062016-07-28 01:21:29 -07001398 "test/delay_test.cc",
1399 "test/utility.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001400 "test/utility.h",
aleloi333f2062016-07-28 01:21:29 -07001401 ]
1402
aleloi333f2062016-07-28 01:21:29 -07001403 deps = [
1404 ":audio_coding",
kwiberg65cb70d2017-03-03 06:16:28 -08001405 ":audio_coding_module_typedefs",
kwibergda2bf4e2016-10-24 13:47:09 -07001406 ":audio_format_conversion",
mbonadei1140f972017-04-26 03:38:35 -07001407 "..:module_api",
aleloi333f2062016-07-28 01:21:29 -07001408 "../../:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -07001409 "../../api:optional",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001410 "../../rtc_base:rtc_base_approved",
aleloi333f2062016-07-28 01:21:29 -07001411 "../../system_wrappers",
1412 "../../system_wrappers:system_wrappers_default",
1413 "../../test:test_support",
1414 "../rtp_rtcp",
1415 "//testing/gtest",
aleloi333f2062016-07-28 01:21:29 -07001416 ]
1417 } # delay_test
1418
ehmaldonado38a21322016-09-02 04:10:34 -07001419 rtc_executable("insert_packet_with_timing") {
aleloi00730c72016-07-28 01:27:10 -07001420 testonly = true
1421 sources = [
1422 "test/Channel.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001423 "test/Channel.h",
aleloi00730c72016-07-28 01:27:10 -07001424 "test/PCMFile.cc",
henrik.lundina8e2c632017-05-11 07:18:06 -07001425 "test/PCMFile.h",
aleloi00730c72016-07-28 01:27:10 -07001426 "test/insert_packet_with_timing.cc",
1427 ]
1428
kjellandere40a7ee2016-10-16 23:56:12 -07001429 if (!build_with_chromium && is_clang) {
1430 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001431 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloi00730c72016-07-28 01:27:10 -07001432 }
1433
1434 deps = [
1435 ":audio_coding",
kwibergda2bf4e2016-10-24 13:47:09 -07001436 ":audio_format_conversion",
mbonadei1140f972017-04-26 03:38:35 -07001437 "..:module_api",
aleloi00730c72016-07-28 01:27:10 -07001438 "../../:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -07001439 "../../api:optional",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001440 "../../rtc_base:rtc_base_approved",
aleloi00730c72016-07-28 01:27:10 -07001441 "../../system_wrappers",
1442 "../../system_wrappers:system_wrappers_default",
1443 "../../test:test_support",
1444 "../rtp_rtcp",
1445 "//testing/gtest",
aleloi00730c72016-07-28 01:27:10 -07001446 ]
1447 } # insert_packet_with_timing
1448
ehmaldonado3a7f35b2016-09-14 05:10:01 -07001449 audio_decoder_unittests_resources =
jianjun.zhuc0247402017-07-11 06:20:45 -07001450 [ "../../../resources/audio_coding/testfile32kHz.pcm" ]
kjellander32c4a202016-08-30 02:53:49 -07001451
1452 if (is_ios) {
1453 bundle_data("audio_decoder_unittests_bundle_data") {
1454 testonly = true
1455 sources = audio_decoder_unittests_resources
1456 outputs = [
1457 "{{bundle_resources_dir}}/{{source_file_part}}",
1458 ]
1459 }
1460 }
1461
ehmaldonado38a21322016-09-02 04:10:34 -07001462 rtc_test("audio_decoder_unittests") {
charujainddf3e4a2016-08-01 07:49:42 -07001463 testonly = true
1464 sources = [
1465 "neteq/audio_decoder_unittest.cc",
1466 ]
1467
kjellandere40a7ee2016-10-16 23:56:12 -07001468 if (!build_with_chromium && is_clang) {
1469 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001470 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
charujainddf3e4a2016-08-01 07:49:42 -07001471 }
1472
1473 deps = []
1474
1475 defines = neteq_defines
1476
1477 deps += audio_coding_deps
1478 deps += [
ehmaldonado87b8e9f2017-02-07 06:26:29 -08001479 ":ilbc",
charujainddf3e4a2016-08-01 07:49:42 -07001480 ":isac",
1481 ":isac_fix",
1482 ":neteq",
henrik.lundinb637a942017-04-28 00:59:45 -07001483 ":neteq_tools",
kwiberg087bd342017-02-10 08:15:44 -08001484 "../../api/audio_codecs:audio_codecs_api",
kwiberg96da0112017-06-30 04:23:22 -07001485 "../../api/audio_codecs/opus:audio_encoder_opus",
kjellander6ceab082016-10-28 05:44:03 -07001486 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001487 "../../rtc_base:protobuf_utils",
ehmaldonado26bddb92016-11-30 06:12:01 -08001488 "../../test:test_main",
charujainddf3e4a2016-08-01 07:49:42 -07001489 "//testing/gtest",
1490 ]
1491
ehmaldonado3a7f35b2016-09-14 05:10:01 -07001492 data = audio_decoder_unittests_resources
1493
charujainddf3e4a2016-08-01 07:49:42 -07001494 if (is_android) {
1495 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -07001496 shard_timeout = 900
charujainddf3e4a2016-08-01 07:49:42 -07001497 }
kjellander32c4a202016-08-30 02:53:49 -07001498 if (is_ios) {
1499 deps += [ ":audio_decoder_unittests_bundle_data" ]
charujainddf3e4a2016-08-01 07:49:42 -07001500 }
1501 } # audio_decoder_unittests
1502
kjellanderfb114242016-06-13 00:19:48 -07001503 if (rtc_enable_protobuf) {
1504 proto_library("neteq_unittest_proto") {
1505 sources = [
1506 "neteq/neteq_unittest.proto",
1507 ]
kjellandere3e902e2017-02-28 08:01:46 -08001508 proto_out_dir = "webrtc/modules/audio_coding/neteq"
kjellanderfb114242016-06-13 00:19:48 -07001509 }
henrik.lundin03153f12016-06-21 05:38:42 -07001510
ehmaldonado38a21322016-09-02 04:10:34 -07001511 rtc_test("neteq_rtpplay") {
henrik.lundin03153f12016-06-21 05:38:42 -07001512 testonly = true
1513 defines = []
mbonadei1140f972017-04-26 03:38:35 -07001514 deps = [
1515 "..:module_api",
1516 ]
henrik.lundin03153f12016-06-21 05:38:42 -07001517 sources = [
1518 "neteq/tools/neteq_rtpplay.cc",
1519 ]
1520
kjellandere40a7ee2016-10-16 23:56:12 -07001521 if (!build_with_chromium && is_clang) {
1522 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001523 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
henrik.lundin03153f12016-06-21 05:38:42 -07001524 }
1525
1526 if (is_win) {
1527 cflags = [
1528 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
1529 "/wd4373", # virtual function override.
1530 ]
1531 }
1532
1533 deps += [
1534 ":neteq",
henrik.lundinb637a942017-04-28 00:59:45 -07001535 ":neteq_test_tools",
kjellander676e08f2016-12-07 08:23:27 -08001536 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001537 "../../rtc_base:rtc_base_approved",
henrik.lundin03153f12016-06-21 05:38:42 -07001538 "../../system_wrappers:system_wrappers_default",
1539 "../../test:test_support",
henrik.lundin03153f12016-06-21 05:38:42 -07001540 ]
1541 }
kjellanderfb114242016-06-13 00:19:48 -07001542 }
1543
minyue81f1da32017-07-27 05:49:57 -07001544 audio_codec_speed_tests_resources = [
1545 "//resources/audio_coding/music_stereo_48kHz.pcm",
1546 "//resources/audio_coding/speech_mono_16kHz.pcm",
1547 "//resources/audio_coding/speech_mono_32_48kHz.pcm",
1548 ]
1549
1550 if (is_ios) {
1551 bundle_data("audio_codec_speed_tests_data") {
1552 testonly = true
1553 sources = audio_codec_speed_tests_resources
1554 outputs = [
1555 "{{bundle_resources_dir}}/{{source_file_part}}",
1556 ]
1557 }
1558 }
1559
ehmaldonado38a21322016-09-02 04:10:34 -07001560 rtc_test("audio_codec_speed_tests") {
aleloie6b60a42016-07-28 02:34:30 -07001561 testonly = true
1562 defines = []
1563 deps = []
1564 sources = [
1565 "codecs/isac/fix/test/isac_speed_test.cc",
1566 "codecs/opus/opus_speed_test.cc",
1567 "codecs/tools/audio_codec_speed_test.cc",
1568 "codecs/tools/audio_codec_speed_test.h",
1569 ]
1570
kjellandere40a7ee2016-10-16 23:56:12 -07001571 if (!build_with_chromium && is_clang) {
1572 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001573 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloie6b60a42016-07-28 02:34:30 -07001574 }
1575
minyue81f1da32017-07-27 05:49:57 -07001576 data = audio_codec_speed_tests_resources
1577
aleloie6b60a42016-07-28 02:34:30 -07001578 if (is_android) {
1579 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -07001580 shard_timeout = 900
aleloie6b60a42016-07-28 02:34:30 -07001581 }
1582
minyue81f1da32017-07-27 05:49:57 -07001583 if (is_ios) {
1584 deps += [ ":audio_codec_speed_tests_data" ]
1585 }
1586
aleloie6b60a42016-07-28 02:34:30 -07001587 deps += [
1588 ":isac_fix",
1589 ":webrtc_opus",
kjellander676e08f2016-12-07 08:23:27 -08001590 "../..:webrtc_common",
Stefan Holmer1acbd682017-09-01 15:29:28 +02001591 "../../api:libjingle_peerconnection_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001592 "../../rtc_base:rtc_base_approved",
Stefan Holmer1acbd682017-09-01 15:29:28 +02001593 "../../system_wrappers:metrics_default",
aleloie6b60a42016-07-28 02:34:30 -07001594 "../../system_wrappers:system_wrappers_default",
Stefan Holmer1acbd682017-09-01 15:29:28 +02001595 "../../test:field_trial",
ehmaldonado26bddb92016-11-30 06:12:01 -08001596 "../../test:test_main",
kjellander6ceab082016-10-28 05:44:03 -07001597 "../audio_processing",
aleloie6b60a42016-07-28 02:34:30 -07001598 "//testing/gtest",
1599 ]
1600 }
1601
ehmaldonado38a21322016-09-02 04:10:34 -07001602 rtc_source_set("neteq_test_support") {
kjellanderfb114242016-06-13 00:19:48 -07001603 testonly = true
1604 sources = [
1605 "neteq/tools/neteq_external_decoder_test.cc",
1606 "neteq/tools/neteq_external_decoder_test.h",
1607 "neteq/tools/neteq_performance_test.cc",
1608 "neteq/tools/neteq_performance_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001609 ]
1610
kjellandere40a7ee2016-10-16 23:56:12 -07001611 if (!build_with_chromium && is_clang) {
1612 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001613 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -07001614 }
1615
1616 deps = [
1617 ":neteq",
henrik.lundinb637a942017-04-28 00:59:45 -07001618 ":neteq_test_tools",
kjellanderfb114242016-06-13 00:19:48 -07001619 ":pcm16b",
mbonadei1140f972017-04-26 03:38:35 -07001620 "..:module_api",
kjellander676e08f2016-12-07 08:23:27 -08001621 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001622 "../../api/audio_codecs:audio_codecs_api",
1623 "../../api/audio_codecs:builtin_audio_decoder_factory",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001624 "../../rtc_base:rtc_base_approved",
kjellander676e08f2016-12-07 08:23:27 -08001625 "../../system_wrappers",
1626 "../../test:test_support",
kjellanderfb114242016-06-13 00:19:48 -07001627 "//testing/gtest",
kjellanderfb114242016-06-13 00:19:48 -07001628 ]
1629 }
1630
ehmaldonado38a21322016-09-02 04:10:34 -07001631 rtc_source_set("neteq_quality_test_support") {
ehmaldonado861da3c2016-08-19 07:02:24 -07001632 testonly = true
1633 sources = [
1634 "neteq/tools/neteq_quality_test.cc",
1635 "neteq/tools/neteq_quality_test.h",
1636 ]
1637
kjellandere40a7ee2016-10-16 23:56:12 -07001638 if (!build_with_chromium && is_clang) {
1639 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001640 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ehmaldonado861da3c2016-08-19 07:02:24 -07001641 }
1642
1643 deps = [
1644 ":neteq",
henrik.lundinb637a942017-04-28 00:59:45 -07001645 ":neteq_test_tools",
mbonadei1140f972017-04-26 03:38:35 -07001646 "..:module_api",
kjellander676e08f2016-12-07 08:23:27 -08001647 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08001648 "../../api/audio_codecs:builtin_audio_decoder_factory",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001649 "../../rtc_base:rtc_base_approved",
kjellander676e08f2016-12-07 08:23:27 -08001650 "../../test:test_support",
ehmaldonado6c46eaa2016-08-22 09:48:02 -07001651 "//testing/gtest",
ehmaldonado861da3c2016-08-19 07:02:24 -07001652 ]
1653 }
1654
henrik.lundinb637a942017-04-28 00:59:45 -07001655 rtc_source_set("neteq_test_tools_deprecated") {
aleloi3022a342016-07-26 06:36:03 -07001656 testonly = true
1657 sources = [
1658 "neteq/test/NETEQTEST_DummyRTPpacket.cc",
1659 "neteq/test/NETEQTEST_DummyRTPpacket.h",
1660 "neteq/test/NETEQTEST_RTPpacket.cc",
1661 "neteq/test/NETEQTEST_RTPpacket.h",
1662 ]
1663
1664 deps = [
1665 ":cng",
1666 ":g711",
1667 ":g722",
1668 ":ilbc",
1669 ":isac",
1670 ":pcm16b",
mbonadei1140f972017-04-26 03:38:35 -07001671 "..:module_api",
aleloi3022a342016-07-26 06:36:03 -07001672 "../..:webrtc_common",
1673 "//testing/gtest",
1674 ]
1675
1676 include_dirs = [
1677 "neteq/include",
1678 "neteq/test",
1679 "../../",
1680 ]
1681
1682 if (is_win) {
1683 cflags = [
1684 # Disable warnings to enable Win64 build, issue 1323.
1685 "/wd4267", # size_t to int truncation
1686 ]
1687 }
1688 }
aleloi47bded42016-07-26 06:46:19 -07001689
aleloi82667732016-08-02 01:45:50 -07001690 config("RTPencode_config") {
1691 defines = [
1692 "CODEC_ILBC",
1693 "CODEC_PCM16B",
1694 "CODEC_G711",
1695 "CODEC_G722",
1696 "CODEC_ISAC",
1697 "CODEC_PCM16B_WB",
1698 "CODEC_ISAC_SWB",
1699 "CODEC_PCM16B_32KHZ",
1700 "CODEC_PCM16B_48KHZ",
1701 "CODEC_CNGCODEC8",
1702 "CODEC_CNGCODEC16",
1703 "CODEC_CNGCODEC32",
1704 "CODEC_ATEVENT_DECODE",
1705 "CODEC_RED",
1706 "CODEC_OPUS",
1707 ]
1708 }
1709
ehmaldonado38a21322016-09-02 04:10:34 -07001710 rtc_executable("RTPencode") {
aleloi82667732016-08-02 01:45:50 -07001711 testonly = true
1712
1713 deps = [
1714 # TODO(hlundin): Make RTPencode use ACM to encode files.
1715 ":cng",
1716 ":g711",
1717 ":g722",
1718 ":ilbc",
1719 ":isac",
kjellander676e08f2016-12-07 08:23:27 -08001720 ":neteq",
henrik.lundinb637a942017-04-28 00:59:45 -07001721 ":neteq_test_tools_deprecated",
aleloi82667732016-08-02 01:45:50 -07001722 ":pcm16b",
1723 ":webrtc_opus",
kjellander676e08f2016-12-07 08:23:27 -08001724 "../..:webrtc_common",
aleloi82667732016-08-02 01:45:50 -07001725 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001726 "../../rtc_base:rtc_base_approved",
Stefan Holmer1acbd682017-09-01 15:29:28 +02001727 "../../system_wrappers:metrics_default",
1728 "../../test:field_trial",
aleloi82667732016-08-02 01:45:50 -07001729 ]
1730
1731 configs += [ ":RTPencode_config" ]
1732
1733 sources = [
henrik.lundina8e2c632017-05-11 07:18:06 -07001734 "neteq/test/PayloadTypes.h",
aleloi82667732016-08-02 01:45:50 -07001735 "neteq/test/RTPencode.cc",
1736 ]
1737
1738 include_dirs = [
1739 "neteq/include",
1740 "neteq/test",
1741 ]
1742
1743 if (is_win) {
1744 cflags = [
1745 # Disable warnings to enable Win64 build, issue 1323.
1746 "/wd4267", # size_t to int truncation
1747 ]
1748 }
1749 }
1750
ehmaldonado38a21322016-09-02 04:10:34 -07001751 rtc_executable("RTPchange") {
aleloi76cbe192016-08-02 02:05:03 -07001752 testonly = true
1753
1754 sources = [
1755 "neteq/test/RTPchange.cc",
1756 ]
1757
1758 deps = [
henrik.lundinb637a942017-04-28 00:59:45 -07001759 ":neteq_test_tools_deprecated",
aleloi76cbe192016-08-02 02:05:03 -07001760 ]
1761 }
1762
ehmaldonado38a21322016-09-02 04:10:34 -07001763 rtc_executable("rtpcat") {
aleloi5556dcb2016-08-02 04:27:25 -07001764 testonly = true
1765
1766 sources = [
1767 "neteq/tools/rtpcat.cc",
1768 ]
1769
1770 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -07001771 "../../rtc_base:rtc_base_approved",
aleloi5556dcb2016-08-02 04:27:25 -07001772 "../../system_wrappers:system_wrappers_default",
1773 "../../test:rtp_test_utils",
1774 "//testing/gtest",
1775 ]
1776 }
1777
ehmaldonado38a21322016-09-02 04:10:34 -07001778 rtc_executable("RTPtimeshift") {
aleloi5a746502016-08-02 06:06:33 -07001779 testonly = true
1780
1781 sources = [
1782 "neteq/test/RTPtimeshift.cc",
1783 ]
1784
1785 deps = [
henrik.lundinb637a942017-04-28 00:59:45 -07001786 ":neteq_test_tools_deprecated",
kjellander676e08f2016-12-07 08:23:27 -08001787 "../../test:test_support",
aleloi5a746502016-08-02 06:06:33 -07001788 "//testing/gtest",
1789 ]
1790 }
1791
ehmaldonado38a21322016-09-02 04:10:34 -07001792 rtc_executable("RTPjitter") {
aleloi17dfa742016-08-03 01:17:25 -07001793 testonly = true
1794 deps = [
1795 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001796 "../../rtc_base:rtc_base_approved",
kjellander676e08f2016-12-07 08:23:27 -08001797 "../../test:test_support",
aleloi17dfa742016-08-03 01:17:25 -07001798 "//testing/gtest",
1799 ]
1800 sources = [
1801 "neteq/test/RTPjitter.cc",
1802 ]
1803 }
1804
ehmaldonado38a21322016-09-02 04:10:34 -07001805 rtc_executable("rtp_analyze") {
aleloi47bded42016-07-26 06:46:19 -07001806 testonly = true
1807
1808 sources = [
1809 "neteq/tools/rtp_analyze.cc",
1810 ]
1811
1812 deps = [
1813 ":neteq",
henrik.lundinb637a942017-04-28 00:59:45 -07001814 ":neteq_test_tools",
aleloi47bded42016-07-26 06:46:19 -07001815 ":pcm16b",
oprypin6e09d872017-08-31 03:21:39 -07001816 "../../rtc_base:rtc_base_approved",
aleloi47bded42016-07-26 06:46:19 -07001817 "../../system_wrappers:system_wrappers_default",
1818 "//testing/gtest",
aleloi47bded42016-07-26 06:46:19 -07001819 ]
1820
kjellandere40a7ee2016-10-16 23:56:12 -07001821 if (!build_with_chromium && is_clang) {
1822 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001823 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloi47bded42016-07-26 06:46:19 -07001824 }
1825 }
aleloi630c6d52016-08-10 02:11:30 -07001826
ehmaldonado38a21322016-09-02 04:10:34 -07001827 rtc_executable("neteq_opus_quality_test") {
aleloi630c6d52016-08-10 02:11:30 -07001828 testonly = true
1829
1830 sources = [
1831 "neteq/test/neteq_opus_quality_test.cc",
1832 ]
1833
1834 deps = [
1835 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001836 ":neteq_quality_test_support",
henrik.lundinb637a942017-04-28 00:59:45 -07001837 ":neteq_tools",
aleloi630c6d52016-08-10 02:11:30 -07001838 ":webrtc_opus",
oprypin9b2f20c2017-08-29 05:51:57 -07001839 "../../rtc_base:rtc_base_approved",
ehmaldonado26bddb92016-11-30 06:12:01 -08001840 "../../test:test_main",
aleloi630c6d52016-08-10 02:11:30 -07001841 "//testing/gtest",
aleloi630c6d52016-08-10 02:11:30 -07001842 ]
aleloi630c6d52016-08-10 02:11:30 -07001843 }
aleloi116fd612016-08-10 04:16:36 -07001844
ehmaldonado38a21322016-09-02 04:10:34 -07001845 rtc_executable("neteq_speed_test") {
aleloi116fd612016-08-10 04:16:36 -07001846 testonly = true
1847
1848 sources = [
1849 "neteq/test/neteq_speed_test.cc",
1850 ]
1851
1852 deps = [
1853 ":neteq",
1854 ":neteq_test_support",
kjellander676e08f2016-12-07 08:23:27 -08001855 "../..:webrtc_common",
oprypin6e09d872017-08-31 03:21:39 -07001856 "../../rtc_base:rtc_base_approved",
aleloi116fd612016-08-10 04:16:36 -07001857 "../../system_wrappers:system_wrappers_default",
1858 "../../test:test_support",
aleloi116fd612016-08-10 04:16:36 -07001859 ]
1860 }
aleloi63910122016-08-10 04:41:14 -07001861
ehmaldonado38a21322016-09-02 04:10:34 -07001862 rtc_executable("neteq_ilbc_quality_test") {
aleloi0e0be0a2016-08-10 04:55:20 -07001863 testonly = true
1864
1865 sources = [
1866 "neteq/test/neteq_ilbc_quality_test.cc",
1867 ]
1868
1869 deps = [
1870 ":ilbc",
1871 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001872 ":neteq_quality_test_support",
henrik.lundinb637a942017-04-28 00:59:45 -07001873 ":neteq_tools",
kjellander676e08f2016-12-07 08:23:27 -08001874 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001875 "../../rtc_base:rtc_base_approved",
aleloi0e0be0a2016-08-10 04:55:20 -07001876 "../../system_wrappers:system_wrappers_default",
ehmaldonado26bddb92016-11-30 06:12:01 -08001877 "../../test:test_main",
aleloi0e0be0a2016-08-10 04:55:20 -07001878 "//testing/gtest",
aleloi0e0be0a2016-08-10 04:55:20 -07001879 ]
1880 }
aleloi6df36dc2016-08-10 05:04:47 -07001881
ehmaldonado38a21322016-09-02 04:10:34 -07001882 rtc_executable("neteq_isac_quality_test") {
aleloi6df36dc2016-08-10 05:04:47 -07001883 testonly = true
1884
1885 sources = [
1886 "neteq/test/neteq_isac_quality_test.cc",
1887 ]
1888
1889 deps = [
1890 ":isac_fix",
1891 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001892 ":neteq_quality_test_support",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001893 "../../rtc_base:rtc_base_approved",
ehmaldonado26bddb92016-11-30 06:12:01 -08001894 "../../test:test_main",
aleloi6df36dc2016-08-10 05:04:47 -07001895 "//testing/gtest",
aleloi6df36dc2016-08-10 05:04:47 -07001896 ]
1897 }
aleloic4ac7002016-08-10 05:06:27 -07001898
ehmaldonado38a21322016-09-02 04:10:34 -07001899 rtc_executable("neteq_pcmu_quality_test") {
aleloic4ac7002016-08-10 05:06:27 -07001900 testonly = true
1901
1902 sources = [
1903 "neteq/test/neteq_pcmu_quality_test.cc",
1904 ]
1905
1906 deps = [
1907 ":g711",
1908 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001909 ":neteq_quality_test_support",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001910 "../../rtc_base:rtc_base_approved",
ehmaldonado26bddb92016-11-30 06:12:01 -08001911 "../../test:test_main",
aleloic4ac7002016-08-10 05:06:27 -07001912 "//testing/gtest",
aleloic4ac7002016-08-10 05:06:27 -07001913 ]
1914 }
aleloib7186d02016-08-16 01:47:16 -07001915
ehmaldonado38a21322016-09-02 04:10:34 -07001916 rtc_executable("isac_fix_test") {
aleloib7186d02016-08-16 01:47:16 -07001917 testonly = true
1918
1919 sources = [
1920 "codecs/isac/fix/test/kenny.cc",
1921 ]
1922
1923 deps = [
1924 ":isac_fix",
1925 "../../test:test_support",
1926 ]
1927
ehmaldonado25586ce2017-09-07 23:18:35 -07001928 data = [
1929 "../../../resources/speech_and_misc_wb.pcm",
1930 ]
1931
aleloib7186d02016-08-16 01:47:16 -07001932 if (is_win) {
1933 cflags = [
1934 # Disable warnings to enable Win64 build, issue 1323.
1935 "/wd4267", # size_t to int truncation
1936 ]
1937 }
1938 }
aleloi16f55a12016-08-23 08:08:23 -07001939
ehmaldonadod02fe4b2016-08-26 13:31:24 -07001940 config("isac_test_warnings_config") {
1941 if (is_win && is_clang) {
1942 cflags = [
1943 # Disable warnings failing when compiling with Clang on Windows.
1944 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
1945 "-Wno-format",
1946 ]
1947 }
1948 }
1949
kjellander7439f972016-12-05 22:47:46 -08001950 rtc_source_set("isac_test_util") {
1951 testonly = true
1952 sources = [
1953 "codecs/isac/main/util/utility.c",
1954 ]
1955 }
1956
ehmaldonado38a21322016-09-02 04:10:34 -07001957 rtc_executable("isac_test") {
ivoce51b41a2016-08-24 02:25:57 -07001958 testonly = true
1959
1960 sources = [
1961 "codecs/isac/main/test/simpleKenny.c",
ivoce51b41a2016-08-24 02:25:57 -07001962 ]
1963
1964 include_dirs = [
1965 "codecs/isac/main/include",
1966 "codecs/isac/main/test",
1967 "codecs/isac/main/util",
1968 ]
1969
1970 deps = [
1971 ":isac",
kjellander7439f972016-12-05 22:47:46 -08001972 ":isac_test_util",
ehmaldonadof6a861a2017-07-19 10:40:47 -07001973 "../../rtc_base:rtc_base_approved",
ivoce51b41a2016-08-24 02:25:57 -07001974 ]
1975
ehmaldonadod02fe4b2016-08-26 13:31:24 -07001976 configs += [ ":isac_test_warnings_config" ]
ivoce51b41a2016-08-24 02:25:57 -07001977 }
1978
ehmaldonado38a21322016-09-02 04:10:34 -07001979 rtc_executable("g711_test") {
aleloi16f55a12016-08-23 08:08:23 -07001980 testonly = true
1981
1982 sources = [
1983 "codecs/g711/test/testG711.cc",
1984 ]
1985
aleloi16f55a12016-08-23 08:08:23 -07001986 deps = [
1987 ":g711",
1988 ]
1989 }
aleloi9a117842016-08-23 08:36:10 -07001990
ehmaldonado38a21322016-09-02 04:10:34 -07001991 rtc_executable("g722_test") {
aleloi9a117842016-08-23 08:36:10 -07001992 testonly = true
1993
1994 sources = [
1995 "codecs/g722/test/testG722.cc",
1996 ]
1997
aleloi9a117842016-08-23 08:36:10 -07001998 deps = [
1999 ":g722",
2000 "../..:webrtc_common",
2001 ]
2002 }
ivoc2c670db2016-08-24 06:11:18 -07002003
ehmaldonado38a21322016-09-02 04:10:34 -07002004 rtc_executable("isac_api_test") {
aleloicfee2152016-08-29 04:09:19 -07002005 testonly = true
2006
2007 sources = [
2008 "codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc",
aleloicfee2152016-08-29 04:09:19 -07002009 ]
2010
aleloicfee2152016-08-29 04:09:19 -07002011 deps = [
2012 ":isac",
kjellander7439f972016-12-05 22:47:46 -08002013 ":isac_test_util",
ehmaldonadof6a861a2017-07-19 10:40:47 -07002014 "../../rtc_base:rtc_base_approved",
aleloicfee2152016-08-29 04:09:19 -07002015 ]
2016
2017 include_dirs = [
2018 "codecs/isac/main/include",
2019 "codecs/isac/main/test",
2020 "codecs/isac/main/util",
2021 ]
2022 }
2023
ehmaldonado38a21322016-09-02 04:10:34 -07002024 rtc_executable("isac_switch_samprate_test") {
aleloicfee2152016-08-29 04:09:19 -07002025 testonly = true
2026
2027 sources = [
2028 "codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc",
aleloicfee2152016-08-29 04:09:19 -07002029 ]
2030
aleloicfee2152016-08-29 04:09:19 -07002031 deps = [
2032 ":isac",
kjellander7439f972016-12-05 22:47:46 -08002033 ":isac_test_util",
aleloicfee2152016-08-29 04:09:19 -07002034 ]
2035
2036 include_dirs = [
2037 "codecs/isac/main/include",
2038 "codecs/isac/main/test",
2039 "codecs/isac/main/util",
2040 "../../common_audio/signal_processing/include",
2041 ]
2042 }
2043
ehmaldonado38a21322016-09-02 04:10:34 -07002044 rtc_executable("ilbc_test") {
aleloicfee2152016-08-29 04:09:19 -07002045 testonly = true
2046
2047 sources = [
2048 "codecs/ilbc/test/iLBC_test.c",
2049 ]
2050
aleloicfee2152016-08-29 04:09:19 -07002051 deps = [
2052 ":ilbc",
aleloicfee2152016-08-29 04:09:19 -07002053 ]
2054 }
2055
ehmaldonado38a21322016-09-02 04:10:34 -07002056 rtc_executable("webrtc_opus_fec_test") {
ivoc2c670db2016-08-24 06:11:18 -07002057 testonly = true
2058
2059 sources = [
2060 "codecs/opus/opus_fec_test.cc",
2061 ]
2062
2063 deps = [
2064 ":webrtc_opus",
ivoc2c670db2016-08-24 06:11:18 -07002065 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -07002066 "../../rtc_base:rtc_base_approved",
ehmaldonado26bddb92016-11-30 06:12:01 -08002067 "../../test:test_main",
ivoc2c670db2016-08-24 06:11:18 -07002068 "//testing/gtest",
2069 ]
2070
kjellandere40a7ee2016-10-16 23:56:12 -07002071 if (!build_with_chromium && is_clang) {
2072 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07002073 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ivoc2c670db2016-08-24 06:11:18 -07002074 }
2075 }
ehmaldonado36268652017-01-19 08:27:11 -08002076
2077 rtc_source_set("audio_coding_unittests") {
2078 testonly = true
2079
kjellandere0629c02017-04-25 04:04:50 -07002080 # Skip restricting visibility on mobile platforms since the tests on those
2081 # gets additional generated targets which would require many lines here to
2082 # cover (which would be confusing to read and hard to maintain).
2083 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -07002084 visibility = [ "..:modules_unittests" ]
kjellandere0629c02017-04-25 04:04:50 -07002085 }
ehmaldonado36268652017-01-19 08:27:11 -08002086 sources = [
2087 "acm2/acm_receiver_unittest.cc",
2088 "acm2/audio_coding_module_unittest.cc",
2089 "acm2/call_statistics_unittest.cc",
2090 "acm2/codec_manager_unittest.cc",
2091 "acm2/rent_a_codec_unittest.cc",
2092 "audio_network_adaptor/audio_network_adaptor_impl_unittest.cc",
2093 "audio_network_adaptor/bitrate_controller_unittest.cc",
2094 "audio_network_adaptor/channel_controller_unittest.cc",
2095 "audio_network_adaptor/controller_manager_unittest.cc",
2096 "audio_network_adaptor/dtx_controller_unittest.cc",
minyue4b7c9522017-01-24 04:54:59 -08002097 "audio_network_adaptor/event_log_writer_unittest.cc",
elad.alon6d7900d2017-03-24 04:12:56 -07002098 "audio_network_adaptor/fec_controller_plr_based_unittest.cc",
2099 "audio_network_adaptor/fec_controller_rplr_based_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -08002100 "audio_network_adaptor/frame_length_controller_unittest.cc",
2101 "audio_network_adaptor/mock/mock_controller.h",
2102 "audio_network_adaptor/mock/mock_controller_manager.h",
elad.alon326263a2017-03-29 03:16:58 -07002103 "audio_network_adaptor/util/threshold_curve_unittest.cc",
kwiberg087bd342017-02-10 08:15:44 -08002104 "codecs/builtin_audio_decoder_factory_unittest.cc",
ossua1a040a2017-04-06 10:03:21 -07002105 "codecs/builtin_audio_encoder_factory_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -08002106 "codecs/cng/audio_encoder_cng_unittest.cc",
2107 "codecs/cng/cng_unittest.cc",
2108 "codecs/ilbc/ilbc_unittest.cc",
2109 "codecs/isac/fix/source/filterbanks_unittest.cc",
2110 "codecs/isac/fix/source/filters_unittest.cc",
2111 "codecs/isac/fix/source/lpc_masking_model_unittest.cc",
2112 "codecs/isac/fix/source/transform_unittest.cc",
2113 "codecs/isac/main/source/audio_encoder_isac_unittest.cc",
2114 "codecs/isac/main/source/isac_unittest.cc",
2115 "codecs/isac/unittest.cc",
2116 "codecs/legacy_encoded_audio_frame_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -08002117 "codecs/opus/audio_encoder_opus_unittest.cc",
2118 "codecs/opus/opus_unittest.cc",
2119 "codecs/red/audio_encoder_copy_red_unittest.cc",
2120 "neteq/audio_multi_vector_unittest.cc",
2121 "neteq/audio_vector_unittest.cc",
2122 "neteq/background_noise_unittest.cc",
2123 "neteq/buffer_level_filter_unittest.cc",
2124 "neteq/comfort_noise_unittest.cc",
2125 "neteq/decision_logic_unittest.cc",
2126 "neteq/decoder_database_unittest.cc",
2127 "neteq/delay_manager_unittest.cc",
2128 "neteq/delay_peak_detector_unittest.cc",
2129 "neteq/dsp_helper_unittest.cc",
2130 "neteq/dtmf_buffer_unittest.cc",
2131 "neteq/dtmf_tone_generator_unittest.cc",
2132 "neteq/expand_unittest.cc",
2133 "neteq/merge_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -08002134 "neteq/mock/mock_buffer_level_filter.h",
2135 "neteq/mock/mock_decoder_database.h",
2136 "neteq/mock/mock_delay_manager.h",
2137 "neteq/mock/mock_delay_peak_detector.h",
2138 "neteq/mock/mock_dtmf_buffer.h",
2139 "neteq/mock/mock_dtmf_tone_generator.h",
2140 "neteq/mock/mock_expand.h",
2141 "neteq/mock/mock_external_decoder_pcm16b.h",
2142 "neteq/mock/mock_packet_buffer.h",
2143 "neteq/mock/mock_red_payload_splitter.h",
minyue-webrtcfae474c2017-07-05 11:17:40 +02002144 "neteq/mock/mock_statistics_calculator.h",
ehmaldonado36268652017-01-19 08:27:11 -08002145 "neteq/nack_tracker_unittest.cc",
2146 "neteq/neteq_external_decoder_unittest.cc",
2147 "neteq/neteq_impl_unittest.cc",
2148 "neteq/neteq_network_stats_unittest.cc",
2149 "neteq/neteq_stereo_unittest.cc",
2150 "neteq/neteq_unittest.cc",
2151 "neteq/normal_unittest.cc",
2152 "neteq/packet_buffer_unittest.cc",
2153 "neteq/post_decode_vad_unittest.cc",
2154 "neteq/random_vector_unittest.cc",
2155 "neteq/red_payload_splitter_unittest.cc",
2156 "neteq/sync_buffer_unittest.cc",
2157 "neteq/tick_timer_unittest.cc",
2158 "neteq/time_stretch_unittest.cc",
2159 "neteq/timestamp_scaler_unittest.cc",
2160 "neteq/tools/input_audio_file_unittest.cc",
2161 "neteq/tools/packet_unittest.cc",
2162 ]
2163
2164 deps = [
2165 ":acm_receive_test",
2166 ":acm_send_test",
2167 ":audio_coding",
kwiberg65cb70d2017-03-03 06:16:28 -08002168 ":audio_coding_module_typedefs",
ehmaldonado36268652017-01-19 08:27:11 -08002169 ":audio_format_conversion",
2170 ":audio_network_adaptor",
ehmaldonado36268652017-01-19 08:27:11 -08002171 ":cng",
2172 ":g711",
2173 ":ilbc",
kwiberga6ca5182017-01-30 05:28:54 -08002174 ":isac",
ehmaldonado36268652017-01-19 08:27:11 -08002175 ":isac_c",
2176 ":isac_fix",
kwiberg087bd342017-02-10 08:15:44 -08002177 ":legacy_encoded_audio_frame",
ehmaldonado36268652017-01-19 08:27:11 -08002178 ":neteq",
2179 ":neteq_test_support",
henrik.lundinb637a942017-04-28 00:59:45 -07002180 ":neteq_test_tools",
ehmaldonado36268652017-01-19 08:27:11 -08002181 ":pcm16b",
2182 ":red",
2183 ":rent_a_codec",
2184 ":webrtc_opus",
mbonadei1140f972017-04-26 03:38:35 -07002185 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -08002186 "../..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -08002187 "../../api/audio_codecs:audio_codecs_api",
2188 "../../api/audio_codecs:builtin_audio_decoder_factory",
ossueb1fde42017-05-02 06:46:30 -07002189 "../../api/audio_codecs:builtin_audio_encoder_factory",
ehmaldonado36268652017-01-19 08:27:11 -08002190 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -07002191 "../../rtc_base:protobuf_utils",
2192 "../../rtc_base:rtc_base",
2193 "../../rtc_base:rtc_base_approved",
2194 "../../rtc_base:rtc_base_tests_utils",
ehmaldonado36268652017-01-19 08:27:11 -08002195 "../../system_wrappers:system_wrappers",
kwiberg37e99fd2017-04-10 05:15:48 -07002196 "../../test:audio_codec_mocks",
ehmaldonado36268652017-01-19 08:27:11 -08002197 "../../test:field_trial",
2198 "../../test:rtp_test_utils",
2199 "../../test:test_common",
2200 "../../test:test_support",
2201 "//testing/gmock",
2202 "//testing/gtest",
ehmaldonado36268652017-01-19 08:27:11 -08002203 ]
2204
2205 defines = audio_coding_defines
2206
2207 if (rtc_enable_protobuf) {
minyue-webrtc7ed35f42017-06-13 11:49:29 +02002208 defines += [ "WEBRTC_NETEQ_UNITTEST_BITEXACT" ]
ehmaldonado36268652017-01-19 08:27:11 -08002209 deps += [
2210 ":ana_config_proto",
2211 ":neteq_unittest_proto",
2212 ]
2213 }
2214
2215 if (!build_with_chromium && is_clang) {
2216 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
2217 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
2218 }
2219 }
kjellanderfb114242016-06-13 00:19:48 -07002220}
kwiberg087bd342017-02-10 08:15:44 -08002221
2222# For backwards compatibility only! Use
2223# webrtc/api/audio_codecs:audio_codecs_api instead.
2224# TODO(kwiberg): Remove this.
2225rtc_source_set("audio_decoder_interface") {
2226 sources = [
2227 "codecs/audio_decoder.h",
2228 ]
2229 deps = [
2230 "../../api/audio_codecs:audio_codecs_api",
2231 ]
2232}
2233
2234# For backwards compatibility only! Use
ossueb1fde42017-05-02 06:46:30 -07002235# webrtc/api/audio_codecs:audio_codecs_api instead.
2236# TODO(ossu): Remove this.
2237rtc_source_set("audio_encoder_interface") {
2238 sources = [
2239 "codecs/audio_encoder.h",
2240 ]
2241 deps = [
2242 "../../api/audio_codecs:audio_codecs_api",
2243 ]
2244}
2245
2246# For backwards compatibility only! Use
kwiberg087bd342017-02-10 08:15:44 -08002247# webrtc/api/audio_codecs:builtin_audio_decoder_factory instead.
2248# TODO(kwiberg): Remove this.
2249rtc_source_set("builtin_audio_decoder_factory") {
2250 sources = [
2251 "codecs/builtin_audio_decoder_factory.h",
2252 ]
2253 deps = [
2254 "../../api/audio_codecs:builtin_audio_decoder_factory",
2255 ]
2256}
ossueb1fde42017-05-02 06:46:30 -07002257
2258# For backwards compatibility only! Use
2259# webrtc/api/audio_codecs:builtin_audio_decoder_factory instead.
2260# TODO(ossu): Remove this.
2261rtc_source_set("builtin_audio_encoder_factory") {
2262 sources = [
2263 "codecs/builtin_audio_encoder_factory.h",
2264 ]
2265 deps = [
2266 "../../api/audio_codecs:builtin_audio_encoder_factory",
2267 ]
2268}