blob: ea633ae91bc77e25e4ce6f879ac697dca0987c4d [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 + [
minyue7610f852016-09-07 13:51:51 -0700117 ":audio_network_adaptor",
kwiberg0edb05b2016-01-19 05:54:28 -0800118 ":neteq",
119 ":rent_a_codec",
skvladcc91d282016-10-03 18:31:22 -0700120 "../../logging:rtc_event_log_api",
kwiberg0edb05b2016-01-19 05:54:28 -0800121 ]
kjellanderfb114242016-06-13 00:19:48 -0700122 defines = audio_coding_defines
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000123}
124
kjellanderb62dbbe2016-09-23 00:38:52 -0700125rtc_static_library("audio_decoder_interface") {
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000126 sources = [
127 "codecs/audio_decoder.cc",
128 "codecs/audio_decoder.h",
ossu7f40ba42016-09-21 05:50:37 -0700129 "codecs/legacy_encoded_audio_frame.cc",
130 "codecs/legacy_encoded_audio_frame.h",
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000131 ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200132 deps = [
133 "../..:webrtc_common",
kjellander4e7f6c12016-04-25 21:59:50 -0700134 "../../base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200135 ]
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000136}
137
kjellanderb62dbbe2016-09-23 00:38:52 -0700138rtc_static_library("audio_encoder_interface") {
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000139 sources = [
140 "codecs/audio_encoder.cc",
141 "codecs/audio_encoder.h",
142 ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200143 deps = [
144 "../..:webrtc_common",
kjellander4e7f6c12016-04-25 21:59:50 -0700145 "../../base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200146 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000147}
148
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000149config("cng_config") {
150 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000151 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000152 "codecs/cng/include",
153 ]
154}
155
kjellanderb62dbbe2016-09-23 00:38:52 -0700156rtc_static_library("cng") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000157 sources = [
henrik.lundin@webrtc.orgff1a3e32014-12-10 07:29:08 +0000158 "codecs/cng/audio_encoder_cng.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100159 "codecs/cng/audio_encoder_cng.h",
ossu97ba30e2016-04-25 07:55:58 -0700160 "codecs/cng/webrtc_cng.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100161 "codecs/cng/webrtc_cng.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000162 ]
163
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700164 public_configs = [ ":cng_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000165
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000166 deps = [
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000167 ":audio_encoder_interface",
Henrik Lundind048aa02015-12-03 17:47:21 +0100168 "../../common_audio",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000169 ]
170}
171
172config("red_config") {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200173 include_dirs = [ "codecs/red" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000174}
175
kjellanderb62dbbe2016-09-23 00:38:52 -0700176rtc_static_library("red") {
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000177 sources = [
178 "codecs/red/audio_encoder_copy_red.cc",
179 "codecs/red/audio_encoder_copy_red.h",
180 ]
181
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700182 public_configs = [ ":red_config" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000183
184 deps = [
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000185 ":audio_encoder_interface",
Henrik Lundind048aa02015-12-03 17:47:21 +0100186 "../../common_audio",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000187 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000188}
189
190config("g711_config") {
191 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000192 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000193 "codecs/g711/include",
194 ]
195}
196
kjellanderb62dbbe2016-09-23 00:38:52 -0700197rtc_static_library("g711") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000198 sources = [
kwiberg6faf5be2015-09-22 06:16:51 -0700199 "codecs/g711/audio_decoder_pcm.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100200 "codecs/g711/audio_decoder_pcm.h",
henrik.lundin@webrtc.orgdef1e972014-10-21 12:48:29 +0000201 "codecs/g711/audio_encoder_pcm.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100202 "codecs/g711/audio_encoder_pcm.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000203 "codecs/g711/g711.c",
204 "codecs/g711/g711.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200205 "codecs/g711/g711_interface.c",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100206 "codecs/g711/g711_interface.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000207 ]
208
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700209 public_configs = [ ":g711_config" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000210
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200211 deps = [
Henrik Lundind048aa02015-12-03 17:47:21 +0100212 ":audio_decoder_interface",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200213 ":audio_encoder_interface",
214 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000215}
216
217config("g722_config") {
218 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000219 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000220 "codecs/g722/include",
221 ]
222}
223
kjellanderb62dbbe2016-09-23 00:38:52 -0700224rtc_static_library("g722") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000225 sources = [
kwibergada4c132015-09-17 03:12:35 -0700226 "codecs/g722/audio_decoder_g722.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100227 "codecs/g722/audio_decoder_g722.h",
kwiberg@webrtc.org0cd55582014-12-02 11:45:51 +0000228 "codecs/g722/audio_encoder_g722.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100229 "codecs/g722/audio_encoder_g722.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000230 "codecs/g722/g722_decode.c",
231 "codecs/g722/g722_enc_dec.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200232 "codecs/g722/g722_encode.c",
233 "codecs/g722/g722_interface.c",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100234 "codecs/g722/g722_interface.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000235 ]
236
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700237 public_configs = [ ":g722_config" ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000238
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200239 deps = [
Henrik Lundind048aa02015-12-03 17:47:21 +0100240 ":audio_decoder_interface",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200241 ":audio_encoder_interface",
242 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000243}
244
245config("ilbc_config") {
246 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000247 "../../..",
Henrik Kjellander74640892015-10-29 11:31:02 +0100248 "codecs/ilbc/include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000249 ]
250}
251
kjellanderb62dbbe2016-09-23 00:38:52 -0700252rtc_static_library("ilbc") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000253 sources = [
254 "codecs/ilbc/abs_quant.c",
255 "codecs/ilbc/abs_quant.h",
256 "codecs/ilbc/abs_quant_loop.c",
257 "codecs/ilbc/abs_quant_loop.h",
kwibergfff9f172015-09-16 21:26:32 -0700258 "codecs/ilbc/audio_decoder_ilbc.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100259 "codecs/ilbc/audio_decoder_ilbc.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200260 "codecs/ilbc/audio_encoder_ilbc.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100261 "codecs/ilbc/audio_encoder_ilbc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000262 "codecs/ilbc/augmented_cb_corr.c",
263 "codecs/ilbc/augmented_cb_corr.h",
264 "codecs/ilbc/bw_expand.c",
265 "codecs/ilbc/bw_expand.h",
266 "codecs/ilbc/cb_construct.c",
267 "codecs/ilbc/cb_construct.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200268 "codecs/ilbc/cb_mem_energy.c",
269 "codecs/ilbc/cb_mem_energy.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000270 "codecs/ilbc/cb_mem_energy_augmentation.c",
271 "codecs/ilbc/cb_mem_energy_augmentation.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000272 "codecs/ilbc/cb_mem_energy_calc.c",
273 "codecs/ilbc/cb_mem_energy_calc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000274 "codecs/ilbc/cb_search.c",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200275 "codecs/ilbc/cb_search.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000276 "codecs/ilbc/cb_search_core.c",
277 "codecs/ilbc/cb_search_core.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000278 "codecs/ilbc/cb_update_best_index.c",
279 "codecs/ilbc/cb_update_best_index.h",
280 "codecs/ilbc/chebyshev.c",
281 "codecs/ilbc/chebyshev.h",
282 "codecs/ilbc/comp_corr.c",
283 "codecs/ilbc/comp_corr.h",
284 "codecs/ilbc/constants.c",
285 "codecs/ilbc/constants.h",
286 "codecs/ilbc/create_augmented_vec.c",
287 "codecs/ilbc/create_augmented_vec.h",
288 "codecs/ilbc/decode.c",
289 "codecs/ilbc/decode.h",
290 "codecs/ilbc/decode_residual.c",
291 "codecs/ilbc/decode_residual.h",
292 "codecs/ilbc/decoder_interpolate_lsf.c",
293 "codecs/ilbc/decoder_interpolate_lsf.h",
294 "codecs/ilbc/defines.h",
295 "codecs/ilbc/do_plc.c",
296 "codecs/ilbc/do_plc.h",
297 "codecs/ilbc/encode.c",
298 "codecs/ilbc/encode.h",
299 "codecs/ilbc/energy_inverse.c",
300 "codecs/ilbc/energy_inverse.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200301 "codecs/ilbc/enh_upsample.c",
302 "codecs/ilbc/enh_upsample.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000303 "codecs/ilbc/enhancer.c",
304 "codecs/ilbc/enhancer.h",
305 "codecs/ilbc/enhancer_interface.c",
306 "codecs/ilbc/enhancer_interface.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000307 "codecs/ilbc/filtered_cb_vecs.c",
308 "codecs/ilbc/filtered_cb_vecs.h",
309 "codecs/ilbc/frame_classify.c",
310 "codecs/ilbc/frame_classify.h",
311 "codecs/ilbc/gain_dequant.c",
312 "codecs/ilbc/gain_dequant.h",
313 "codecs/ilbc/gain_quant.c",
314 "codecs/ilbc/gain_quant.h",
315 "codecs/ilbc/get_cd_vec.c",
316 "codecs/ilbc/get_cd_vec.h",
317 "codecs/ilbc/get_lsp_poly.c",
318 "codecs/ilbc/get_lsp_poly.h",
319 "codecs/ilbc/get_sync_seq.c",
320 "codecs/ilbc/get_sync_seq.h",
321 "codecs/ilbc/hp_input.c",
322 "codecs/ilbc/hp_input.h",
323 "codecs/ilbc/hp_output.c",
324 "codecs/ilbc/hp_output.h",
325 "codecs/ilbc/ilbc.c",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100326 "codecs/ilbc/ilbc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000327 "codecs/ilbc/index_conv_dec.c",
328 "codecs/ilbc/index_conv_dec.h",
329 "codecs/ilbc/index_conv_enc.c",
330 "codecs/ilbc/index_conv_enc.h",
331 "codecs/ilbc/init_decode.c",
332 "codecs/ilbc/init_decode.h",
333 "codecs/ilbc/init_encode.c",
334 "codecs/ilbc/init_encode.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000335 "codecs/ilbc/interpolate.c",
336 "codecs/ilbc/interpolate.h",
337 "codecs/ilbc/interpolate_samples.c",
338 "codecs/ilbc/interpolate_samples.h",
339 "codecs/ilbc/lpc_encode.c",
340 "codecs/ilbc/lpc_encode.h",
341 "codecs/ilbc/lsf_check.c",
342 "codecs/ilbc/lsf_check.h",
343 "codecs/ilbc/lsf_interpolate_to_poly_dec.c",
344 "codecs/ilbc/lsf_interpolate_to_poly_dec.h",
345 "codecs/ilbc/lsf_interpolate_to_poly_enc.c",
346 "codecs/ilbc/lsf_interpolate_to_poly_enc.h",
347 "codecs/ilbc/lsf_to_lsp.c",
348 "codecs/ilbc/lsf_to_lsp.h",
349 "codecs/ilbc/lsf_to_poly.c",
350 "codecs/ilbc/lsf_to_poly.h",
351 "codecs/ilbc/lsp_to_lsf.c",
352 "codecs/ilbc/lsp_to_lsf.h",
353 "codecs/ilbc/my_corr.c",
354 "codecs/ilbc/my_corr.h",
355 "codecs/ilbc/nearest_neighbor.c",
356 "codecs/ilbc/nearest_neighbor.h",
357 "codecs/ilbc/pack_bits.c",
358 "codecs/ilbc/pack_bits.h",
359 "codecs/ilbc/poly_to_lsf.c",
360 "codecs/ilbc/poly_to_lsf.h",
361 "codecs/ilbc/poly_to_lsp.c",
362 "codecs/ilbc/poly_to_lsp.h",
363 "codecs/ilbc/refiner.c",
364 "codecs/ilbc/refiner.h",
365 "codecs/ilbc/simple_interpolate_lsf.c",
366 "codecs/ilbc/simple_interpolate_lsf.h",
367 "codecs/ilbc/simple_lpc_analysis.c",
368 "codecs/ilbc/simple_lpc_analysis.h",
369 "codecs/ilbc/simple_lsf_dequant.c",
370 "codecs/ilbc/simple_lsf_dequant.h",
371 "codecs/ilbc/simple_lsf_quant.c",
372 "codecs/ilbc/simple_lsf_quant.h",
373 "codecs/ilbc/smooth.c",
374 "codecs/ilbc/smooth.h",
375 "codecs/ilbc/smooth_out_data.c",
376 "codecs/ilbc/smooth_out_data.h",
377 "codecs/ilbc/sort_sq.c",
378 "codecs/ilbc/sort_sq.h",
379 "codecs/ilbc/split_vq.c",
380 "codecs/ilbc/split_vq.h",
381 "codecs/ilbc/state_construct.c",
382 "codecs/ilbc/state_construct.h",
383 "codecs/ilbc/state_search.c",
384 "codecs/ilbc/state_search.h",
385 "codecs/ilbc/swap_bytes.c",
386 "codecs/ilbc/swap_bytes.h",
387 "codecs/ilbc/unpack_bits.c",
388 "codecs/ilbc/unpack_bits.h",
389 "codecs/ilbc/vq3.c",
390 "codecs/ilbc/vq3.h",
391 "codecs/ilbc/vq4.c",
392 "codecs/ilbc/vq4.h",
393 "codecs/ilbc/window32_w32.c",
394 "codecs/ilbc/window32_w32.h",
395 "codecs/ilbc/xcorr_coef.c",
396 "codecs/ilbc/xcorr_coef.h",
397 ]
398
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700399 public_configs = [ ":ilbc_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000400
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000401 deps = [
Henrik Lundind048aa02015-12-03 17:47:21 +0100402 ":audio_decoder_interface",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000403 ":audio_encoder_interface",
kwiberg619a2112016-08-24 02:46:44 -0700404 "../../base:rtc_base_approved",
Henrik Lundind048aa02015-12-03 17:47:21 +0100405 "../../common_audio",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000406 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000407}
408
kjellanderb62dbbe2016-09-23 00:38:52 -0700409rtc_static_library("isac_common") {
kwiberg608c3cf2015-08-24 02:03:23 -0700410 sources = [
411 "codecs/isac/audio_encoder_isac_t.h",
412 "codecs/isac/audio_encoder_isac_t_impl.h",
413 "codecs/isac/locked_bandwidth_info.cc",
414 "codecs/isac/locked_bandwidth_info.h",
415 ]
416}
417
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000418config("isac_config") {
419 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000420 "../../..",
Henrik Kjellander74640892015-10-29 11:31:02 +0100421 "codecs/isac/main/include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000422 ]
423}
424
kjellanderb62dbbe2016-09-23 00:38:52 -0700425rtc_static_library("isac") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000426 sources = [
Henrik Kjellander74640892015-10-29 11:31:02 +0100427 "codecs/isac/main/include/audio_decoder_isac.h",
428 "codecs/isac/main/include/audio_encoder_isac.h",
429 "codecs/isac/main/include/isac.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000430 "codecs/isac/main/source/arith_routines.c",
431 "codecs/isac/main/source/arith_routines.h",
432 "codecs/isac/main/source/arith_routines_hist.c",
433 "codecs/isac/main/source/arith_routines_logist.c",
Karl Wiberg74043682015-09-22 19:31:40 +0200434 "codecs/isac/main/source/audio_decoder_isac.cc",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000435 "codecs/isac/main/source/audio_encoder_isac.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000436 "codecs/isac/main/source/bandwidth_estimator.c",
437 "codecs/isac/main/source/bandwidth_estimator.h",
438 "codecs/isac/main/source/codec.h",
439 "codecs/isac/main/source/crc.c",
440 "codecs/isac/main/source/crc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000441 "codecs/isac/main/source/decode.c",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200442 "codecs/isac/main/source/decode_bwe.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000443 "codecs/isac/main/source/encode.c",
444 "codecs/isac/main/source/encode_lpc_swb.c",
445 "codecs/isac/main/source/encode_lpc_swb.h",
446 "codecs/isac/main/source/entropy_coding.c",
447 "codecs/isac/main/source/entropy_coding.h",
448 "codecs/isac/main/source/fft.c",
449 "codecs/isac/main/source/fft.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200450 "codecs/isac/main/source/filter_functions.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000451 "codecs/isac/main/source/filterbank_tables.c",
452 "codecs/isac/main/source/filterbank_tables.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200453 "codecs/isac/main/source/filterbanks.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000454 "codecs/isac/main/source/intialize.c",
455 "codecs/isac/main/source/isac.c",
Karl Wiberg74043682015-09-22 19:31:40 +0200456 "codecs/isac/main/source/isac_float_type.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000457 "codecs/isac/main/source/lattice.c",
458 "codecs/isac/main/source/lpc_analysis.c",
459 "codecs/isac/main/source/lpc_analysis.h",
460 "codecs/isac/main/source/lpc_gain_swb_tables.c",
461 "codecs/isac/main/source/lpc_gain_swb_tables.h",
462 "codecs/isac/main/source/lpc_shape_swb12_tables.c",
463 "codecs/isac/main/source/lpc_shape_swb12_tables.h",
464 "codecs/isac/main/source/lpc_shape_swb16_tables.c",
465 "codecs/isac/main/source/lpc_shape_swb16_tables.h",
466 "codecs/isac/main/source/lpc_tables.c",
467 "codecs/isac/main/source/lpc_tables.h",
468 "codecs/isac/main/source/os_specific_inline.h",
469 "codecs/isac/main/source/pitch_estimator.c",
470 "codecs/isac/main/source/pitch_estimator.h",
471 "codecs/isac/main/source/pitch_filter.c",
472 "codecs/isac/main/source/pitch_gain_tables.c",
473 "codecs/isac/main/source/pitch_gain_tables.h",
474 "codecs/isac/main/source/pitch_lag_tables.c",
475 "codecs/isac/main/source/pitch_lag_tables.h",
476 "codecs/isac/main/source/settings.h",
477 "codecs/isac/main/source/spectrum_ar_model_tables.c",
478 "codecs/isac/main/source/spectrum_ar_model_tables.h",
479 "codecs/isac/main/source/structs.h",
480 "codecs/isac/main/source/transform.c",
481 ]
482
483 if (is_linux) {
484 libs = [ "m" ]
485 }
486
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700487 public_configs = [ ":isac_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000488
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000489 deps = [
490 ":audio_decoder_interface",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000491 ":audio_encoder_interface",
kwiberg608c3cf2015-08-24 02:03:23 -0700492 ":isac_common",
aleloicfee2152016-08-29 04:09:19 -0700493 "../..:webrtc_common",
494 "../../base:rtc_base_approved",
kwiberg@webrtc.orgb3ad8cf2014-12-11 10:08:19 +0000495 "../../common_audio",
496 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000497}
498
499config("isac_fix_config") {
500 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000501 "../../..",
Henrik Kjellander74640892015-10-29 11:31:02 +0100502 "codecs/isac/fix/include",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000503 ]
504}
505
kjellanderb62dbbe2016-09-23 00:38:52 -0700506rtc_static_library("isac_fix") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000507 sources = [
Henrik Kjellander74640892015-10-29 11:31:02 +0100508 "codecs/isac/fix/include/audio_decoder_isacfix.h",
509 "codecs/isac/fix/include/audio_encoder_isacfix.h",
510 "codecs/isac/fix/include/isacfix.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000511 "codecs/isac/fix/source/arith_routines.c",
512 "codecs/isac/fix/source/arith_routines_hist.c",
513 "codecs/isac/fix/source/arith_routines_logist.c",
514 "codecs/isac/fix/source/arith_routins.h",
Karl Wiberg74043682015-09-22 19:31:40 +0200515 "codecs/isac/fix/source/audio_decoder_isacfix.cc",
kwiberg@webrtc.org88bdec82014-12-16 12:49:37 +0000516 "codecs/isac/fix/source/audio_encoder_isacfix.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000517 "codecs/isac/fix/source/bandwidth_estimator.c",
518 "codecs/isac/fix/source/bandwidth_estimator.h",
519 "codecs/isac/fix/source/codec.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000520 "codecs/isac/fix/source/decode.c",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200521 "codecs/isac/fix/source/decode_bwe.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000522 "codecs/isac/fix/source/decode_plc.c",
523 "codecs/isac/fix/source/encode.c",
524 "codecs/isac/fix/source/entropy_coding.c",
525 "codecs/isac/fix/source/entropy_coding.h",
526 "codecs/isac/fix/source/fft.c",
527 "codecs/isac/fix/source/fft.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000528 "codecs/isac/fix/source/filterbank_tables.c",
529 "codecs/isac/fix/source/filterbank_tables.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200530 "codecs/isac/fix/source/filterbanks.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000531 "codecs/isac/fix/source/filters.c",
532 "codecs/isac/fix/source/initialize.c",
Karl Wiberg74043682015-09-22 19:31:40 +0200533 "codecs/isac/fix/source/isac_fix_type.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000534 "codecs/isac/fix/source/isacfix.c",
535 "codecs/isac/fix/source/lattice.c",
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700536 "codecs/isac/fix/source/lattice_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000537 "codecs/isac/fix/source/lpc_masking_model.c",
538 "codecs/isac/fix/source/lpc_masking_model.h",
539 "codecs/isac/fix/source/lpc_tables.c",
540 "codecs/isac/fix/source/lpc_tables.h",
541 "codecs/isac/fix/source/pitch_estimator.c",
542 "codecs/isac/fix/source/pitch_estimator.h",
Ljubomir Papuga8f85dbc2015-04-21 16:52:45 -0700543 "codecs/isac/fix/source/pitch_estimator_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000544 "codecs/isac/fix/source/pitch_filter.c",
Ljubomir Papuga8f85dbc2015-04-21 16:52:45 -0700545 "codecs/isac/fix/source/pitch_filter_c.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000546 "codecs/isac/fix/source/pitch_gain_tables.c",
547 "codecs/isac/fix/source/pitch_gain_tables.h",
548 "codecs/isac/fix/source/pitch_lag_tables.c",
549 "codecs/isac/fix/source/pitch_lag_tables.h",
550 "codecs/isac/fix/source/settings.h",
551 "codecs/isac/fix/source/spectrum_ar_model_tables.c",
552 "codecs/isac/fix/source/spectrum_ar_model_tables.h",
553 "codecs/isac/fix/source/structs.h",
554 "codecs/isac/fix/source/transform.c",
555 "codecs/isac/fix/source/transform_tables.c",
556 ]
557
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700558 public_configs = [ ":isac_fix_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000559
560 deps = [
Henrik Lundind048aa02015-12-03 17:47:21 +0100561 ":audio_decoder_interface",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000562 ":audio_encoder_interface",
kwiberg608c3cf2015-08-24 02:03:23 -0700563 ":isac_common",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000564 "../../common_audio",
565 "../../system_wrappers",
566 ]
567
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700568 if (rtc_build_with_neon) {
Zhongwei Yaoe8a197b2015-04-28 14:42:11 +0800569 deps += [ ":isac_neon" ]
570 }
571
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700572 if (current_cpu == "arm" && arm_version >= 7) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000573 sources += [
574 "codecs/isac/fix/source/lattice_armv7.S",
575 "codecs/isac/fix/source/pitch_filter_armv6.S",
576 ]
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700577 sources -= [
578 "codecs/isac/fix/source/lattice_c.c",
579 "codecs/isac/fix/source/pitch_filter_c.c",
580 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000581 }
582
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000583 if (current_cpu == "mipsel") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000584 sources += [
585 "codecs/isac/fix/source/entropy_coding_mips.c",
586 "codecs/isac/fix/source/filters_mips.c",
587 "codecs/isac/fix/source/lattice_mips.c",
588 "codecs/isac/fix/source/pitch_estimator_mips.c",
589 "codecs/isac/fix/source/transform_mips.c",
590 ]
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700591 sources -= [
592 "codecs/isac/fix/source/lattice_c.c",
593 "codecs/isac/fix/source/pitch_estimator_c.c",
594 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000595 if (mips_dsp_rev > 0) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200596 sources += [ "codecs/isac/fix/source/filterbanks_mips.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000597 }
598 if (mips_dsp_rev > 1) {
599 sources += [
600 "codecs/isac/fix/source/lpc_masking_model_mips.c",
601 "codecs/isac/fix/source/pitch_filter_mips.c",
602 ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200603 sources -= [ "codecs/isac/fix/source/pitch_filter_c.c" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000604 }
605 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000606}
607
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700608if (rtc_build_with_neon) {
kjellanderb62dbbe2016-09-23 00:38:52 -0700609 rtc_static_library("isac_neon") {
Zhongwei Yaof242e662015-05-06 16:39:17 +0800610 sources = [
611 "codecs/isac/fix/source/entropy_coding_neon.c",
Zhongwei Yaob3cc77f2015-07-28 11:17:40 +0800612 "codecs/isac/fix/source/filterbanks_neon.c",
Zhongwei Yaof242e662015-05-06 16:39:17 +0800613 "codecs/isac/fix/source/filters_neon.c",
614 "codecs/isac/fix/source/lattice_neon.c",
615 "codecs/isac/fix/source/transform_neon.c",
616 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000617
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700618 if (current_cpu != "arm64") {
619 # Enable compilation for the NEON instruction set. This is needed
620 # since //build/config/arm.gni only enables NEON for iOS, not Android.
621 # This provides the same functionality as webrtc/build/arm_neon.gypi.
ehmaldonado38a21322016-09-02 04:10:34 -0700622 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700623 cflags = [ "-mfpu=neon" ]
624 }
625
626 # Disable LTO on NEON targets due to compiler bug.
627 # TODO(fdegans): Enable this. See crbug.com/408997.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000628 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000629 cflags -= [
630 "-flto",
631 "-ffat-lto-objects",
632 ]
633 }
634
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200635 deps = [
636 "../../common_audio",
637 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000638 }
639}
640
641config("pcm16b_config") {
642 include_dirs = [
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000643 "../../..",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000644 "codecs/pcm16b/include",
645 ]
646}
647
kjellanderb62dbbe2016-09-23 00:38:52 -0700648rtc_static_library("pcm16b") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000649 sources = [
Karl Wibergc0ac6ca2015-09-17 07:47:34 +0200650 "codecs/pcm16b/audio_decoder_pcm16b.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100651 "codecs/pcm16b/audio_decoder_pcm16b.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200652 "codecs/pcm16b/audio_encoder_pcm16b.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100653 "codecs/pcm16b/audio_encoder_pcm16b.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000654 "codecs/pcm16b/pcm16b.c",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100655 "codecs/pcm16b/pcm16b.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000656 ]
657
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000658 deps = [
Henrik Lundind048aa02015-12-03 17:47:21 +0100659 ":audio_decoder_interface",
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000660 ":audio_encoder_interface",
henrik.lundin@webrtc.org817e50d2014-12-11 10:47:19 +0000661 ":g711",
662 ]
663
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700664 public_configs = [ ":pcm16b_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000665}
666
667config("opus_config") {
andresp@webrtc.org262e6762014-09-04 13:28:48 +0000668 include_dirs = [ "../../.." ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000669}
670
kjellanderb62dbbe2016-09-23 00:38:52 -0700671rtc_static_library("webrtc_opus") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000672 sources = [
Karl Wiberg0b058792015-09-15 17:28:18 +0200673 "codecs/opus/audio_decoder_opus.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100674 "codecs/opus/audio_decoder_opus.h",
kwiberg@webrtc.org663fdd02014-10-29 07:28:36 +0000675 "codecs/opus/audio_encoder_opus.cc",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100676 "codecs/opus/audio_encoder_opus.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000677 "codecs/opus/opus_inst.h",
678 "codecs/opus/opus_interface.c",
kjellander@webrtc.org3c652b62015-11-18 23:07:57 +0100679 "codecs/opus/opus_interface.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000680 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000681
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200682 deps = [
Henrik Lundind048aa02015-12-03 17:47:21 +0100683 ":audio_decoder_interface",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200684 ":audio_encoder_interface",
minyue41b9c802016-10-06 07:13:54 -0700685 ":audio_network_adaptor",
Henrik Lundind048aa02015-12-03 17:47:21 +0100686 "../../base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200687 ]
henrik.lundin@webrtc.orgc1c92912014-12-16 13:41:36 +0000688
minyue@webrtc.org7c112f32015-03-17 14:04:56 +0000689 if (rtc_build_opus) {
tfarina702f3972015-09-25 05:57:37 -0700690 public_deps = [
691 rtc_opus_dir,
692 ]
minyue@webrtc.org7c112f32015-03-17 14:04:56 +0000693 } else if (build_with_mozilla) {
694 include_dirs = [ getenv("DIST") + "/include/opus" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000695 }
696}
697
minyue25f6a392016-09-22 22:23:20 -0700698if (rtc_enable_protobuf) {
699 proto_library("ana_debug_dump_proto") {
700 sources = [
701 "audio_network_adaptor/debug_dump.proto",
702 ]
703 proto_out_dir = "webrtc/modules/audio_coding/audio_network_adaptor"
704 }
minyuea1d9ad02016-10-02 14:53:37 -0700705 proto_library("ana_config_proto") {
706 sources = [
707 "audio_network_adaptor/config.proto",
708 ]
709 proto_out_dir = "webrtc/modules/audio_coding/audio_network_adaptor"
710 }
minyue25f6a392016-09-22 22:23:20 -0700711}
712
minyue7610f852016-09-07 13:51:51 -0700713source_set("audio_network_adaptor") {
714 sources = [
715 "audio_network_adaptor/audio_network_adaptor.cc",
minyuecaa9cb22016-09-13 13:34:15 -0700716 "audio_network_adaptor/audio_network_adaptor_impl.cc",
717 "audio_network_adaptor/audio_network_adaptor_impl.h",
minyue4aec1d42016-09-21 23:01:26 -0700718 "audio_network_adaptor/bitrate_controller.cc",
719 "audio_network_adaptor/bitrate_controller.h",
minyue2e164c62016-09-14 06:47:36 -0700720 "audio_network_adaptor/channel_controller.cc",
721 "audio_network_adaptor/channel_controller.h",
minyuecaa9cb22016-09-13 13:34:15 -0700722 "audio_network_adaptor/controller.cc",
723 "audio_network_adaptor/controller.h",
724 "audio_network_adaptor/controller_manager.cc",
725 "audio_network_adaptor/controller_manager.h",
minyue25f6a392016-09-22 22:23:20 -0700726 "audio_network_adaptor/debug_dump_writer.cc",
727 "audio_network_adaptor/debug_dump_writer.h",
minyue186cd062016-09-16 05:54:39 -0700728 "audio_network_adaptor/dtx_controller.cc",
729 "audio_network_adaptor/dtx_controller.h",
minyued0ede442016-09-22 06:20:50 -0700730 "audio_network_adaptor/fec_controller.cc",
731 "audio_network_adaptor/fec_controller.h",
minyuee35d3292016-09-21 16:00:31 -0700732 "audio_network_adaptor/frame_length_controller.cc",
733 "audio_network_adaptor/frame_length_controller.h",
minyue7610f852016-09-07 13:51:51 -0700734 "audio_network_adaptor/include/audio_network_adaptor.h",
minyue35483572016-09-20 23:13:08 -0700735 "audio_network_adaptor/smoothing_filter.cc",
736 "audio_network_adaptor/smoothing_filter.h",
minyue7610f852016-09-07 13:51:51 -0700737 ]
738 configs += [ "../..:common_config" ]
739 public_configs = [ "../..:common_inherited_config" ]
minyue25f6a392016-09-22 22:23:20 -0700740
minyue41b9c802016-10-06 07:13:54 -0700741 deps = [
742 "../..:webrtc_common",
743 "../../system_wrappers",
744 ]
745
minyue25f6a392016-09-22 22:23:20 -0700746 if (rtc_enable_protobuf) {
minyue41b9c802016-10-06 07:13:54 -0700747 deps += [
minyuea1d9ad02016-10-02 14:53:37 -0700748 ":ana_config_proto",
minyue25f6a392016-09-22 22:23:20 -0700749 ":ana_debug_dump_proto",
750 ]
751 defines = [ "WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP" ]
752 }
minyue7610f852016-09-07 13:51:51 -0700753}
754
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000755config("neteq_config") {
756 include_dirs = [
757 # Need Opus header files for the audio classifier.
758 "//third_party/opus/src/celt",
759 "//third_party/opus/src/src",
760 ]
761}
762
kjellanderb62dbbe2016-09-23 00:38:52 -0700763rtc_static_library("neteq") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000764 sources = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000765 "neteq/accelerate.cc",
766 "neteq/accelerate.h",
767 "neteq/audio_classifier.cc",
768 "neteq/audio_classifier.h",
769 "neteq/audio_decoder_impl.cc",
770 "neteq/audio_decoder_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000771 "neteq/audio_multi_vector.cc",
772 "neteq/audio_multi_vector.h",
773 "neteq/audio_vector.cc",
774 "neteq/audio_vector.h",
775 "neteq/background_noise.cc",
776 "neteq/background_noise.h",
777 "neteq/buffer_level_filter.cc",
778 "neteq/buffer_level_filter.h",
779 "neteq/comfort_noise.cc",
780 "neteq/comfort_noise.h",
minyue53ff70f2016-05-02 01:50:30 -0700781 "neteq/cross_correlation.cc",
782 "neteq/cross_correlation.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000783 "neteq/decision_logic.cc",
784 "neteq/decision_logic.h",
785 "neteq/decision_logic_fax.cc",
786 "neteq/decision_logic_fax.h",
787 "neteq/decision_logic_normal.cc",
788 "neteq/decision_logic_normal.h",
789 "neteq/decoder_database.cc",
790 "neteq/decoder_database.h",
791 "neteq/defines.h",
792 "neteq/delay_manager.cc",
793 "neteq/delay_manager.h",
794 "neteq/delay_peak_detector.cc",
795 "neteq/delay_peak_detector.h",
796 "neteq/dsp_helper.cc",
797 "neteq/dsp_helper.h",
798 "neteq/dtmf_buffer.cc",
799 "neteq/dtmf_buffer.h",
800 "neteq/dtmf_tone_generator.cc",
801 "neteq/dtmf_tone_generator.h",
802 "neteq/expand.cc",
803 "neteq/expand.h",
Henrik Kjellander74640892015-10-29 11:31:02 +0100804 "neteq/include/neteq.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000805 "neteq/merge.cc",
806 "neteq/merge.h",
henrik.lundin91951862016-06-08 06:43:41 -0700807 "neteq/nack_tracker.cc",
808 "neteq/nack_tracker.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200809 "neteq/neteq.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000810 "neteq/neteq_impl.cc",
811 "neteq/neteq_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000812 "neteq/normal.cc",
813 "neteq/normal.h",
henrik.lundin84f8cd62016-04-26 07:45:16 -0700814 "neteq/packet.cc",
815 "neteq/packet.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000816 "neteq/packet_buffer.cc",
817 "neteq/packet_buffer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000818 "neteq/post_decode_vad.cc",
819 "neteq/post_decode_vad.h",
820 "neteq/preemptive_expand.cc",
821 "neteq/preemptive_expand.h",
822 "neteq/random_vector.cc",
823 "neteq/random_vector.h",
ossua70695a2016-09-22 02:06:28 -0700824 "neteq/red_payload_splitter.cc",
825 "neteq/red_payload_splitter.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000826 "neteq/rtcp.cc",
827 "neteq/rtcp.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200828 "neteq/statistics_calculator.cc",
829 "neteq/statistics_calculator.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000830 "neteq/sync_buffer.cc",
831 "neteq/sync_buffer.h",
henrik.lundin8053f792016-04-22 13:21:43 -0700832 "neteq/tick_timer.cc",
833 "neteq/tick_timer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000834 "neteq/time_stretch.cc",
835 "neteq/time_stretch.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200836 "neteq/timestamp_scaler.cc",
837 "neteq/timestamp_scaler.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000838 ]
839
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700840 public_configs = [ ":neteq_config" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000841
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000842 deps = [
kwiberg@webrtc.orge04a93b2014-12-09 10:12:53 +0000843 ":audio_decoder_interface",
kwiberg5178ee82016-05-03 01:39:01 -0700844 ":builtin_audio_decoder_factory",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000845 ":cng",
846 ":g711",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000847 ":pcm16b",
kwiberg5178ee82016-05-03 01:39:01 -0700848 ":rent_a_codec",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000849 "../..:webrtc_common",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000850 "../../common_audio",
851 "../../system_wrappers",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000852 ]
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +0000853
854 defines = []
855
kwibergf8c2bac2016-01-18 06:38:32 -0800856 if (rtc_include_ilbc) {
857 defines += [ "WEBRTC_CODEC_ILBC" ]
858 deps += [ ":ilbc" ]
859 }
phoglund@webrtc.org49d0d342015-03-10 16:23:24 +0000860 if (rtc_include_opus) {
861 defines += [ "WEBRTC_CODEC_OPUS" ]
862 deps += [ ":webrtc_opus" ]
863 }
kwiberg98ab3a42015-09-30 21:54:21 -0700864 if (!build_with_mozilla) {
865 if (current_cpu == "arm") {
866 defines += [ "WEBRTC_CODEC_ISACFX" ]
867 deps += [ ":isac_fix" ]
868 } else {
869 defines += [ "WEBRTC_CODEC_ISAC" ]
870 deps += [ ":isac" ]
871 }
872 defines += [ "WEBRTC_CODEC_G722" ]
873 deps += [ ":g722" ]
874 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000875}
kjellanderfb114242016-06-13 00:19:48 -0700876
henrik.lundin58466f62016-10-05 02:27:42 -0700877# Although providing only test support, this target must be outside of the
878# rtc_include_tests conditional. The reason is that it supports fuzzer tests
879# that ultimately are built and run as a part of the Chromium ecosystem, which
880# does not set the rtc_include_tests flag.
881rtc_source_set("neteq_test_minimal") {
882 testonly = true
883 sources = [
884 "neteq/tools/encode_neteq_input.cc",
885 "neteq/tools/encode_neteq_input.h",
886 "neteq/tools/neteq_test.cc",
887 "neteq/tools/neteq_test.h",
888 ]
889
890 if (is_clang) {
891 # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163).
892 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
893 }
894}
895
kjellanderfb114242016-06-13 00:19:48 -0700896if (rtc_include_tests) {
ehmaldonado38a21322016-09-02 04:10:34 -0700897 rtc_source_set("acm_receive_test") {
kjellanderfb114242016-06-13 00:19:48 -0700898 testonly = true
899 sources = [
henrik.lundin2504c0a2016-10-06 01:31:32 -0700900 "acm2/acm_receive_test.cc",
901 "acm2/acm_receive_test.h",
kjellanderfb114242016-06-13 00:19:48 -0700902 ]
903
kjellanderfb114242016-06-13 00:19:48 -0700904 defines = audio_coding_defines
905
906 deps = audio_coding_deps + [
907 ":audio_coding",
908 ":neteq_unittest_tools",
909 "//testing/gtest",
910 ]
911 }
912
ehmaldonado38a21322016-09-02 04:10:34 -0700913 rtc_source_set("acm_send_test") {
kjellanderfb114242016-06-13 00:19:48 -0700914 testonly = true
915 sources = [
henrik.lundin2504c0a2016-10-06 01:31:32 -0700916 "acm2/acm_send_test.cc",
917 "acm2/acm_send_test.h",
kjellanderfb114242016-06-13 00:19:48 -0700918 ]
919
kjellanderfb114242016-06-13 00:19:48 -0700920 defines = audio_coding_defines
921
922 deps = audio_coding_deps + [
923 ":audio_coding",
924 ":neteq_unittest_tools",
925 "//testing/gtest",
926 ]
927 }
928
ehmaldonado38a21322016-09-02 04:10:34 -0700929 rtc_executable("delay_test") {
aleloi333f2062016-07-28 01:21:29 -0700930 testonly = true
931 sources = [
932 "test/Channel.cc",
933 "test/PCMFile.cc",
934 "test/delay_test.cc",
935 "test/utility.cc",
936 ]
937
aleloi333f2062016-07-28 01:21:29 -0700938 deps = [
939 ":audio_coding",
940 "../../:webrtc_common",
941 "../../system_wrappers",
942 "../../system_wrappers:system_wrappers_default",
943 "../../test:test_support",
944 "../rtp_rtcp",
945 "//testing/gtest",
946 "//third_party/gflags:gflags",
947 ]
948 } # delay_test
949
ehmaldonado38a21322016-09-02 04:10:34 -0700950 rtc_executable("insert_packet_with_timing") {
aleloi00730c72016-07-28 01:27:10 -0700951 testonly = true
952 sources = [
953 "test/Channel.cc",
954 "test/PCMFile.cc",
955 "test/insert_packet_with_timing.cc",
956 ]
957
aleloi00730c72016-07-28 01:27:10 -0700958 if (is_clang) {
959 # Suppress warnings from Chrome's Clang plugins.
960 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700961 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloi00730c72016-07-28 01:27:10 -0700962 }
963
964 deps = [
965 ":audio_coding",
966 "../../:webrtc_common",
967 "../../system_wrappers",
968 "../../system_wrappers:system_wrappers_default",
969 "../../test:test_support",
970 "../rtp_rtcp",
971 "//testing/gtest",
972 "//third_party/gflags:gflags",
973 ]
974 } # insert_packet_with_timing
975
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700976 audio_decoder_unittests_resources =
977 [ "//resources/audio_coding/testfile32kHz.pcm" ]
kjellander32c4a202016-08-30 02:53:49 -0700978
979 if (is_ios) {
980 bundle_data("audio_decoder_unittests_bundle_data") {
981 testonly = true
982 sources = audio_decoder_unittests_resources
983 outputs = [
984 "{{bundle_resources_dir}}/{{source_file_part}}",
985 ]
986 }
987 }
988
ehmaldonado38a21322016-09-02 04:10:34 -0700989 rtc_test("audio_decoder_unittests") {
charujainddf3e4a2016-08-01 07:49:42 -0700990 testonly = true
991 sources = [
992 "neteq/audio_decoder_unittest.cc",
993 ]
994
charujainddf3e4a2016-08-01 07:49:42 -0700995 if (is_clang) {
996 # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700997 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
charujainddf3e4a2016-08-01 07:49:42 -0700998 }
999
1000 deps = []
1001
1002 defines = neteq_defines
1003
1004 deps += audio_coding_deps
1005 deps += [
1006 ":audio_decoder_interface",
1007 ":isac",
1008 ":isac_fix",
1009 ":neteq",
1010 ":neteq_unittest_tools",
1011 "../../common_audio/",
1012 "../../test:test_support_main",
1013 "//testing/gtest",
1014 ]
1015
ehmaldonado3a7f35b2016-09-14 05:10:01 -07001016 data = audio_decoder_unittests_resources
1017
charujainddf3e4a2016-08-01 07:49:42 -07001018 if (is_android) {
1019 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -07001020 shard_timeout = 900
charujainddf3e4a2016-08-01 07:49:42 -07001021 }
kjellander32c4a202016-08-30 02:53:49 -07001022 if (is_ios) {
1023 deps += [ ":audio_decoder_unittests_bundle_data" ]
charujainddf3e4a2016-08-01 07:49:42 -07001024 }
1025 } # audio_decoder_unittests
1026
kjellanderfb114242016-06-13 00:19:48 -07001027 if (rtc_enable_protobuf) {
1028 proto_library("neteq_unittest_proto") {
1029 sources = [
1030 "neteq/neteq_unittest.proto",
1031 ]
1032 proto_out_dir = "webrtc/audio_coding/neteq"
1033 }
henrik.lundin03153f12016-06-21 05:38:42 -07001034
kjellanderb62dbbe2016-09-23 00:38:52 -07001035 rtc_static_library("rtc_event_log_source") {
henrik.lundin03153f12016-06-21 05:38:42 -07001036 testonly = true
1037 sources = [
1038 "neteq/tools/rtc_event_log_source.cc",
1039 "neteq/tools/rtc_event_log_source.h",
1040 ]
1041
1042 if (is_clang) {
1043 # Suppress warnings from the Chromium Clang plugins
1044 # (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001045 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
henrik.lundin03153f12016-06-21 05:38:42 -07001046 }
1047
1048 deps = [
skvladcc91d282016-10-03 18:31:22 -07001049 "../../logging:rtc_event_log_parser",
henrik.lundin03153f12016-06-21 05:38:42 -07001050 ]
1051 public_deps = [
skvladcc91d282016-10-03 18:31:22 -07001052 "../../logging:rtc_event_log_proto",
henrik.lundin03153f12016-06-21 05:38:42 -07001053 ]
1054 }
1055
ehmaldonado38a21322016-09-02 04:10:34 -07001056 rtc_test("neteq_rtpplay") {
henrik.lundin03153f12016-06-21 05:38:42 -07001057 testonly = true
1058 defines = []
1059 deps = []
1060 sources = [
1061 "neteq/tools/neteq_rtpplay.cc",
1062 ]
1063
1064 if (is_clang) {
1065 # Suppress warnings from the Chromium Clang plugins
1066 # (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001067 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
henrik.lundin03153f12016-06-21 05:38:42 -07001068 }
1069
1070 if (is_win) {
1071 cflags = [
1072 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
1073 "/wd4373", # virtual function override.
1074 ]
1075 }
1076
1077 deps += [
1078 ":neteq",
1079 ":neteq_unittest_tools",
henrik.lundin03153f12016-06-21 05:38:42 -07001080 "../../system_wrappers:system_wrappers_default",
1081 "../../test:test_support",
1082 "//third_party/gflags",
1083 ]
1084 }
kjellanderfb114242016-06-13 00:19:48 -07001085 }
1086
ehmaldonado38a21322016-09-02 04:10:34 -07001087 rtc_test("audio_codec_speed_tests") {
aleloie6b60a42016-07-28 02:34:30 -07001088 testonly = true
1089 defines = []
1090 deps = []
1091 sources = [
1092 "codecs/isac/fix/test/isac_speed_test.cc",
1093 "codecs/opus/opus_speed_test.cc",
1094 "codecs/tools/audio_codec_speed_test.cc",
1095 "codecs/tools/audio_codec_speed_test.h",
1096 ]
1097
1098 if (is_clang) {
1099 # Suppress warnings from the Chromium Clang plugins
1100 # (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001101 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloie6b60a42016-07-28 02:34:30 -07001102 }
1103
1104 if (is_android) {
1105 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -07001106 shard_timeout = 900
aleloie6b60a42016-07-28 02:34:30 -07001107 }
1108
1109 deps += [
1110 ":isac_fix",
1111 ":webrtc_opus",
1112 "../../system_wrappers:system_wrappers_default",
1113 "../../test:test_support_main",
1114 "../audio_processing/",
1115 "//testing/gtest",
1116 ]
1117 }
1118
ehmaldonado38a21322016-09-02 04:10:34 -07001119 rtc_source_set("neteq_test_support") {
kjellanderfb114242016-06-13 00:19:48 -07001120 testonly = true
1121 sources = [
1122 "neteq/tools/neteq_external_decoder_test.cc",
1123 "neteq/tools/neteq_external_decoder_test.h",
1124 "neteq/tools/neteq_performance_test.cc",
1125 "neteq/tools/neteq_performance_test.h",
kjellanderfb114242016-06-13 00:19:48 -07001126 ]
1127
kjellanderfb114242016-06-13 00:19:48 -07001128 if (is_clang) {
1129 # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001130 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -07001131 }
1132
1133 deps = [
1134 ":neteq",
1135 ":neteq_unittest_tools",
1136 ":pcm16b",
1137 "//testing/gtest",
kjellanderfb114242016-06-13 00:19:48 -07001138 ]
1139 }
1140
ehmaldonado38a21322016-09-02 04:10:34 -07001141 rtc_source_set("neteq_quality_test_support") {
ehmaldonado861da3c2016-08-19 07:02:24 -07001142 testonly = true
1143 sources = [
1144 "neteq/tools/neteq_quality_test.cc",
1145 "neteq/tools/neteq_quality_test.h",
1146 ]
1147
ehmaldonado861da3c2016-08-19 07:02:24 -07001148 if (is_clang) {
1149 # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001150 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ehmaldonado861da3c2016-08-19 07:02:24 -07001151 }
1152
1153 deps = [
1154 ":neteq",
1155 ":neteq_unittest_tools",
ehmaldonado6c46eaa2016-08-22 09:48:02 -07001156 "//testing/gtest",
ehmaldonado861da3c2016-08-19 07:02:24 -07001157 "//third_party/gflags",
1158 ]
1159 }
1160
kjellanderfb114242016-06-13 00:19:48 -07001161 config("neteq_unittest_tools_config") {
1162 include_dirs = [ "tools" ]
1163 }
1164
ehmaldonado38a21322016-09-02 04:10:34 -07001165 rtc_source_set("neteq_unittest_tools") {
kjellanderfb114242016-06-13 00:19:48 -07001166 testonly = true
1167 sources = [
1168 "neteq/tools/audio_checksum.h",
1169 "neteq/tools/audio_loop.cc",
1170 "neteq/tools/audio_loop.h",
aleloi0e0be0a2016-08-10 04:55:20 -07001171 "neteq/tools/audio_sink.cc",
kjellanderfb114242016-06-13 00:19:48 -07001172 "neteq/tools/audio_sink.h",
1173 "neteq/tools/constant_pcm_packet_source.cc",
1174 "neteq/tools/constant_pcm_packet_source.h",
henrik.lundine8a77e32016-06-22 06:34:03 -07001175 "neteq/tools/fake_decode_from_file.cc",
1176 "neteq/tools/fake_decode_from_file.h",
kjellanderfb114242016-06-13 00:19:48 -07001177 "neteq/tools/input_audio_file.cc",
1178 "neteq/tools/input_audio_file.h",
henrik.lundine8a77e32016-06-22 06:34:03 -07001179 "neteq/tools/neteq_input.h",
1180 "neteq/tools/neteq_packet_source_input.cc",
1181 "neteq/tools/neteq_packet_source_input.h",
1182 "neteq/tools/neteq_replacement_input.cc",
1183 "neteq/tools/neteq_replacement_input.h",
kjellanderfb114242016-06-13 00:19:48 -07001184 "neteq/tools/output_audio_file.h",
1185 "neteq/tools/output_wav_file.h",
1186 "neteq/tools/packet.cc",
1187 "neteq/tools/packet.h",
kwibergb8e56ee2016-08-29 06:37:33 -07001188 "neteq/tools/packet_source.cc",
kjellanderfb114242016-06-13 00:19:48 -07001189 "neteq/tools/packet_source.h",
1190 "neteq/tools/resample_input_audio_file.cc",
1191 "neteq/tools/resample_input_audio_file.h",
1192 "neteq/tools/rtp_file_source.cc",
1193 "neteq/tools/rtp_file_source.h",
1194 "neteq/tools/rtp_generator.cc",
1195 "neteq/tools/rtp_generator.h",
1196 ]
1197
ehmaldonadoe9cc6862016-09-05 06:10:18 -07001198 public_configs = [ ":neteq_unittest_tools_config" ]
kjellanderfb114242016-06-13 00:19:48 -07001199
1200 if (is_clang) {
1201 # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -07001202 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -07001203 }
1204
1205 deps = [
henrik.lundin58466f62016-10-05 02:27:42 -07001206 ":neteq_test_minimal",
kjellanderfb114242016-06-13 00:19:48 -07001207 "../../common_audio",
1208 "../../test:rtp_test_utils",
1209 "../rtp_rtcp",
1210 ]
henrik.lundine8a77e32016-06-22 06:34:03 -07001211
1212 if (rtc_enable_protobuf) {
1213 deps += [ ":rtc_event_log_source" ]
1214 }
kjellanderfb114242016-06-13 00:19:48 -07001215 }
aleloi3022a342016-07-26 06:36:03 -07001216
ehmaldonado38a21322016-09-02 04:10:34 -07001217 rtc_source_set("neteq_test_tools") {
aleloi3022a342016-07-26 06:36:03 -07001218 testonly = true
1219 sources = [
1220 "neteq/test/NETEQTEST_DummyRTPpacket.cc",
1221 "neteq/test/NETEQTEST_DummyRTPpacket.h",
1222 "neteq/test/NETEQTEST_RTPpacket.cc",
1223 "neteq/test/NETEQTEST_RTPpacket.h",
1224 ]
1225
1226 deps = [
1227 ":cng",
1228 ":g711",
1229 ":g722",
1230 ":ilbc",
1231 ":isac",
1232 ":pcm16b",
1233 "../..:webrtc_common",
1234 "//testing/gtest",
1235 ]
1236
1237 include_dirs = [
1238 "neteq/include",
1239 "neteq/test",
1240 "../../",
1241 ]
1242
1243 if (is_win) {
1244 cflags = [
1245 # Disable warnings to enable Win64 build, issue 1323.
1246 "/wd4267", # size_t to int truncation
1247 ]
1248 }
1249 }
aleloi47bded42016-07-26 06:46:19 -07001250
aleloi82667732016-08-02 01:45:50 -07001251 config("RTPencode_config") {
1252 defines = [
1253 "CODEC_ILBC",
1254 "CODEC_PCM16B",
1255 "CODEC_G711",
1256 "CODEC_G722",
1257 "CODEC_ISAC",
1258 "CODEC_PCM16B_WB",
1259 "CODEC_ISAC_SWB",
1260 "CODEC_PCM16B_32KHZ",
1261 "CODEC_PCM16B_48KHZ",
1262 "CODEC_CNGCODEC8",
1263 "CODEC_CNGCODEC16",
1264 "CODEC_CNGCODEC32",
1265 "CODEC_ATEVENT_DECODE",
1266 "CODEC_RED",
1267 "CODEC_OPUS",
1268 ]
1269 }
1270
ehmaldonado38a21322016-09-02 04:10:34 -07001271 rtc_executable("RTPencode") {
aleloi82667732016-08-02 01:45:50 -07001272 testonly = true
1273
1274 deps = [
1275 # TODO(hlundin): Make RTPencode use ACM to encode files.
1276 ":cng",
1277 ":g711",
1278 ":g722",
1279 ":ilbc",
1280 ":isac",
1281 ":neteq_test_tools",
1282 ":pcm16b",
1283 ":webrtc_opus",
1284 "../../common_audio",
1285 ]
1286
1287 configs += [ ":RTPencode_config" ]
1288
1289 sources = [
1290 "neteq/test/RTPencode.cc",
1291 ]
1292
1293 include_dirs = [
1294 "neteq/include",
1295 "neteq/test",
1296 ]
1297
1298 if (is_win) {
1299 cflags = [
1300 # Disable warnings to enable Win64 build, issue 1323.
1301 "/wd4267", # size_t to int truncation
1302 ]
1303 }
1304 }
1305
ehmaldonado38a21322016-09-02 04:10:34 -07001306 rtc_executable("RTPchange") {
aleloi76cbe192016-08-02 02:05:03 -07001307 testonly = true
1308
1309 sources = [
1310 "neteq/test/RTPchange.cc",
1311 ]
1312
1313 deps = [
1314 ":neteq_test_tools",
1315 ]
1316 }
1317
ehmaldonado38a21322016-09-02 04:10:34 -07001318 rtc_executable("rtpcat") {
aleloi5556dcb2016-08-02 04:27:25 -07001319 testonly = true
1320
1321 sources = [
1322 "neteq/tools/rtpcat.cc",
1323 ]
1324
1325 deps = [
1326 "../../system_wrappers:system_wrappers_default",
1327 "../../test:rtp_test_utils",
1328 "//testing/gtest",
1329 ]
1330 }
1331
ehmaldonado38a21322016-09-02 04:10:34 -07001332 rtc_executable("RTPtimeshift") {
aleloi5a746502016-08-02 06:06:33 -07001333 testonly = true
1334
1335 sources = [
1336 "neteq/test/RTPtimeshift.cc",
1337 ]
1338
1339 deps = [
1340 ":neteq_test_tools",
1341 "//testing/gtest",
1342 ]
1343 }
1344
ehmaldonado38a21322016-09-02 04:10:34 -07001345 rtc_executable("RTPjitter") {
aleloi17dfa742016-08-03 01:17:25 -07001346 testonly = true
1347 deps = [
1348 "../..:webrtc_common",
kthelgason29a44e32016-09-27 03:52:02 -07001349 "../../base:rtc_base_approved",
aleloi17dfa742016-08-03 01:17:25 -07001350 "//testing/gtest",
1351 ]
1352 sources = [
1353 "neteq/test/RTPjitter.cc",
1354 ]
1355 }
1356
ehmaldonado38a21322016-09-02 04:10:34 -07001357 rtc_executable("rtp_analyze") {
aleloi47bded42016-07-26 06:46:19 -07001358 testonly = true
1359
1360 sources = [
1361 "neteq/tools/rtp_analyze.cc",
1362 ]
1363
1364 deps = [
1365 ":neteq",
1366 ":neteq_unittest_tools",
1367 ":pcm16b",
1368 "../../system_wrappers:system_wrappers_default",
1369 "//testing/gtest",
1370 "//third_party/gflags:gflags",
1371 ]
1372
1373 if (is_clang) {
1374 # Suppress warnings from Chrome's Clang plugins.
1375 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -07001376 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
aleloi47bded42016-07-26 06:46:19 -07001377 }
1378 }
aleloi630c6d52016-08-10 02:11:30 -07001379
ehmaldonado38a21322016-09-02 04:10:34 -07001380 rtc_executable("neteq_opus_quality_test") {
aleloi630c6d52016-08-10 02:11:30 -07001381 testonly = true
1382
1383 sources = [
1384 "neteq/test/neteq_opus_quality_test.cc",
1385 ]
1386
1387 deps = [
1388 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001389 ":neteq_quality_test_support",
aleloi0e0be0a2016-08-10 04:55:20 -07001390 ":neteq_unittest_tools",
aleloi630c6d52016-08-10 02:11:30 -07001391 ":webrtc_opus",
1392 "../../test:test_support_main",
1393 "//testing/gtest",
1394 "//third_party/gflags",
1395 ]
aleloi630c6d52016-08-10 02:11:30 -07001396 }
aleloi116fd612016-08-10 04:16:36 -07001397
ehmaldonado38a21322016-09-02 04:10:34 -07001398 rtc_executable("neteq_speed_test") {
aleloi116fd612016-08-10 04:16:36 -07001399 testonly = true
1400
1401 sources = [
1402 "neteq/test/neteq_speed_test.cc",
1403 ]
1404
1405 deps = [
1406 ":neteq",
1407 ":neteq_test_support",
1408 "../../system_wrappers:system_wrappers_default",
1409 "../../test:test_support",
1410 "//third_party/gflags",
1411 ]
1412 }
aleloi63910122016-08-10 04:41:14 -07001413
ehmaldonado38a21322016-09-02 04:10:34 -07001414 rtc_executable("audio_classifier_test") {
aleloi63910122016-08-10 04:41:14 -07001415 testonly = true
1416 sources = [
1417 "neteq/test/audio_classifier_test.cc",
1418 ]
1419 deps = [
1420 ":neteq",
1421 ":webrtc_opus",
1422 "../../system_wrappers:system_wrappers_default",
1423 ]
1424 }
aleloi0e0be0a2016-08-10 04:55:20 -07001425
ehmaldonado38a21322016-09-02 04:10:34 -07001426 rtc_executable("neteq_ilbc_quality_test") {
aleloi0e0be0a2016-08-10 04:55:20 -07001427 testonly = true
1428
1429 sources = [
1430 "neteq/test/neteq_ilbc_quality_test.cc",
1431 ]
1432
1433 deps = [
1434 ":ilbc",
1435 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001436 ":neteq_quality_test_support",
aleloi0e0be0a2016-08-10 04:55:20 -07001437 ":neteq_unittest_tools",
1438 "../../system_wrappers:system_wrappers_default",
1439 "../../test:test_support_main",
1440 "//testing/gtest",
1441 "//third_party/gflags",
1442 ]
1443 }
aleloi6df36dc2016-08-10 05:04:47 -07001444
ehmaldonado38a21322016-09-02 04:10:34 -07001445 rtc_executable("neteq_isac_quality_test") {
aleloi6df36dc2016-08-10 05:04:47 -07001446 testonly = true
1447
1448 sources = [
1449 "neteq/test/neteq_isac_quality_test.cc",
1450 ]
1451
1452 deps = [
1453 ":isac_fix",
1454 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001455 ":neteq_quality_test_support",
aleloi6df36dc2016-08-10 05:04:47 -07001456 "../../test:test_support_main",
1457 "//testing/gtest",
1458 "//third_party/gflags",
1459 ]
1460 }
aleloic4ac7002016-08-10 05:06:27 -07001461
ehmaldonado38a21322016-09-02 04:10:34 -07001462 rtc_executable("neteq_pcmu_quality_test") {
aleloic4ac7002016-08-10 05:06:27 -07001463 testonly = true
1464
1465 sources = [
1466 "neteq/test/neteq_pcmu_quality_test.cc",
1467 ]
1468
1469 deps = [
1470 ":g711",
1471 ":neteq",
ehmaldonado861da3c2016-08-19 07:02:24 -07001472 ":neteq_quality_test_support",
aleloic4ac7002016-08-10 05:06:27 -07001473 "../../test:test_support_main",
1474 "//testing/gtest",
1475 "//third_party/gflags",
1476 ]
1477 }
aleloib7186d02016-08-16 01:47:16 -07001478
ehmaldonado38a21322016-09-02 04:10:34 -07001479 rtc_executable("isac_fix_test") {
aleloib7186d02016-08-16 01:47:16 -07001480 testonly = true
1481
1482 sources = [
1483 "codecs/isac/fix/test/kenny.cc",
1484 ]
1485
1486 deps = [
1487 ":isac_fix",
1488 "../../test:test_support",
1489 ]
1490
1491 if (is_win) {
1492 cflags = [
1493 # Disable warnings to enable Win64 build, issue 1323.
1494 "/wd4267", # size_t to int truncation
1495 ]
1496 }
1497 }
aleloi16f55a12016-08-23 08:08:23 -07001498
ehmaldonadod02fe4b2016-08-26 13:31:24 -07001499 config("isac_test_warnings_config") {
1500 if (is_win && is_clang) {
1501 cflags = [
1502 # Disable warnings failing when compiling with Clang on Windows.
1503 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
1504 "-Wno-format",
1505 ]
1506 }
1507 }
1508
ehmaldonado38a21322016-09-02 04:10:34 -07001509 rtc_executable("isac_test") {
ivoce51b41a2016-08-24 02:25:57 -07001510 testonly = true
1511
1512 sources = [
1513 "codecs/isac/main/test/simpleKenny.c",
1514 "codecs/isac/main/util/utility.c",
1515 ]
1516
1517 include_dirs = [
1518 "codecs/isac/main/include",
1519 "codecs/isac/main/test",
1520 "codecs/isac/main/util",
1521 ]
1522
1523 deps = [
1524 ":isac",
ivoc48052312016-08-25 04:43:45 -07001525 "../../base:rtc_base_approved",
ivoce51b41a2016-08-24 02:25:57 -07001526 ]
1527
ehmaldonadod02fe4b2016-08-26 13:31:24 -07001528 configs += [ ":isac_test_warnings_config" ]
ivoce51b41a2016-08-24 02:25:57 -07001529 }
1530
ehmaldonado38a21322016-09-02 04:10:34 -07001531 rtc_executable("g711_test") {
aleloi16f55a12016-08-23 08:08:23 -07001532 testonly = true
1533
1534 sources = [
1535 "codecs/g711/test/testG711.cc",
1536 ]
1537
aleloi16f55a12016-08-23 08:08:23 -07001538 deps = [
1539 ":g711",
1540 ]
1541 }
aleloi9a117842016-08-23 08:36:10 -07001542
ehmaldonado38a21322016-09-02 04:10:34 -07001543 rtc_executable("g722_test") {
aleloi9a117842016-08-23 08:36:10 -07001544 testonly = true
1545
1546 sources = [
1547 "codecs/g722/test/testG722.cc",
1548 ]
1549
aleloi9a117842016-08-23 08:36:10 -07001550 deps = [
1551 ":g722",
1552 "../..:webrtc_common",
1553 ]
1554 }
ivoc2c670db2016-08-24 06:11:18 -07001555
ehmaldonado38a21322016-09-02 04:10:34 -07001556 rtc_executable("isac_api_test") {
aleloicfee2152016-08-29 04:09:19 -07001557 testonly = true
1558
1559 sources = [
1560 "codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc",
1561 "codecs/isac/main/util/utility.c",
1562 ]
1563
aleloicfee2152016-08-29 04:09:19 -07001564 deps = [
1565 ":isac",
1566 "../../base:rtc_base_approved",
aleloicfee2152016-08-29 04:09:19 -07001567 ]
1568
1569 include_dirs = [
1570 "codecs/isac/main/include",
1571 "codecs/isac/main/test",
1572 "codecs/isac/main/util",
1573 ]
1574 }
1575
ehmaldonado38a21322016-09-02 04:10:34 -07001576 rtc_executable("isac_switch_samprate_test") {
aleloicfee2152016-08-29 04:09:19 -07001577 testonly = true
1578
1579 sources = [
1580 "codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc",
1581 "codecs/isac/main/util/utility.c",
1582 ]
1583
aleloicfee2152016-08-29 04:09:19 -07001584 deps = [
1585 ":isac",
aleloicfee2152016-08-29 04:09:19 -07001586 ]
1587
1588 include_dirs = [
1589 "codecs/isac/main/include",
1590 "codecs/isac/main/test",
1591 "codecs/isac/main/util",
1592 "../../common_audio/signal_processing/include",
1593 ]
1594 }
1595
ehmaldonado38a21322016-09-02 04:10:34 -07001596 rtc_executable("ilbc_test") {
aleloicfee2152016-08-29 04:09:19 -07001597 testonly = true
1598
1599 sources = [
1600 "codecs/ilbc/test/iLBC_test.c",
1601 ]
1602
aleloicfee2152016-08-29 04:09:19 -07001603 deps = [
1604 ":ilbc",
aleloicfee2152016-08-29 04:09:19 -07001605 ]
1606 }
1607
ehmaldonado38a21322016-09-02 04:10:34 -07001608 rtc_executable("webrtc_opus_fec_test") {
ivoc2c670db2016-08-24 06:11:18 -07001609 testonly = true
1610
1611 sources = [
1612 "codecs/opus/opus_fec_test.cc",
1613 ]
1614
1615 deps = [
1616 ":webrtc_opus",
ivoc48052312016-08-25 04:43:45 -07001617 "../../base:rtc_base_approved",
ivoc2c670db2016-08-24 06:11:18 -07001618 "../../common_audio",
1619 "../../test:test_support",
1620 "../../test:test_support_main",
ivoc2c670db2016-08-24 06:11:18 -07001621 "//testing/gtest",
1622 ]
1623
1624 if (is_clang) {
1625 # Suppress warnings from Chrome's Clang plugins.
1626 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -07001627 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ivoc2c670db2016-08-24 06:11:18 -07001628 }
1629 }
kjellanderfb114242016-06-13 00:19:48 -07001630}