blob: 80c1be81fd3b2b3102bad118c92ea66a5baf3894 [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
9import("../../build/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
kjellanderb62dbbe2016-09-23 00:38:52 -070042rtc_static_library("audio_decoder_factory_interface") {
kwibergc01c6a42016-04-28 14:23:32 -070043 sources = [
44 "codecs/audio_decoder_factory.h",
45 "codecs/audio_format.cc",
46 "codecs/audio_format.h",
47 ]
kwibergc01c6a42016-04-28 14:23:32 -070048 deps = [
49 "../..:webrtc_common",
50 ]
51}
52
kjellanderb62dbbe2016-09-23 00:38:52 -070053rtc_static_library("builtin_audio_decoder_factory") {
kwibergc01c6a42016-04-28 14:23:32 -070054 sources = [
55 "codecs/builtin_audio_decoder_factory.cc",
56 "codecs/builtin_audio_decoder_factory.h",
57 ]
kwibergc01c6a42016-04-28 14:23:32 -070058 deps = [
59 "../..:webrtc_common",
60 ":audio_decoder_factory_interface",
61 ] + audio_codec_deps
62 defines = audio_codec_defines
63}
64
kjellanderb62dbbe2016-09-23 00:38:52 -070065rtc_static_library("rent_a_codec") {
kwibergfce4a942015-10-27 11:40:24 -070066 sources = [
kjellander3e6db232015-11-26 04:44:54 -080067 "acm2/acm_codec_database.cc",
68 "acm2/acm_codec_database.h",
69 "acm2/rent_a_codec.cc",
70 "acm2/rent_a_codec.h",
kwibergfce4a942015-10-27 11:40:24 -070071 ]
kwiberg0edb05b2016-01-19 05:54:28 -080072 deps = [ "../..:webrtc_common" ] + audio_codec_deps
73 defines = audio_codec_defines
kwibergfce4a942015-10-27 11:40:24 -070074}
75
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000076config("audio_coding_config") {
77 include_dirs = [
kjellander3e6db232015-11-26 04:44:54 -080078 "include",
Henrik Kjellanderff761fb2015-11-04 08:31:52 +010079 "../include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000080 ]
81}
82
kjellanderb62dbbe2016-09-23 00:38:52 -070083rtc_static_library("audio_coding") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000084 sources = [
kjellander3e6db232015-11-26 04:44:54 -080085 "acm2/acm_common_defs.h",
86 "acm2/acm_receiver.cc",
87 "acm2/acm_receiver.h",
88 "acm2/acm_resampler.cc",
89 "acm2/acm_resampler.h",
90 "acm2/audio_coding_module.cc",
kjellander3e6db232015-11-26 04:44:54 -080091 "acm2/call_statistics.cc",
92 "acm2/call_statistics.h",
93 "acm2/codec_manager.cc",
94 "acm2/codec_manager.h",
kjellander3e6db232015-11-26 04:44:54 -080095 "include/audio_coding_module.h",
96 "include/audio_coding_module_typedefs.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000097 ]
98
99 defines = []
100
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700101 public_configs = [ ":audio_coding_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000102
kjellanderfb114242016-06-13 00:19:48 -0700103 if (rtc_include_opus) {
104 public_deps = [
105 ":webrtc_opus",
106 ]
107 }
108
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +0000109 if (is_win) {
110 cflags = [
111 # TODO(kjellander): Bug 261: fix this warning.
112 "/wd4373", # virtual function override.
113 ]
114 }
115
kjellanderfb114242016-06-13 00:19:48 -0700116 deps = audio_coding_deps + [
kwiberg0edb05b2016-01-19 05:54:28 -0800117 ":neteq",
118 ":rent_a_codec",
skvladcc91d282016-10-03 18:31:22 -0700119 "../../logging:rtc_event_log_api",
kwiberg0edb05b2016-01-19 05:54:28 -0800120 ]
kjellanderfb114242016-06-13 00:19:48 -0700121 defines = audio_coding_defines
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000122}
123
kjellanderb62dbbe2016-09-23 00:38:52 -0700124rtc_static_library("audio_decoder_interface") {
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000125 sources = [
126 "codecs/audio_decoder.cc",
127 "codecs/audio_decoder.h",
ossu7f40ba42016-09-21 05:50:37 -0700128 "codecs/legacy_encoded_audio_frame.cc",
129 "codecs/legacy_encoded_audio_frame.h",
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000130 ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200131 deps = [
132 "../..:webrtc_common",
kjellander4e7f6c12016-04-25 21:59:50 -0700133 "../../base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200134 ]
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000135}
136
kjellanderb62dbbe2016-09-23 00:38:52 -0700137rtc_static_library("audio_encoder_interface") {
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000138 sources = [
139 "codecs/audio_encoder.cc",
140 "codecs/audio_encoder.h",
141 ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200142 deps = [
143 "../..:webrtc_common",
kjellander4e7f6c12016-04-25 21:59:50 -0700144 "../../base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200145 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000146}
147
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000148config("cng_config") {
149 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000150 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000151 "codecs/cng/include",
152 ]
153}
154
kjellanderb62dbbe2016-09-23 00:38:52 -0700155rtc_static_library("cng") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000156 sources = [
henrik.lundin@webrtc.orgff1a3e32014-12-10 07:29:08 +0000157 "codecs/cng/audio_encoder_cng.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100158 "codecs/cng/audio_encoder_cng.h",
ossu97ba30e2016-04-25 07:55:58 -0700159 "codecs/cng/webrtc_cng.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100160 "codecs/cng/webrtc_cng.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000161 ]
162
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700163 public_configs = [ ":cng_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000164
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000165 deps = [
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000166 ":audio_encoder_interface",
Henrik Lundind048aa02015-12-03 17:47:21 +0100167 "../../common_audio",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000168 ]
169}
170
171config("red_config") {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200172 include_dirs = [ "codecs/red" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000173}
174
kjellanderb62dbbe2016-09-23 00:38:52 -0700175rtc_static_library("red") {
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000176 sources = [
177 "codecs/red/audio_encoder_copy_red.cc",
178 "codecs/red/audio_encoder_copy_red.h",
179 ]
180
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700181 public_configs = [ ":red_config" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000182
183 deps = [
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000184 ":audio_encoder_interface",
Henrik Lundind048aa02015-12-03 17:47:21 +0100185 "../../common_audio",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000186 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000187}
188
189config("g711_config") {
190 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000191 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000192 "codecs/g711/include",
193 ]
194}
195
kjellanderb62dbbe2016-09-23 00:38:52 -0700196rtc_static_library("g711") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000197 sources = [
kwiberg6faf5be2015-09-22 06:16:51 -0700198 "codecs/g711/audio_decoder_pcm.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100199 "codecs/g711/audio_decoder_pcm.h",
henrik.lundin@webrtc.orgdef1e972014-10-21 12:48:29 +0000200 "codecs/g711/audio_encoder_pcm.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100201 "codecs/g711/audio_encoder_pcm.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000202 "codecs/g711/g711.c",
203 "codecs/g711/g711.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200204 "codecs/g711/g711_interface.c",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100205 "codecs/g711/g711_interface.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000206 ]
207
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700208 public_configs = [ ":g711_config" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000209
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200210 deps = [
Henrik Lundind048aa02015-12-03 17:47:21 +0100211 ":audio_decoder_interface",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200212 ":audio_encoder_interface",
213 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000214}
215
216config("g722_config") {
217 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000218 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000219 "codecs/g722/include",
220 ]
221}
222
kjellanderb62dbbe2016-09-23 00:38:52 -0700223rtc_static_library("g722") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000224 sources = [
kwibergada4c132015-09-17 03:12:35 -0700225 "codecs/g722/audio_decoder_g722.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100226 "codecs/g722/audio_decoder_g722.h",
kwiberg@webrtc.org0cd55582014-12-02 11:45:51 +0000227 "codecs/g722/audio_encoder_g722.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100228 "codecs/g722/audio_encoder_g722.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000229 "codecs/g722/g722_decode.c",
230 "codecs/g722/g722_enc_dec.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200231 "codecs/g722/g722_encode.c",
232 "codecs/g722/g722_interface.c",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100233 "codecs/g722/g722_interface.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000234 ]
235
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700236 public_configs = [ ":g722_config" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000237
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200238 deps = [
Henrik Lundind048aa02015-12-03 17:47:21 +0100239 ":audio_decoder_interface",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200240 ":audio_encoder_interface",
241 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000242}
243
244config("ilbc_config") {
245 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000246 "../../..",
Henrik Kjellander74640892015-10-29 11:31:02 +0100247 "codecs/ilbc/include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000248 ]
249}
250
kjellanderb62dbbe2016-09-23 00:38:52 -0700251rtc_static_library("ilbc") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000252 sources = [
253 "codecs/ilbc/abs_quant.c",
254 "codecs/ilbc/abs_quant.h",
255 "codecs/ilbc/abs_quant_loop.c",
256 "codecs/ilbc/abs_quant_loop.h",
kwibergfff9f172015-09-16 21:26:32 -0700257 "codecs/ilbc/audio_decoder_ilbc.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100258 "codecs/ilbc/audio_decoder_ilbc.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200259 "codecs/ilbc/audio_encoder_ilbc.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100260 "codecs/ilbc/audio_encoder_ilbc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000261 "codecs/ilbc/augmented_cb_corr.c",
262 "codecs/ilbc/augmented_cb_corr.h",
263 "codecs/ilbc/bw_expand.c",
264 "codecs/ilbc/bw_expand.h",
265 "codecs/ilbc/cb_construct.c",
266 "codecs/ilbc/cb_construct.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200267 "codecs/ilbc/cb_mem_energy.c",
268 "codecs/ilbc/cb_mem_energy.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000269 "codecs/ilbc/cb_mem_energy_augmentation.c",
270 "codecs/ilbc/cb_mem_energy_augmentation.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000271 "codecs/ilbc/cb_mem_energy_calc.c",
272 "codecs/ilbc/cb_mem_energy_calc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000273 "codecs/ilbc/cb_search.c",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200274 "codecs/ilbc/cb_search.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000275 "codecs/ilbc/cb_search_core.c",
276 "codecs/ilbc/cb_search_core.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000277 "codecs/ilbc/cb_update_best_index.c",
278 "codecs/ilbc/cb_update_best_index.h",
279 "codecs/ilbc/chebyshev.c",
280 "codecs/ilbc/chebyshev.h",
281 "codecs/ilbc/comp_corr.c",
282 "codecs/ilbc/comp_corr.h",
283 "codecs/ilbc/constants.c",
284 "codecs/ilbc/constants.h",
285 "codecs/ilbc/create_augmented_vec.c",
286 "codecs/ilbc/create_augmented_vec.h",
287 "codecs/ilbc/decode.c",
288 "codecs/ilbc/decode.h",
289 "codecs/ilbc/decode_residual.c",
290 "codecs/ilbc/decode_residual.h",
291 "codecs/ilbc/decoder_interpolate_lsf.c",
292 "codecs/ilbc/decoder_interpolate_lsf.h",
293 "codecs/ilbc/defines.h",
294 "codecs/ilbc/do_plc.c",
295 "codecs/ilbc/do_plc.h",
296 "codecs/ilbc/encode.c",
297 "codecs/ilbc/encode.h",
298 "codecs/ilbc/energy_inverse.c",
299 "codecs/ilbc/energy_inverse.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200300 "codecs/ilbc/enh_upsample.c",
301 "codecs/ilbc/enh_upsample.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000302 "codecs/ilbc/enhancer.c",
303 "codecs/ilbc/enhancer.h",
304 "codecs/ilbc/enhancer_interface.c",
305 "codecs/ilbc/enhancer_interface.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000306 "codecs/ilbc/filtered_cb_vecs.c",
307 "codecs/ilbc/filtered_cb_vecs.h",
308 "codecs/ilbc/frame_classify.c",
309 "codecs/ilbc/frame_classify.h",
310 "codecs/ilbc/gain_dequant.c",
311 "codecs/ilbc/gain_dequant.h",
312 "codecs/ilbc/gain_quant.c",
313 "codecs/ilbc/gain_quant.h",
314 "codecs/ilbc/get_cd_vec.c",
315 "codecs/ilbc/get_cd_vec.h",
316 "codecs/ilbc/get_lsp_poly.c",
317 "codecs/ilbc/get_lsp_poly.h",
318 "codecs/ilbc/get_sync_seq.c",
319 "codecs/ilbc/get_sync_seq.h",
320 "codecs/ilbc/hp_input.c",
321 "codecs/ilbc/hp_input.h",
322 "codecs/ilbc/hp_output.c",
323 "codecs/ilbc/hp_output.h",
324 "codecs/ilbc/ilbc.c",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100325 "codecs/ilbc/ilbc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000326 "codecs/ilbc/index_conv_dec.c",
327 "codecs/ilbc/index_conv_dec.h",
328 "codecs/ilbc/index_conv_enc.c",
329 "codecs/ilbc/index_conv_enc.h",
330 "codecs/ilbc/init_decode.c",
331 "codecs/ilbc/init_decode.h",
332 "codecs/ilbc/init_encode.c",
333 "codecs/ilbc/init_encode.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000334 "codecs/ilbc/interpolate.c",
335 "codecs/ilbc/interpolate.h",
336 "codecs/ilbc/interpolate_samples.c",
337 "codecs/ilbc/interpolate_samples.h",
338 "codecs/ilbc/lpc_encode.c",
339 "codecs/ilbc/lpc_encode.h",
340 "codecs/ilbc/lsf_check.c",
341 "codecs/ilbc/lsf_check.h",
342 "codecs/ilbc/lsf_interpolate_to_poly_dec.c",
343 "codecs/ilbc/lsf_interpolate_to_poly_dec.h",
344 "codecs/ilbc/lsf_interpolate_to_poly_enc.c",
345 "codecs/ilbc/lsf_interpolate_to_poly_enc.h",
346 "codecs/ilbc/lsf_to_lsp.c",
347 "codecs/ilbc/lsf_to_lsp.h",
348 "codecs/ilbc/lsf_to_poly.c",
349 "codecs/ilbc/lsf_to_poly.h",
350 "codecs/ilbc/lsp_to_lsf.c",
351 "codecs/ilbc/lsp_to_lsf.h",
352 "codecs/ilbc/my_corr.c",
353 "codecs/ilbc/my_corr.h",
354 "codecs/ilbc/nearest_neighbor.c",
355 "codecs/ilbc/nearest_neighbor.h",
356 "codecs/ilbc/pack_bits.c",
357 "codecs/ilbc/pack_bits.h",
358 "codecs/ilbc/poly_to_lsf.c",
359 "codecs/ilbc/poly_to_lsf.h",
360 "codecs/ilbc/poly_to_lsp.c",
361 "codecs/ilbc/poly_to_lsp.h",
362 "codecs/ilbc/refiner.c",
363 "codecs/ilbc/refiner.h",
364 "codecs/ilbc/simple_interpolate_lsf.c",
365 "codecs/ilbc/simple_interpolate_lsf.h",
366 "codecs/ilbc/simple_lpc_analysis.c",
367 "codecs/ilbc/simple_lpc_analysis.h",
368 "codecs/ilbc/simple_lsf_dequant.c",
369 "codecs/ilbc/simple_lsf_dequant.h",
370 "codecs/ilbc/simple_lsf_quant.c",
371 "codecs/ilbc/simple_lsf_quant.h",
372 "codecs/ilbc/smooth.c",
373 "codecs/ilbc/smooth.h",
374 "codecs/ilbc/smooth_out_data.c",
375 "codecs/ilbc/smooth_out_data.h",
376 "codecs/ilbc/sort_sq.c",
377 "codecs/ilbc/sort_sq.h",
378 "codecs/ilbc/split_vq.c",
379 "codecs/ilbc/split_vq.h",
380 "codecs/ilbc/state_construct.c",
381 "codecs/ilbc/state_construct.h",
382 "codecs/ilbc/state_search.c",
383 "codecs/ilbc/state_search.h",
384 "codecs/ilbc/swap_bytes.c",
385 "codecs/ilbc/swap_bytes.h",
386 "codecs/ilbc/unpack_bits.c",
387 "codecs/ilbc/unpack_bits.h",
388 "codecs/ilbc/vq3.c",
389 "codecs/ilbc/vq3.h",
390 "codecs/ilbc/vq4.c",
391 "codecs/ilbc/vq4.h",
392 "codecs/ilbc/window32_w32.c",
393 "codecs/ilbc/window32_w32.h",
394 "codecs/ilbc/xcorr_coef.c",
395 "codecs/ilbc/xcorr_coef.h",
396 ]
397
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700398 public_configs = [ ":ilbc_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000399
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000400 deps = [
Henrik Lundind048aa02015-12-03 17:47:21 +0100401 ":audio_decoder_interface",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000402 ":audio_encoder_interface",
kwiberg619a2112016-08-24 02:46:44 -0700403 "../../base:rtc_base_approved",
Henrik Lundind048aa02015-12-03 17:47:21 +0100404 "../../common_audio",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000405 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000406}
407
kjellanderb62dbbe2016-09-23 00:38:52 -0700408rtc_static_library("isac_common") {
kwiberg608c3cf2015-08-24 02:03:23 -0700409 sources = [
410 "codecs/isac/audio_encoder_isac_t.h",
411 "codecs/isac/audio_encoder_isac_t_impl.h",
412 "codecs/isac/locked_bandwidth_info.cc",
413 "codecs/isac/locked_bandwidth_info.h",
414 ]
415}
416
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000417config("isac_config") {
418 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000419 "../../..",
Henrik Kjellander74640892015-10-29 11:31:02 +0100420 "codecs/isac/main/include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000421 ]
422}
423
kjellanderb62dbbe2016-09-23 00:38:52 -0700424rtc_static_library("isac") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000425 sources = [
Henrik Kjellander74640892015-10-29 11:31:02 +0100426 "codecs/isac/main/include/audio_decoder_isac.h",
427 "codecs/isac/main/include/audio_encoder_isac.h",
428 "codecs/isac/main/include/isac.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000429 "codecs/isac/main/source/arith_routines.c",
430 "codecs/isac/main/source/arith_routines.h",
431 "codecs/isac/main/source/arith_routines_hist.c",
432 "codecs/isac/main/source/arith_routines_logist.c",
Karl Wiberg74043682015-09-22 19:31:40 +0200433 "codecs/isac/main/source/audio_decoder_isac.cc",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000434 "codecs/isac/main/source/audio_encoder_isac.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000435 "codecs/isac/main/source/bandwidth_estimator.c",
436 "codecs/isac/main/source/bandwidth_estimator.h",
437 "codecs/isac/main/source/codec.h",
438 "codecs/isac/main/source/crc.c",
439 "codecs/isac/main/source/crc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000440 "codecs/isac/main/source/decode.c",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200441 "codecs/isac/main/source/decode_bwe.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000442 "codecs/isac/main/source/encode.c",
443 "codecs/isac/main/source/encode_lpc_swb.c",
444 "codecs/isac/main/source/encode_lpc_swb.h",
445 "codecs/isac/main/source/entropy_coding.c",
446 "codecs/isac/main/source/entropy_coding.h",
447 "codecs/isac/main/source/fft.c",
448 "codecs/isac/main/source/fft.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200449 "codecs/isac/main/source/filter_functions.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000450 "codecs/isac/main/source/filterbank_tables.c",
451 "codecs/isac/main/source/filterbank_tables.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200452 "codecs/isac/main/source/filterbanks.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000453 "codecs/isac/main/source/intialize.c",
454 "codecs/isac/main/source/isac.c",
Karl Wiberg74043682015-09-22 19:31:40 +0200455 "codecs/isac/main/source/isac_float_type.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000456 "codecs/isac/main/source/lattice.c",
457 "codecs/isac/main/source/lpc_analysis.c",
458 "codecs/isac/main/source/lpc_analysis.h",
459 "codecs/isac/main/source/lpc_gain_swb_tables.c",
460 "codecs/isac/main/source/lpc_gain_swb_tables.h",
461 "codecs/isac/main/source/lpc_shape_swb12_tables.c",
462 "codecs/isac/main/source/lpc_shape_swb12_tables.h",
463 "codecs/isac/main/source/lpc_shape_swb16_tables.c",
464 "codecs/isac/main/source/lpc_shape_swb16_tables.h",
465 "codecs/isac/main/source/lpc_tables.c",
466 "codecs/isac/main/source/lpc_tables.h",
467 "codecs/isac/main/source/os_specific_inline.h",
468 "codecs/isac/main/source/pitch_estimator.c",
469 "codecs/isac/main/source/pitch_estimator.h",
470 "codecs/isac/main/source/pitch_filter.c",
471 "codecs/isac/main/source/pitch_gain_tables.c",
472 "codecs/isac/main/source/pitch_gain_tables.h",
473 "codecs/isac/main/source/pitch_lag_tables.c",
474 "codecs/isac/main/source/pitch_lag_tables.h",
475 "codecs/isac/main/source/settings.h",
476 "codecs/isac/main/source/spectrum_ar_model_tables.c",
477 "codecs/isac/main/source/spectrum_ar_model_tables.h",
478 "codecs/isac/main/source/structs.h",
479 "codecs/isac/main/source/transform.c",
480 ]
481
482 if (is_linux) {
483 libs = [ "m" ]
484 }
485
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700486 public_configs = [ ":isac_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000487
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000488 deps = [
489 ":audio_decoder_interface",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000490 ":audio_encoder_interface",
kwiberg608c3cf2015-08-24 02:03:23 -0700491 ":isac_common",
aleloicfee2152016-08-29 04:09:19 -0700492 "../..:webrtc_common",
493 "../../base:rtc_base_approved",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000494 "../../common_audio",
495 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000496}
497
498config("isac_fix_config") {
499 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000500 "../../..",
Henrik Kjellander74640892015-10-29 11:31:02 +0100501 "codecs/isac/fix/include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000502 ]
503}
504
kjellanderb62dbbe2016-09-23 00:38:52 -0700505rtc_static_library("isac_fix") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000506 sources = [
Henrik Kjellander74640892015-10-29 11:31:02 +0100507 "codecs/isac/fix/include/audio_decoder_isacfix.h",
508 "codecs/isac/fix/include/audio_encoder_isacfix.h",
509 "codecs/isac/fix/include/isacfix.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000510 "codecs/isac/fix/source/arith_routines.c",
511 "codecs/isac/fix/source/arith_routines_hist.c",
512 "codecs/isac/fix/source/arith_routines_logist.c",
513 "codecs/isac/fix/source/arith_routins.h",
Karl Wiberg74043682015-09-22 19:31:40 +0200514 "codecs/isac/fix/source/audio_decoder_isacfix.cc",
kwiberg@webrtc.org88bdec82014-12-16 12:49:37 +0000515 "codecs/isac/fix/source/audio_encoder_isacfix.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000516 "codecs/isac/fix/source/bandwidth_estimator.c",
517 "codecs/isac/fix/source/bandwidth_estimator.h",
518 "codecs/isac/fix/source/codec.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000519 "codecs/isac/fix/source/decode.c",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200520 "codecs/isac/fix/source/decode_bwe.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000521 "codecs/isac/fix/source/decode_plc.c",
522 "codecs/isac/fix/source/encode.c",
523 "codecs/isac/fix/source/entropy_coding.c",
524 "codecs/isac/fix/source/entropy_coding.h",
525 "codecs/isac/fix/source/fft.c",
526 "codecs/isac/fix/source/fft.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000527 "codecs/isac/fix/source/filterbank_tables.c",
528 "codecs/isac/fix/source/filterbank_tables.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200529 "codecs/isac/fix/source/filterbanks.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000530 "codecs/isac/fix/source/filters.c",
531 "codecs/isac/fix/source/initialize.c",
Karl Wiberg74043682015-09-22 19:31:40 +0200532 "codecs/isac/fix/source/isac_fix_type.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000533 "codecs/isac/fix/source/isacfix.c",
534 "codecs/isac/fix/source/lattice.c",
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700535 "codecs/isac/fix/source/lattice_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000536 "codecs/isac/fix/source/lpc_masking_model.c",
537 "codecs/isac/fix/source/lpc_masking_model.h",
538 "codecs/isac/fix/source/lpc_tables.c",
539 "codecs/isac/fix/source/lpc_tables.h",
540 "codecs/isac/fix/source/pitch_estimator.c",
541 "codecs/isac/fix/source/pitch_estimator.h",
Ljubomir Papuga8f85dbc2015-04-21 16:52:45 -0700542 "codecs/isac/fix/source/pitch_estimator_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000543 "codecs/isac/fix/source/pitch_filter.c",
Ljubomir Papuga8f85dbc2015-04-21 16:52:45 -0700544 "codecs/isac/fix/source/pitch_filter_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000545 "codecs/isac/fix/source/pitch_gain_tables.c",
546 "codecs/isac/fix/source/pitch_gain_tables.h",
547 "codecs/isac/fix/source/pitch_lag_tables.c",
548 "codecs/isac/fix/source/pitch_lag_tables.h",
549 "codecs/isac/fix/source/settings.h",
550 "codecs/isac/fix/source/spectrum_ar_model_tables.c",
551 "codecs/isac/fix/source/spectrum_ar_model_tables.h",
552 "codecs/isac/fix/source/structs.h",
553 "codecs/isac/fix/source/transform.c",
554 "codecs/isac/fix/source/transform_tables.c",
555 ]
556
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700557 public_configs = [ ":isac_fix_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000558
559 deps = [
Henrik Lundind048aa02015-12-03 17:47:21 +0100560 ":audio_decoder_interface",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000561 ":audio_encoder_interface",
kwiberg608c3cf2015-08-24 02:03:23 -0700562 ":isac_common",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000563 "../../common_audio",
564 "../../system_wrappers",
565 ]
566
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700567 if (rtc_build_with_neon) {
Zhongwei Yaoe8a197b2015-04-28 14:42:11 +0800568 deps += [ ":isac_neon" ]
569 }
570
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700571 if (current_cpu == "arm" && arm_version >= 7) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000572 sources += [
573 "codecs/isac/fix/source/lattice_armv7.S",
574 "codecs/isac/fix/source/pitch_filter_armv6.S",
575 ]
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700576 sources -= [
577 "codecs/isac/fix/source/lattice_c.c",
578 "codecs/isac/fix/source/pitch_filter_c.c",
579 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000580 }
581
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000582 if (current_cpu == "mipsel") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000583 sources += [
584 "codecs/isac/fix/source/entropy_coding_mips.c",
585 "codecs/isac/fix/source/filters_mips.c",
586 "codecs/isac/fix/source/lattice_mips.c",
587 "codecs/isac/fix/source/pitch_estimator_mips.c",
588 "codecs/isac/fix/source/transform_mips.c",
589 ]
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700590 sources -= [
591 "codecs/isac/fix/source/lattice_c.c",
592 "codecs/isac/fix/source/pitch_estimator_c.c",
593 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000594 if (mips_dsp_rev > 0) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200595 sources += [ "codecs/isac/fix/source/filterbanks_mips.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000596 }
597 if (mips_dsp_rev > 1) {
598 sources += [
599 "codecs/isac/fix/source/lpc_masking_model_mips.c",
600 "codecs/isac/fix/source/pitch_filter_mips.c",
601 ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200602 sources -= [ "codecs/isac/fix/source/pitch_filter_c.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000603 }
604 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000605}
606
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700607if (rtc_build_with_neon) {
kjellanderb62dbbe2016-09-23 00:38:52 -0700608 rtc_static_library("isac_neon") {
Zhongwei Yaof242e662015-05-06 16:39:17 +0800609 sources = [
610 "codecs/isac/fix/source/entropy_coding_neon.c",
Zhongwei Yaob3cc77f2015-07-28 11:17:40 +0800611 "codecs/isac/fix/source/filterbanks_neon.c",
Zhongwei Yaof242e662015-05-06 16:39:17 +0800612 "codecs/isac/fix/source/filters_neon.c",
613 "codecs/isac/fix/source/lattice_neon.c",
614 "codecs/isac/fix/source/transform_neon.c",
615 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000616
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700617 if (current_cpu != "arm64") {
618 # Enable compilation for the NEON instruction set. This is needed
619 # since //build/config/arm.gni only enables NEON for iOS, not Android.
620 # This provides the same functionality as webrtc/build/arm_neon.gypi.
ehmaldonado38a21322016-09-02 04:10:34 -0700621 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700622 cflags = [ "-mfpu=neon" ]
623 }
624
625 # Disable LTO on NEON targets due to compiler bug.
626 # TODO(fdegans): Enable this. See crbug.com/408997.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000627 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000628 cflags -= [
629 "-flto",
630 "-ffat-lto-objects",
631 ]
632 }
633
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200634 deps = [
635 "../../common_audio",
636 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000637 }
638}
639
640config("pcm16b_config") {
641 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000642 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000643 "codecs/pcm16b/include",
644 ]
645}
646
kjellanderb62dbbe2016-09-23 00:38:52 -0700647rtc_static_library("pcm16b") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000648 sources = [
Karl Wibergc0ac6ca2015-09-17 07:47:34 +0200649 "codecs/pcm16b/audio_decoder_pcm16b.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100650 "codecs/pcm16b/audio_decoder_pcm16b.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200651 "codecs/pcm16b/audio_encoder_pcm16b.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100652 "codecs/pcm16b/audio_encoder_pcm16b.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000653 "codecs/pcm16b/pcm16b.c",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100654 "codecs/pcm16b/pcm16b.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000655 ]
656
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000657 deps = [
Henrik Lundind048aa02015-12-03 17:47:21 +0100658 ":audio_decoder_interface",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000659 ":audio_encoder_interface",
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000660 ":g711",
661 ]
662
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700663 public_configs = [ ":pcm16b_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000664}
665
666config("opus_config") {
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000667 include_dirs = [ "../../.." ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000668}
669
kjellanderb62dbbe2016-09-23 00:38:52 -0700670rtc_static_library("webrtc_opus") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000671 sources = [
Karl Wiberg0b058792015-09-15 17:28:18 +0200672 "codecs/opus/audio_decoder_opus.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100673 "codecs/opus/audio_decoder_opus.h",
kwiberg@webrtc.org663fdd02014-10-29 07:28:36 +0000674 "codecs/opus/audio_encoder_opus.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100675 "codecs/opus/audio_encoder_opus.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000676 "codecs/opus/opus_inst.h",
677 "codecs/opus/opus_interface.c",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100678 "codecs/opus/opus_interface.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000679 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000680
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200681 deps = [
Henrik Lundind048aa02015-12-03 17:47:21 +0100682 ":audio_decoder_interface",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200683 ":audio_encoder_interface",
minyue41b9c802016-10-06 07:13:54 -0700684 ":audio_network_adaptor",
Henrik Lundind048aa02015-12-03 17:47:21 +0100685 "../../base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200686 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000687
minyue@webrtc.org7c112f32015-03-17 14:04:56 +0000688 if (rtc_build_opus) {
tfarina702f3972015-09-25 05:57:37 -0700689 public_deps = [
690 rtc_opus_dir,
691 ]
minyue@webrtc.org7c112f32015-03-17 14:04:56 +0000692 } else if (build_with_mozilla) {
693 include_dirs = [ getenv("DIST") + "/include/opus" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000694 }
695}
696
minyue25f6a392016-09-22 22:23:20 -0700697if (rtc_enable_protobuf) {
698 proto_library("ana_debug_dump_proto") {
699 sources = [
700 "audio_network_adaptor/debug_dump.proto",
701 ]
702 proto_out_dir = "webrtc/modules/audio_coding/audio_network_adaptor"
703 }
minyuea1d9ad02016-10-02 14:53:37 -0700704 proto_library("ana_config_proto") {
705 sources = [
706 "audio_network_adaptor/config.proto",
707 ]
708 proto_out_dir = "webrtc/modules/audio_coding/audio_network_adaptor"
709 }
minyue25f6a392016-09-22 22:23:20 -0700710}
711
minyue0d382ef2016-10-07 07:59:28 -0700712rtc_static_library("audio_network_adaptor") {
minyue7610f852016-09-07 13:51:51 -0700713 sources = [
714 "audio_network_adaptor/audio_network_adaptor.cc",
minyuecaa9cb22016-09-13 13:34:15 -0700715 "audio_network_adaptor/audio_network_adaptor_impl.cc",
716 "audio_network_adaptor/audio_network_adaptor_impl.h",
minyue4aec1d42016-09-21 23:01:26 -0700717 "audio_network_adaptor/bitrate_controller.cc",
718 "audio_network_adaptor/bitrate_controller.h",
minyue2e164c62016-09-14 06:47:36 -0700719 "audio_network_adaptor/channel_controller.cc",
720 "audio_network_adaptor/channel_controller.h",
minyuecaa9cb22016-09-13 13:34:15 -0700721 "audio_network_adaptor/controller.cc",
722 "audio_network_adaptor/controller.h",
723 "audio_network_adaptor/controller_manager.cc",
724 "audio_network_adaptor/controller_manager.h",
minyue25f6a392016-09-22 22:23:20 -0700725 "audio_network_adaptor/debug_dump_writer.cc",
726 "audio_network_adaptor/debug_dump_writer.h",
minyue186cd062016-09-16 05:54:39 -0700727 "audio_network_adaptor/dtx_controller.cc",
728 "audio_network_adaptor/dtx_controller.h",
minyued0ede442016-09-22 06:20:50 -0700729 "audio_network_adaptor/fec_controller.cc",
730 "audio_network_adaptor/fec_controller.h",
minyuee35d3292016-09-21 16:00:31 -0700731 "audio_network_adaptor/frame_length_controller.cc",
732 "audio_network_adaptor/frame_length_controller.h",
minyue7610f852016-09-07 13:51:51 -0700733 "audio_network_adaptor/include/audio_network_adaptor.h",
minyue35483572016-09-20 23:13:08 -0700734 "audio_network_adaptor/smoothing_filter.cc",
735 "audio_network_adaptor/smoothing_filter.h",
minyue7610f852016-09-07 13:51:51 -0700736 ]
minyue25f6a392016-09-22 22:23:20 -0700737
minyue41b9c802016-10-06 07:13:54 -0700738 deps = [
739 "../..:webrtc_common",
740 "../../system_wrappers",
741 ]
742
minyue25f6a392016-09-22 22:23:20 -0700743 if (rtc_enable_protobuf) {
minyue41b9c802016-10-06 07:13:54 -0700744 deps += [
minyuea1d9ad02016-10-02 14:53:37 -0700745 ":ana_config_proto",
minyue25f6a392016-09-22 22:23:20 -0700746 ":ana_debug_dump_proto",
747 ]
748 defines = [ "WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP" ]
749 }
minyue7610f852016-09-07 13:51:51 -0700750}
751
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000752config("neteq_config") {
753 include_dirs = [
754 # Need Opus header files for the audio classifier.
755 "//third_party/opus/src/celt",
756 "//third_party/opus/src/src",
757 ]
758}
759
kjellanderb62dbbe2016-09-23 00:38:52 -0700760rtc_static_library("neteq") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000761 sources = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000762 "neteq/accelerate.cc",
763 "neteq/accelerate.h",
764 "neteq/audio_classifier.cc",
765 "neteq/audio_classifier.h",
766 "neteq/audio_decoder_impl.cc",
767 "neteq/audio_decoder_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000768 "neteq/audio_multi_vector.cc",
769 "neteq/audio_multi_vector.h",
770 "neteq/audio_vector.cc",
771 "neteq/audio_vector.h",
772 "neteq/background_noise.cc",
773 "neteq/background_noise.h",
774 "neteq/buffer_level_filter.cc",
775 "neteq/buffer_level_filter.h",
776 "neteq/comfort_noise.cc",
777 "neteq/comfort_noise.h",
minyue53ff70f2016-05-02 01:50:30 -0700778 "neteq/cross_correlation.cc",
779 "neteq/cross_correlation.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000780 "neteq/decision_logic.cc",
781 "neteq/decision_logic.h",
782 "neteq/decision_logic_fax.cc",
783 "neteq/decision_logic_fax.h",
784 "neteq/decision_logic_normal.cc",
785 "neteq/decision_logic_normal.h",
786 "neteq/decoder_database.cc",
787 "neteq/decoder_database.h",
788 "neteq/defines.h",
789 "neteq/delay_manager.cc",
790 "neteq/delay_manager.h",
791 "neteq/delay_peak_detector.cc",
792 "neteq/delay_peak_detector.h",
793 "neteq/dsp_helper.cc",
794 "neteq/dsp_helper.h",
795 "neteq/dtmf_buffer.cc",
796 "neteq/dtmf_buffer.h",
797 "neteq/dtmf_tone_generator.cc",
798 "neteq/dtmf_tone_generator.h",
799 "neteq/expand.cc",
800 "neteq/expand.h",
Henrik Kjellander74640892015-10-29 11:31:02 +0100801 "neteq/include/neteq.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000802 "neteq/merge.cc",
803 "neteq/merge.h",
henrik.lundin91951862016-06-08 06:43:41 -0700804 "neteq/nack_tracker.cc",
805 "neteq/nack_tracker.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200806 "neteq/neteq.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000807 "neteq/neteq_impl.cc",
808 "neteq/neteq_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000809 "neteq/normal.cc",
810 "neteq/normal.h",
henrik.lundin84f8cd62016-04-26 07:45:16 -0700811 "neteq/packet.cc",
812 "neteq/packet.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000813 "neteq/packet_buffer.cc",
814 "neteq/packet_buffer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000815 "neteq/post_decode_vad.cc",
816 "neteq/post_decode_vad.h",
817 "neteq/preemptive_expand.cc",
818 "neteq/preemptive_expand.h",
819 "neteq/random_vector.cc",
820 "neteq/random_vector.h",
ossua70695a2016-09-22 02:06:28 -0700821 "neteq/red_payload_splitter.cc",
822 "neteq/red_payload_splitter.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000823 "neteq/rtcp.cc",
824 "neteq/rtcp.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200825 "neteq/statistics_calculator.cc",
826 "neteq/statistics_calculator.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000827 "neteq/sync_buffer.cc",
828 "neteq/sync_buffer.h",
henrik.lundin8053f792016-04-22 13:21:43 -0700829 "neteq/tick_timer.cc",
830 "neteq/tick_timer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000831 "neteq/time_stretch.cc",
832 "neteq/time_stretch.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200833 "neteq/timestamp_scaler.cc",
834 "neteq/timestamp_scaler.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000835 ]
836
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700837 public_configs = [ ":neteq_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000838
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000839 deps = [
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000840 ":audio_decoder_interface",
kwiberg5178ee82016-05-03 01:39:01 -0700841 ":builtin_audio_decoder_factory",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000842 ":cng",
843 ":g711",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000844 ":pcm16b",
kwiberg5178ee82016-05-03 01:39:01 -0700845 ":rent_a_codec",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000846 "../..:webrtc_common",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000847 "../../common_audio",
848 "../../system_wrappers",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000849 ]
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +0000850
851 defines = []
852
kwibergf8c2bac2016-01-18 06:38:32 -0800853 if (rtc_include_ilbc) {
854 defines += [ "WEBRTC_CODEC_ILBC" ]
855 deps += [ ":ilbc" ]
856 }
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +0000857 if (rtc_include_opus) {
858 defines += [ "WEBRTC_CODEC_OPUS" ]
859 deps += [ ":webrtc_opus" ]
860 }
kwiberg98ab3a42015-09-30 21:54:21 -0700861 if (!build_with_mozilla) {
862 if (current_cpu == "arm") {
863 defines += [ "WEBRTC_CODEC_ISACFX" ]
864 deps += [ ":isac_fix" ]
865 } else {
866 defines += [ "WEBRTC_CODEC_ISAC" ]
867 deps += [ ":isac" ]
868 }
869 defines += [ "WEBRTC_CODEC_G722" ]
870 deps += [ ":g722" ]
871 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000872}
kjellanderfb114242016-06-13 00:19:48 -0700873
henrik.lundin58466f62016-10-05 02:27:42 -0700874# Although providing only test support, this target must be outside of the
875# rtc_include_tests conditional. The reason is that it supports fuzzer tests
876# that ultimately are built and run as a part of the Chromium ecosystem, which
877# does not set the rtc_include_tests flag.
878rtc_source_set("neteq_test_minimal") {
879 testonly = true
880 sources = [
881 "neteq/tools/encode_neteq_input.cc",
882 "neteq/tools/encode_neteq_input.h",
883 "neteq/tools/neteq_test.cc",
884 "neteq/tools/neteq_test.h",
885 ]
886
887 if (is_clang) {
888 # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163).
889 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
890 }
891}
892
kjellanderfb114242016-06-13 00:19:48 -0700893if (rtc_include_tests) {
ehmaldonado38a21322016-09-02 04:10:34 -0700894 rtc_source_set("acm_receive_test") {
kjellanderfb114242016-06-13 00:19:48 -0700895 testonly = true
896 sources = [
henrik.lundin2504c0a2016-10-06 01:31:32 -0700897 "acm2/acm_receive_test.cc",
898 "acm2/acm_receive_test.h",
kjellanderfb114242016-06-13 00:19:48 -0700899 ]
900
kjellanderfb114242016-06-13 00:19:48 -0700901 defines = audio_coding_defines
902
903 deps = audio_coding_deps + [
904 ":audio_coding",
905 ":neteq_unittest_tools",
906 "//testing/gtest",
907 ]
908 }
909
ehmaldonado38a21322016-09-02 04:10:34 -0700910 rtc_source_set("acm_send_test") {
kjellanderfb114242016-06-13 00:19:48 -0700911 testonly = true
912 sources = [
henrik.lundin2504c0a2016-10-06 01:31:32 -0700913 "acm2/acm_send_test.cc",
914 "acm2/acm_send_test.h",
kjellanderfb114242016-06-13 00:19:48 -0700915 ]
916
kjellanderfb114242016-06-13 00:19:48 -0700917 defines = audio_coding_defines
918
919 deps = audio_coding_deps + [
920 ":audio_coding",
921 ":neteq_unittest_tools",
922 "//testing/gtest",
923 ]
924 }
925
ehmaldonado38a21322016-09-02 04:10:34 -0700926 rtc_executable("delay_test") {
aleloi333f2062016-07-28 01:21:29 -0700927 testonly = true
928 sources = [
929 "test/Channel.cc",
930 "test/PCMFile.cc",
931 "test/delay_test.cc",
932 "test/utility.cc",
933 ]
934
aleloi333f2062016-07-28 01:21:29 -0700935 deps = [
936 ":audio_coding",
937 "../../:webrtc_common",
938 "../../system_wrappers",
939 "../../system_wrappers:system_wrappers_default",
940 "../../test:test_support",
941 "../rtp_rtcp",
942 "//testing/gtest",
943 "//third_party/gflags:gflags",
944 ]
945 } # delay_test
946
ehmaldonado38a21322016-09-02 04:10:34 -0700947 rtc_executable("insert_packet_with_timing") {
aleloi00730c72016-07-28 01:27:10 -0700948 testonly = true
949 sources = [
950 "test/Channel.cc",
951 "test/PCMFile.cc",
952 "test/insert_packet_with_timing.cc",
953 ]
954
aleloi00730c72016-07-28 01:27:10 -0700955 if (is_clang) {
956 # Suppress warnings from Chrome's Clang plugins.
957 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700958 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloi00730c72016-07-28 01:27:10 -0700959 }
960
961 deps = [
962 ":audio_coding",
963 "../../:webrtc_common",
964 "../../system_wrappers",
965 "../../system_wrappers:system_wrappers_default",
966 "../../test:test_support",
967 "../rtp_rtcp",
968 "//testing/gtest",
969 "//third_party/gflags:gflags",
970 ]
971 } # insert_packet_with_timing
972
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700973 audio_decoder_unittests_resources =
974 [ "//resources/audio_coding/testfile32kHz.pcm" ]
kjellander32c4a202016-08-30 02:53:49 -0700975
976 if (is_ios) {
977 bundle_data("audio_decoder_unittests_bundle_data") {
978 testonly = true
979 sources = audio_decoder_unittests_resources
980 outputs = [
981 "{{bundle_resources_dir}}/{{source_file_part}}",
982 ]
983 }
984 }
985
ehmaldonado38a21322016-09-02 04:10:34 -0700986 rtc_test("audio_decoder_unittests") {
charujainddf3e4a2016-08-01 07:49:42 -0700987 testonly = true
988 sources = [
989 "neteq/audio_decoder_unittest.cc",
990 ]
991
charujainddf3e4a2016-08-01 07:49:42 -0700992 if (is_clang) {
993 # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700994 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
charujainddf3e4a2016-08-01 07:49:42 -0700995 }
996
997 deps = []
998
999 defines = neteq_defines
1000
1001 deps += audio_coding_deps
1002 deps += [
1003 ":audio_decoder_interface",
1004 ":isac",
1005 ":isac_fix",
1006 ":neteq",
1007 ":neteq_unittest_tools",
1008 "../../common_audio/",
1009 "../../test:test_support_main",
1010 "//testing/gtest",
1011 ]
1012
ehmaldonado3a7f35b2016-09-14 05:10:01 -07001013 data = audio_decoder_unittests_resources
1014
charujainddf3e4a2016-08-01 07:49:42 -07001015 if (is_android) {
1016 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -07001017 shard_timeout = 900
charujainddf3e4a2016-08-01 07:49:42 -07001018 }
kjellander32c4a202016-08-30 02:53:49 -07001019 if (is_ios) {
1020 deps += [ ":audio_decoder_unittests_bundle_data" ]
charujainddf3e4a2016-08-01 07:49:42 -07001021 }
1022 } # audio_decoder_unittests
1023
kjellanderfb114242016-06-13 00:19:48 -07001024 if (rtc_enable_protobuf) {
1025 proto_library("neteq_unittest_proto") {
1026 sources = [
1027 "neteq/neteq_unittest.proto",
1028 ]
1029 proto_out_dir = "webrtc/audio_coding/neteq"
1030 }
henrik.lundin03153f12016-06-21 05:38:42 -07001031
kjellanderb62dbbe2016-09-23 00:38:52 -07001032 rtc_static_library("rtc_event_log_source") {
henrik.lundin03153f12016-06-21 05:38:42 -07001033 testonly = true
1034 sources = [
1035 "neteq/tools/rtc_event_log_source.cc",
1036 "neteq/tools/rtc_event_log_source.h",
1037 ]
1038
1039 if (is_clang) {
1040 # Suppress warnings from the Chromium Clang plugins
1041 # (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001042 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
henrik.lundin03153f12016-06-21 05:38:42 -07001043 }
1044
1045 deps = [
skvladcc91d282016-10-03 18:31:22 -07001046 "../../logging:rtc_event_log_parser",
henrik.lundin03153f12016-06-21 05:38:42 -07001047 ]
1048 public_deps = [
skvladcc91d282016-10-03 18:31:22 -07001049 "../../logging:rtc_event_log_proto",
henrik.lundin03153f12016-06-21 05:38:42 -07001050 ]
1051 }
1052
ehmaldonado38a21322016-09-02 04:10:34 -07001053 rtc_test("neteq_rtpplay") {
henrik.lundin03153f12016-06-21 05:38:42 -07001054 testonly = true
1055 defines = []
1056 deps = []
1057 sources = [
1058 "neteq/tools/neteq_rtpplay.cc",
1059 ]
1060
1061 if (is_clang) {
1062 # Suppress warnings from the Chromium Clang plugins
1063 # (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001064 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
henrik.lundin03153f12016-06-21 05:38:42 -07001065 }
1066
1067 if (is_win) {
1068 cflags = [
1069 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
1070 "/wd4373", # virtual function override.
1071 ]
1072 }
1073
1074 deps += [
1075 ":neteq",
1076 ":neteq_unittest_tools",
henrik.lundin03153f12016-06-21 05:38:42 -07001077 "../../system_wrappers:system_wrappers_default",
1078 "../../test:test_support",
1079 "//third_party/gflags",
1080 ]
1081 }
kjellanderfb114242016-06-13 00:19:48 -07001082 }
1083
ehmaldonado38a21322016-09-02 04:10:34 -07001084 rtc_test("audio_codec_speed_tests") {
aleloie6b60a42016-07-28 02:34:30 -07001085 testonly = true
1086 defines = []
1087 deps = []
1088 sources = [
1089 "codecs/isac/fix/test/isac_speed_test.cc",
1090 "codecs/opus/opus_speed_test.cc",
1091 "codecs/tools/audio_codec_speed_test.cc",
1092 "codecs/tools/audio_codec_speed_test.h",
1093 ]
1094
1095 if (is_clang) {
1096 # Suppress warnings from the Chromium Clang plugins
1097 # (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001098 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloie6b60a42016-07-28 02:34:30 -07001099 }
1100
1101 if (is_android) {
1102 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -07001103 shard_timeout = 900
aleloie6b60a42016-07-28 02:34:30 -07001104 }
1105
1106 deps += [
1107 ":isac_fix",
1108 ":webrtc_opus",
1109 "../../system_wrappers:system_wrappers_default",
1110 "../../test:test_support_main",
1111 "../audio_processing/",
1112 "//testing/gtest",
1113 ]
1114 }
1115
ehmaldonado38a21322016-09-02 04:10:34 -07001116 rtc_source_set("neteq_test_support") {
kjellanderfb114242016-06-13 00:19:48 -07001117 testonly = true
1118 sources = [
1119 "neteq/tools/neteq_external_decoder_test.cc",
1120 "neteq/tools/neteq_external_decoder_test.h",
1121 "neteq/tools/neteq_performance_test.cc",
1122 "neteq/tools/neteq_performance_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001123 ]
1124
kjellanderfb114242016-06-13 00:19:48 -07001125 if (is_clang) {
1126 # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001127 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -07001128 }
1129
1130 deps = [
1131 ":neteq",
1132 ":neteq_unittest_tools",
1133 ":pcm16b",
1134 "//testing/gtest",
kjellanderfb114242016-06-13 00:19:48 -07001135 ]
1136 }
1137
ehmaldonado38a21322016-09-02 04:10:34 -07001138 rtc_source_set("neteq_quality_test_support") {
ehmaldonado861da3c2016-08-19 07:02:24 -07001139 testonly = true
1140 sources = [
1141 "neteq/tools/neteq_quality_test.cc",
1142 "neteq/tools/neteq_quality_test.h",
1143 ]
1144
ehmaldonado861da3c2016-08-19 07:02:24 -07001145 if (is_clang) {
1146 # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001147 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ehmaldonado861da3c2016-08-19 07:02:24 -07001148 }
1149
1150 deps = [
1151 ":neteq",
1152 ":neteq_unittest_tools",
ehmaldonado6c46eaa2016-08-22 09:48:02 -07001153 "//testing/gtest",
ehmaldonado861da3c2016-08-19 07:02:24 -07001154 "//third_party/gflags",
1155 ]
1156 }
1157
kjellanderfb114242016-06-13 00:19:48 -07001158 config("neteq_unittest_tools_config") {
1159 include_dirs = [ "tools" ]
1160 }
1161
ehmaldonado38a21322016-09-02 04:10:34 -07001162 rtc_source_set("neteq_unittest_tools") {
kjellanderfb114242016-06-13 00:19:48 -07001163 testonly = true
1164 sources = [
1165 "neteq/tools/audio_checksum.h",
1166 "neteq/tools/audio_loop.cc",
1167 "neteq/tools/audio_loop.h",
aleloi0e0be0a2016-08-10 04:55:20 -07001168 "neteq/tools/audio_sink.cc",
kjellanderfb114242016-06-13 00:19:48 -07001169 "neteq/tools/audio_sink.h",
1170 "neteq/tools/constant_pcm_packet_source.cc",
1171 "neteq/tools/constant_pcm_packet_source.h",
henrik.lundine8a77e32016-06-22 06:34:03 -07001172 "neteq/tools/fake_decode_from_file.cc",
1173 "neteq/tools/fake_decode_from_file.h",
kjellanderfb114242016-06-13 00:19:48 -07001174 "neteq/tools/input_audio_file.cc",
1175 "neteq/tools/input_audio_file.h",
henrik.lundine8a77e32016-06-22 06:34:03 -07001176 "neteq/tools/neteq_input.h",
1177 "neteq/tools/neteq_packet_source_input.cc",
1178 "neteq/tools/neteq_packet_source_input.h",
1179 "neteq/tools/neteq_replacement_input.cc",
1180 "neteq/tools/neteq_replacement_input.h",
kjellanderfb114242016-06-13 00:19:48 -07001181 "neteq/tools/output_audio_file.h",
1182 "neteq/tools/output_wav_file.h",
1183 "neteq/tools/packet.cc",
1184 "neteq/tools/packet.h",
kwibergb8e56ee2016-08-29 06:37:33 -07001185 "neteq/tools/packet_source.cc",
kjellanderfb114242016-06-13 00:19:48 -07001186 "neteq/tools/packet_source.h",
1187 "neteq/tools/resample_input_audio_file.cc",
1188 "neteq/tools/resample_input_audio_file.h",
1189 "neteq/tools/rtp_file_source.cc",
1190 "neteq/tools/rtp_file_source.h",
1191 "neteq/tools/rtp_generator.cc",
1192 "neteq/tools/rtp_generator.h",
1193 ]
1194
ehmaldonadoe9cc6862016-09-05 06:10:18 -07001195 public_configs = [ ":neteq_unittest_tools_config" ]
kjellanderfb114242016-06-13 00:19:48 -07001196
1197 if (is_clang) {
1198 # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001199 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -07001200 }
1201
1202 deps = [
henrik.lundin58466f62016-10-05 02:27:42 -07001203 ":neteq_test_minimal",
kjellanderfb114242016-06-13 00:19:48 -07001204 "../../common_audio",
1205 "../../test:rtp_test_utils",
1206 "../rtp_rtcp",
1207 ]
henrik.lundine8a77e32016-06-22 06:34:03 -07001208
1209 if (rtc_enable_protobuf) {
1210 deps += [ ":rtc_event_log_source" ]
1211 }
kjellanderfb114242016-06-13 00:19:48 -07001212 }
aleloi3022a342016-07-26 06:36:03 -07001213
ehmaldonado38a21322016-09-02 04:10:34 -07001214 rtc_source_set("neteq_test_tools") {
aleloi3022a342016-07-26 06:36:03 -07001215 testonly = true
1216 sources = [
1217 "neteq/test/NETEQTEST_DummyRTPpacket.cc",
1218 "neteq/test/NETEQTEST_DummyRTPpacket.h",
1219 "neteq/test/NETEQTEST_RTPpacket.cc",
1220 "neteq/test/NETEQTEST_RTPpacket.h",
1221 ]
1222
1223 deps = [
1224 ":cng",
1225 ":g711",
1226 ":g722",
1227 ":ilbc",
1228 ":isac",
1229 ":pcm16b",
1230 "../..:webrtc_common",
1231 "//testing/gtest",
1232 ]
1233
1234 include_dirs = [
1235 "neteq/include",
1236 "neteq/test",
1237 "../../",
1238 ]
1239
1240 if (is_win) {
1241 cflags = [
1242 # Disable warnings to enable Win64 build, issue 1323.
1243 "/wd4267", # size_t to int truncation
1244 ]
1245 }
1246 }
aleloi47bded42016-07-26 06:46:19 -07001247
aleloi82667732016-08-02 01:45:50 -07001248 config("RTPencode_config") {
1249 defines = [
1250 "CODEC_ILBC",
1251 "CODEC_PCM16B",
1252 "CODEC_G711",
1253 "CODEC_G722",
1254 "CODEC_ISAC",
1255 "CODEC_PCM16B_WB",
1256 "CODEC_ISAC_SWB",
1257 "CODEC_PCM16B_32KHZ",
1258 "CODEC_PCM16B_48KHZ",
1259 "CODEC_CNGCODEC8",
1260 "CODEC_CNGCODEC16",
1261 "CODEC_CNGCODEC32",
1262 "CODEC_ATEVENT_DECODE",
1263 "CODEC_RED",
1264 "CODEC_OPUS",
1265 ]
1266 }
1267
ehmaldonado38a21322016-09-02 04:10:34 -07001268 rtc_executable("RTPencode") {
aleloi82667732016-08-02 01:45:50 -07001269 testonly = true
1270
1271 deps = [
1272 # TODO(hlundin): Make RTPencode use ACM to encode files.
1273 ":cng",
1274 ":g711",
1275 ":g722",
1276 ":ilbc",
1277 ":isac",
1278 ":neteq_test_tools",
1279 ":pcm16b",
1280 ":webrtc_opus",
1281 "../../common_audio",
1282 ]
1283
1284 configs += [ ":RTPencode_config" ]
1285
1286 sources = [
1287 "neteq/test/RTPencode.cc",
1288 ]
1289
1290 include_dirs = [
1291 "neteq/include",
1292 "neteq/test",
1293 ]
1294
1295 if (is_win) {
1296 cflags = [
1297 # Disable warnings to enable Win64 build, issue 1323.
1298 "/wd4267", # size_t to int truncation
1299 ]
1300 }
1301 }
1302
ehmaldonado38a21322016-09-02 04:10:34 -07001303 rtc_executable("RTPchange") {
aleloi76cbe192016-08-02 02:05:03 -07001304 testonly = true
1305
1306 sources = [
1307 "neteq/test/RTPchange.cc",
1308 ]
1309
1310 deps = [
1311 ":neteq_test_tools",
1312 ]
1313 }
1314
ehmaldonado38a21322016-09-02 04:10:34 -07001315 rtc_executable("rtpcat") {
aleloi5556dcb2016-08-02 04:27:25 -07001316 testonly = true
1317
1318 sources = [
1319 "neteq/tools/rtpcat.cc",
1320 ]
1321
1322 deps = [
1323 "../../system_wrappers:system_wrappers_default",
1324 "../../test:rtp_test_utils",
1325 "//testing/gtest",
1326 ]
1327 }
1328
ehmaldonado38a21322016-09-02 04:10:34 -07001329 rtc_executable("RTPtimeshift") {
aleloi5a746502016-08-02 06:06:33 -07001330 testonly = true
1331
1332 sources = [
1333 "neteq/test/RTPtimeshift.cc",
1334 ]
1335
1336 deps = [
1337 ":neteq_test_tools",
1338 "//testing/gtest",
1339 ]
1340 }
1341
ehmaldonado38a21322016-09-02 04:10:34 -07001342 rtc_executable("RTPjitter") {
aleloi17dfa742016-08-03 01:17:25 -07001343 testonly = true
1344 deps = [
1345 "../..:webrtc_common",
kthelgason29a44e32016-09-27 03:52:02 -07001346 "../../base:rtc_base_approved",
aleloi17dfa742016-08-03 01:17:25 -07001347 "//testing/gtest",
1348 ]
1349 sources = [
1350 "neteq/test/RTPjitter.cc",
1351 ]
1352 }
1353
ehmaldonado38a21322016-09-02 04:10:34 -07001354 rtc_executable("rtp_analyze") {
aleloi47bded42016-07-26 06:46:19 -07001355 testonly = true
1356
1357 sources = [
1358 "neteq/tools/rtp_analyze.cc",
1359 ]
1360
1361 deps = [
1362 ":neteq",
1363 ":neteq_unittest_tools",
1364 ":pcm16b",
1365 "../../system_wrappers:system_wrappers_default",
1366 "//testing/gtest",
1367 "//third_party/gflags:gflags",
1368 ]
1369
1370 if (is_clang) {
1371 # Suppress warnings from Chrome's Clang plugins.
1372 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -07001373 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloi47bded42016-07-26 06:46:19 -07001374 }
1375 }
aleloi630c6d52016-08-10 02:11:30 -07001376
ehmaldonado38a21322016-09-02 04:10:34 -07001377 rtc_executable("neteq_opus_quality_test") {
aleloi630c6d52016-08-10 02:11:30 -07001378 testonly = true
1379
1380 sources = [
1381 "neteq/test/neteq_opus_quality_test.cc",
1382 ]
1383
1384 deps = [
1385 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001386 ":neteq_quality_test_support",
aleloi0e0be0a2016-08-10 04:55:20 -07001387 ":neteq_unittest_tools",
aleloi630c6d52016-08-10 02:11:30 -07001388 ":webrtc_opus",
1389 "../../test:test_support_main",
1390 "//testing/gtest",
1391 "//third_party/gflags",
1392 ]
aleloi630c6d52016-08-10 02:11:30 -07001393 }
aleloi116fd612016-08-10 04:16:36 -07001394
ehmaldonado38a21322016-09-02 04:10:34 -07001395 rtc_executable("neteq_speed_test") {
aleloi116fd612016-08-10 04:16:36 -07001396 testonly = true
1397
1398 sources = [
1399 "neteq/test/neteq_speed_test.cc",
1400 ]
1401
1402 deps = [
1403 ":neteq",
1404 ":neteq_test_support",
1405 "../../system_wrappers:system_wrappers_default",
1406 "../../test:test_support",
1407 "//third_party/gflags",
1408 ]
1409 }
aleloi63910122016-08-10 04:41:14 -07001410
ehmaldonado38a21322016-09-02 04:10:34 -07001411 rtc_executable("audio_classifier_test") {
aleloi63910122016-08-10 04:41:14 -07001412 testonly = true
1413 sources = [
1414 "neteq/test/audio_classifier_test.cc",
1415 ]
1416 deps = [
1417 ":neteq",
1418 ":webrtc_opus",
1419 "../../system_wrappers:system_wrappers_default",
1420 ]
1421 }
aleloi0e0be0a2016-08-10 04:55:20 -07001422
ehmaldonado38a21322016-09-02 04:10:34 -07001423 rtc_executable("neteq_ilbc_quality_test") {
aleloi0e0be0a2016-08-10 04:55:20 -07001424 testonly = true
1425
1426 sources = [
1427 "neteq/test/neteq_ilbc_quality_test.cc",
1428 ]
1429
1430 deps = [
1431 ":ilbc",
1432 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001433 ":neteq_quality_test_support",
aleloi0e0be0a2016-08-10 04:55:20 -07001434 ":neteq_unittest_tools",
1435 "../../system_wrappers:system_wrappers_default",
1436 "../../test:test_support_main",
1437 "//testing/gtest",
1438 "//third_party/gflags",
1439 ]
1440 }
aleloi6df36dc2016-08-10 05:04:47 -07001441
ehmaldonado38a21322016-09-02 04:10:34 -07001442 rtc_executable("neteq_isac_quality_test") {
aleloi6df36dc2016-08-10 05:04:47 -07001443 testonly = true
1444
1445 sources = [
1446 "neteq/test/neteq_isac_quality_test.cc",
1447 ]
1448
1449 deps = [
1450 ":isac_fix",
1451 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001452 ":neteq_quality_test_support",
aleloi6df36dc2016-08-10 05:04:47 -07001453 "../../test:test_support_main",
1454 "//testing/gtest",
1455 "//third_party/gflags",
1456 ]
1457 }
aleloic4ac7002016-08-10 05:06:27 -07001458
ehmaldonado38a21322016-09-02 04:10:34 -07001459 rtc_executable("neteq_pcmu_quality_test") {
aleloic4ac7002016-08-10 05:06:27 -07001460 testonly = true
1461
1462 sources = [
1463 "neteq/test/neteq_pcmu_quality_test.cc",
1464 ]
1465
1466 deps = [
1467 ":g711",
1468 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001469 ":neteq_quality_test_support",
aleloic4ac7002016-08-10 05:06:27 -07001470 "../../test:test_support_main",
1471 "//testing/gtest",
1472 "//third_party/gflags",
1473 ]
1474 }
aleloib7186d02016-08-16 01:47:16 -07001475
ehmaldonado38a21322016-09-02 04:10:34 -07001476 rtc_executable("isac_fix_test") {
aleloib7186d02016-08-16 01:47:16 -07001477 testonly = true
1478
1479 sources = [
1480 "codecs/isac/fix/test/kenny.cc",
1481 ]
1482
1483 deps = [
1484 ":isac_fix",
1485 "../../test:test_support",
1486 ]
1487
1488 if (is_win) {
1489 cflags = [
1490 # Disable warnings to enable Win64 build, issue 1323.
1491 "/wd4267", # size_t to int truncation
1492 ]
1493 }
1494 }
aleloi16f55a12016-08-23 08:08:23 -07001495
ehmaldonadod02fe4b2016-08-26 13:31:24 -07001496 config("isac_test_warnings_config") {
1497 if (is_win && is_clang) {
1498 cflags = [
1499 # Disable warnings failing when compiling with Clang on Windows.
1500 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
1501 "-Wno-format",
1502 ]
1503 }
1504 }
1505
ehmaldonado38a21322016-09-02 04:10:34 -07001506 rtc_executable("isac_test") {
ivoce51b41a2016-08-24 02:25:57 -07001507 testonly = true
1508
1509 sources = [
1510 "codecs/isac/main/test/simpleKenny.c",
1511 "codecs/isac/main/util/utility.c",
1512 ]
1513
1514 include_dirs = [
1515 "codecs/isac/main/include",
1516 "codecs/isac/main/test",
1517 "codecs/isac/main/util",
1518 ]
1519
1520 deps = [
1521 ":isac",
ivoc48052312016-08-25 04:43:45 -07001522 "../../base:rtc_base_approved",
ivoce51b41a2016-08-24 02:25:57 -07001523 ]
1524
ehmaldonadod02fe4b2016-08-26 13:31:24 -07001525 configs += [ ":isac_test_warnings_config" ]
ivoce51b41a2016-08-24 02:25:57 -07001526 }
1527
ehmaldonado38a21322016-09-02 04:10:34 -07001528 rtc_executable("g711_test") {
aleloi16f55a12016-08-23 08:08:23 -07001529 testonly = true
1530
1531 sources = [
1532 "codecs/g711/test/testG711.cc",
1533 ]
1534
aleloi16f55a12016-08-23 08:08:23 -07001535 deps = [
1536 ":g711",
1537 ]
1538 }
aleloi9a117842016-08-23 08:36:10 -07001539
ehmaldonado38a21322016-09-02 04:10:34 -07001540 rtc_executable("g722_test") {
aleloi9a117842016-08-23 08:36:10 -07001541 testonly = true
1542
1543 sources = [
1544 "codecs/g722/test/testG722.cc",
1545 ]
1546
aleloi9a117842016-08-23 08:36:10 -07001547 deps = [
1548 ":g722",
1549 "../..:webrtc_common",
1550 ]
1551 }
ivoc2c670db2016-08-24 06:11:18 -07001552
ehmaldonado38a21322016-09-02 04:10:34 -07001553 rtc_executable("isac_api_test") {
aleloicfee2152016-08-29 04:09:19 -07001554 testonly = true
1555
1556 sources = [
1557 "codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc",
1558 "codecs/isac/main/util/utility.c",
1559 ]
1560
aleloicfee2152016-08-29 04:09:19 -07001561 deps = [
1562 ":isac",
1563 "../../base:rtc_base_approved",
aleloicfee2152016-08-29 04:09:19 -07001564 ]
1565
1566 include_dirs = [
1567 "codecs/isac/main/include",
1568 "codecs/isac/main/test",
1569 "codecs/isac/main/util",
1570 ]
1571 }
1572
ehmaldonado38a21322016-09-02 04:10:34 -07001573 rtc_executable("isac_switch_samprate_test") {
aleloicfee2152016-08-29 04:09:19 -07001574 testonly = true
1575
1576 sources = [
1577 "codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc",
1578 "codecs/isac/main/util/utility.c",
1579 ]
1580
aleloicfee2152016-08-29 04:09:19 -07001581 deps = [
1582 ":isac",
aleloicfee2152016-08-29 04:09:19 -07001583 ]
1584
1585 include_dirs = [
1586 "codecs/isac/main/include",
1587 "codecs/isac/main/test",
1588 "codecs/isac/main/util",
1589 "../../common_audio/signal_processing/include",
1590 ]
1591 }
1592
ehmaldonado38a21322016-09-02 04:10:34 -07001593 rtc_executable("ilbc_test") {
aleloicfee2152016-08-29 04:09:19 -07001594 testonly = true
1595
1596 sources = [
1597 "codecs/ilbc/test/iLBC_test.c",
1598 ]
1599
aleloicfee2152016-08-29 04:09:19 -07001600 deps = [
1601 ":ilbc",
aleloicfee2152016-08-29 04:09:19 -07001602 ]
1603 }
1604
ehmaldonado38a21322016-09-02 04:10:34 -07001605 rtc_executable("webrtc_opus_fec_test") {
ivoc2c670db2016-08-24 06:11:18 -07001606 testonly = true
1607
1608 sources = [
1609 "codecs/opus/opus_fec_test.cc",
1610 ]
1611
1612 deps = [
1613 ":webrtc_opus",
ivoc48052312016-08-25 04:43:45 -07001614 "../../base:rtc_base_approved",
ivoc2c670db2016-08-24 06:11:18 -07001615 "../../common_audio",
1616 "../../test:test_support",
1617 "../../test:test_support_main",
ivoc2c670db2016-08-24 06:11:18 -07001618 "//testing/gtest",
1619 ]
1620
1621 if (is_clang) {
1622 # Suppress warnings from Chrome's Clang plugins.
1623 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -07001624 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ivoc2c670db2016-08-24 06:11:18 -07001625 }
1626 }
kjellanderfb114242016-06-13 00:19:48 -07001627}