kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 | [diff] [blame] | 1 | # 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 | |
| 9 | import("../build/webrtc.gni") |
| 10 | |
kjellander | b62dbbe | 2016-09-23 07:38:52 | [diff] [blame] | 11 | rtc_static_library("voice_engine") { |
kjellander@webrtc.org | 524b8f7 | 2014-08-31 20:32:53 | [diff] [blame] | 12 | sources = [ |
Henrik Kjellander | 57e5fd2 | 2015-05-25 10:55:39 | [diff] [blame] | 13 | "channel.cc", |
| 14 | "channel.h", |
| 15 | "channel_manager.cc", |
| 16 | "channel_manager.h", |
solenberg | 1372508 | 2015-11-25 16:16:52 | [diff] [blame] | 17 | "channel_proxy.cc", |
| 18 | "channel_proxy.h", |
kjellander@webrtc.org | 524b8f7 | 2014-08-31 20:32:53 | [diff] [blame] | 19 | "include/voe_audio_processing.h", |
| 20 | "include/voe_base.h", |
| 21 | "include/voe_codec.h", |
kjellander@webrtc.org | 524b8f7 | 2014-08-31 20:32:53 | [diff] [blame] | 22 | "include/voe_errors.h", |
| 23 | "include/voe_external_media.h", |
| 24 | "include/voe_file.h", |
| 25 | "include/voe_hardware.h", |
| 26 | "include/voe_neteq_stats.h", |
| 27 | "include/voe_network.h", |
| 28 | "include/voe_rtp_rtcp.h", |
| 29 | "include/voe_video_sync.h", |
| 30 | "include/voe_volume_control.h", |
kjellander@webrtc.org | 524b8f7 | 2014-08-31 20:32:53 | [diff] [blame] | 31 | "monitor_module.cc", |
| 32 | "monitor_module.h", |
kjellander@webrtc.org | 524b8f7 | 2014-08-31 20:32:53 | [diff] [blame] | 33 | "output_mixer.cc", |
| 34 | "output_mixer.h", |
| 35 | "shared_data.cc", |
| 36 | "shared_data.h", |
| 37 | "statistics.cc", |
| 38 | "statistics.h", |
| 39 | "transmit_mixer.cc", |
| 40 | "transmit_mixer.h", |
| 41 | "utility.cc", |
| 42 | "utility.h", |
| 43 | "voe_audio_processing_impl.cc", |
| 44 | "voe_audio_processing_impl.h", |
| 45 | "voe_base_impl.cc", |
| 46 | "voe_base_impl.h", |
| 47 | "voe_codec_impl.cc", |
| 48 | "voe_codec_impl.h", |
kjellander@webrtc.org | 524b8f7 | 2014-08-31 20:32:53 | [diff] [blame] | 49 | "voe_external_media_impl.cc", |
| 50 | "voe_external_media_impl.h", |
| 51 | "voe_file_impl.cc", |
| 52 | "voe_file_impl.h", |
| 53 | "voe_hardware_impl.cc", |
| 54 | "voe_hardware_impl.h", |
| 55 | "voe_neteq_stats_impl.cc", |
| 56 | "voe_neteq_stats_impl.h", |
| 57 | "voe_network_impl.cc", |
| 58 | "voe_network_impl.h", |
| 59 | "voe_rtp_rtcp_impl.cc", |
| 60 | "voe_rtp_rtcp_impl.h", |
| 61 | "voe_video_sync_impl.cc", |
| 62 | "voe_video_sync_impl.h", |
| 63 | "voe_volume_control_impl.cc", |
| 64 | "voe_volume_control_impl.h", |
| 65 | "voice_engine_defines.h", |
| 66 | "voice_engine_impl.cc", |
| 67 | "voice_engine_impl.h", |
| 68 | ] |
| 69 | |
| 70 | if (is_win) { |
| 71 | defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ] |
kjellander@webrtc.org | 8649fed | 2015-01-08 21:22:01 | [diff] [blame] | 72 | |
| 73 | cflags = [ |
| 74 | # TODO(kjellander): Bug 261: fix this warning. |
ossu | a16f7a8 | 2016-07-08 09:12:55 | [diff] [blame] | 75 | "/wd4373", # Virtual function override. |
kjellander@webrtc.org | 8649fed | 2015-01-08 21:22:01 | [diff] [blame] | 76 | ] |
kjellander@webrtc.org | 524b8f7 | 2014-08-31 20:32:53 | [diff] [blame] | 77 | } |
| 78 | |
kjellander | e40a7ee | 2016-10-17 06:56:12 | [diff] [blame] | 79 | if (!build_with_chromium && is_clang) { |
| 80 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 11:10:34 | [diff] [blame] | 81 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander@webrtc.org | 524b8f7 | 2014-08-31 20:32:53 | [diff] [blame] | 82 | } |
| 83 | |
ehmaldonado | 53cec04 | 2016-09-09 12:32:14 | [diff] [blame] | 84 | public_deps = [ |
| 85 | "../modules/audio_coding", |
| 86 | ] |
kjellander@webrtc.org | 524b8f7 | 2014-08-31 20:32:53 | [diff] [blame] | 87 | deps = [ |
aleloi | e6ca9ec | 2016-08-10 12:01:51 | [diff] [blame] | 88 | ":level_indicator", |
kwiberg@webrtc.org | ac2d27d | 2015-02-26 13:59:22 | [diff] [blame] | 89 | "..:webrtc_common", |
aleloi | aed581a | 2016-10-20 13:32:39 | [diff] [blame] | 90 | "../api:audio_mixer_api", |
kjellander | a69d973 | 2016-08-31 14:33:05 | [diff] [blame] | 91 | "../api:call_api", |
aleloi | a8eb756 | 2016-11-28 15:02:13 | [diff] [blame^] | 92 | "../api:transport_api", |
kjellander@webrtc.org | 7ffeab5 | 2016-02-26 21:46:09 | [diff] [blame] | 93 | "../base:rtc_base_approved", |
kjellander@webrtc.org | 524b8f7 | 2014-08-31 20:32:53 | [diff] [blame] | 94 | "../common_audio", |
skvlad | cc91d28 | 2016-10-04 01:31:22 | [diff] [blame] | 95 | "../logging:rtc_event_log_api", |
aleloi | 9ae585d | 2016-10-13 13:57:16 | [diff] [blame] | 96 | "../modules/audio_coding:audio_decoder_factory_interface", |
kwiberg | da2bf4e | 2016-10-24 20:47:09 | [diff] [blame] | 97 | "../modules/audio_coding:audio_format_conversion", |
aleloi | 9ae585d | 2016-10-13 13:57:16 | [diff] [blame] | 98 | "../modules/audio_coding:builtin_audio_decoder_factory", |
| 99 | "../modules/audio_coding:rent_a_codec", |
kjellander@webrtc.org | 524b8f7 | 2014-08-31 20:32:53 | [diff] [blame] | 100 | "../modules/audio_conference_mixer", |
| 101 | "../modules/audio_device", |
| 102 | "../modules/audio_processing", |
| 103 | "../modules/bitrate_controller", |
| 104 | "../modules/media_file", |
Stefan Holmer | b86d4e4 | 2015-12-07 09:26:18 | [diff] [blame] | 105 | "../modules/pacing", |
kjellander@webrtc.org | 524b8f7 | 2014-08-31 20:32:53 | [diff] [blame] | 106 | "../modules/rtp_rtcp", |
| 107 | "../modules/utility", |
| 108 | "../system_wrappers", |
| 109 | ] |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 | [diff] [blame] | 110 | } |
ossu | a16f7a8 | 2016-07-08 09:12:55 | [diff] [blame] | 111 | |
kjellander | b62dbbe | 2016-09-23 07:38:52 | [diff] [blame] | 112 | rtc_static_library("level_indicator") { |
aleloi | e6ca9ec | 2016-08-10 12:01:51 | [diff] [blame] | 113 | sources = [ |
| 114 | "level_indicator.cc", |
| 115 | "level_indicator.h", |
| 116 | ] |
| 117 | |
aleloi | e6ca9ec | 2016-08-10 12:01:51 | [diff] [blame] | 118 | deps = [ |
| 119 | "..:webrtc_common", |
| 120 | "../base:rtc_base_approved", |
| 121 | "../common_audio", |
| 122 | ] |
| 123 | } |
| 124 | |
ossu | a16f7a8 | 2016-07-08 09:12:55 | [diff] [blame] | 125 | if (rtc_include_tests) { |
solenberg | ba56b6c | 2016-09-13 14:29:12 | [diff] [blame] | 126 | config("channel_transport_warnings_config") { |
| 127 | if (is_win) { |
| 128 | cflags = [ "/wd4302" ] # cast truncation |
| 129 | |
| 130 | if (is_clang) { |
| 131 | # GN orders flags on a target before flags from configs. The default |
| 132 | # config adds -Wall, and this flag have to be after -Wall -- so they need |
| 133 | # to come from a config and cannot be on the target directly. |
| 134 | cflags += [ |
| 135 | "-Wno-parentheses-equality", |
| 136 | "-Wno-reorder", |
| 137 | "-Wno-tautological-constant-out-of-range-compare", |
| 138 | |
| 139 | # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6268 |
| 140 | # for -Wno-thread-safety-analysis |
| 141 | "-Wno-thread-safety-analysis", |
| 142 | "-Wno-unused-private-field", |
| 143 | ] |
| 144 | } |
| 145 | } |
| 146 | } |
| 147 | |
kjellander | b62dbbe | 2016-09-23 07:38:52 | [diff] [blame] | 148 | rtc_static_library("channel_transport") { |
solenberg | ba56b6c | 2016-09-13 14:29:12 | [diff] [blame] | 149 | testonly = true |
| 150 | sources = [ |
| 151 | "test/channel_transport/channel_transport.cc", |
| 152 | "test/channel_transport/channel_transport.h", |
| 153 | "test/channel_transport/traffic_control_win.cc", |
| 154 | "test/channel_transport/traffic_control_win.h", |
| 155 | "test/channel_transport/udp_socket2_manager_win.cc", |
| 156 | "test/channel_transport/udp_socket2_manager_win.h", |
| 157 | "test/channel_transport/udp_socket2_win.cc", |
| 158 | "test/channel_transport/udp_socket2_win.h", |
| 159 | "test/channel_transport/udp_socket_manager_posix.cc", |
| 160 | "test/channel_transport/udp_socket_manager_posix.h", |
| 161 | "test/channel_transport/udp_socket_manager_wrapper.cc", |
| 162 | "test/channel_transport/udp_socket_manager_wrapper.h", |
| 163 | "test/channel_transport/udp_socket_posix.cc", |
| 164 | "test/channel_transport/udp_socket_posix.h", |
| 165 | "test/channel_transport/udp_socket_wrapper.cc", |
| 166 | "test/channel_transport/udp_socket_wrapper.h", |
| 167 | "test/channel_transport/udp_transport.h", |
| 168 | "test/channel_transport/udp_transport_impl.cc", |
| 169 | "test/channel_transport/udp_transport_impl.h", |
| 170 | ] |
| 171 | |
| 172 | configs += [ ":channel_transport_warnings_config" ] |
| 173 | |
kjellander | e40a7ee | 2016-10-17 06:56:12 | [diff] [blame] | 174 | if (!build_with_chromium && is_clang) { |
| 175 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
solenberg | ba56b6c | 2016-09-13 14:29:12 | [diff] [blame] | 176 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 177 | } |
| 178 | |
| 179 | deps = [ |
| 180 | "..:webrtc_common", |
aleloi | a8eb756 | 2016-11-28 15:02:13 | [diff] [blame^] | 181 | "../api:transport_api", |
solenberg | ba56b6c | 2016-09-13 14:29:12 | [diff] [blame] | 182 | "../system_wrappers", |
| 183 | "//testing/gtest", |
| 184 | ] |
| 185 | } |
| 186 | |
ehmaldonado | 38a2132 | 2016-09-02 11:10:34 | [diff] [blame] | 187 | rtc_test("voice_engine_unittests") { |
ossu | a16f7a8 | 2016-07-08 09:12:55 | [diff] [blame] | 188 | deps = [ |
solenberg | ba56b6c | 2016-09-13 14:29:12 | [diff] [blame] | 189 | ":channel_transport", |
ossu | a16f7a8 | 2016-07-08 09:12:55 | [diff] [blame] | 190 | ":voice_engine", |
| 191 | "//testing/gmock", |
| 192 | "//testing/gtest", |
| 193 | "//webrtc/common_audio", |
| 194 | "//webrtc/modules/audio_coding", |
| 195 | "//webrtc/modules/audio_conference_mixer", |
| 196 | "//webrtc/modules/audio_device", |
| 197 | "//webrtc/modules/audio_processing", |
| 198 | "//webrtc/modules/media_file", |
| 199 | "//webrtc/modules/rtp_rtcp", |
solenberg | 71b9b58 | 2016-11-25 19:45:05 | [diff] [blame] | 200 | "//webrtc/modules/utility", |
ossu | a16f7a8 | 2016-07-08 09:12:55 | [diff] [blame] | 201 | "//webrtc/system_wrappers", |
| 202 | "//webrtc/test:test_support_main", |
| 203 | ] |
| 204 | |
| 205 | if (is_android) { |
| 206 | deps += [ "//testing/android/native_test:native_test_native_code" ] |
sakal | 714dd4e | 2016-08-15 09:29:11 | [diff] [blame] | 207 | shard_timeout = 900 |
ossu | a16f7a8 | 2016-07-08 09:12:55 | [diff] [blame] | 208 | } |
| 209 | |
| 210 | sources = [ |
| 211 | "channel_unittest.cc", |
solenberg | ba56b6c | 2016-09-13 14:29:12 | [diff] [blame] | 212 | "test/channel_transport/udp_socket_manager_unittest.cc", |
| 213 | "test/channel_transport/udp_socket_wrapper_unittest.cc", |
| 214 | "test/channel_transport/udp_transport_unittest.cc", |
ossu | a16f7a8 | 2016-07-08 09:12:55 | [diff] [blame] | 215 | "transmit_mixer_unittest.cc", |
| 216 | "utility_unittest.cc", |
| 217 | "voe_audio_processing_unittest.cc", |
| 218 | "voe_base_unittest.cc", |
| 219 | "voe_codec_unittest.cc", |
| 220 | "voe_network_unittest.cc", |
| 221 | "voice_engine_fixture.cc", |
| 222 | "voice_engine_fixture.h", |
| 223 | ] |
| 224 | |
| 225 | if (is_win) { |
| 226 | defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ] |
| 227 | |
| 228 | cflags = [ |
| 229 | # TODO(kjellander): Bug 261: fix this warning. |
| 230 | "/wd4373", # Virtual function override. |
| 231 | ] |
| 232 | } |
| 233 | |
kjellander | e40a7ee | 2016-10-17 06:56:12 | [diff] [blame] | 234 | if (!build_with_chromium && is_clang) { |
| 235 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 11:10:34 | [diff] [blame] | 236 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
ossu | a16f7a8 | 2016-07-08 09:12:55 | [diff] [blame] | 237 | } |
| 238 | } |
| 239 | |
solenberg | fb2c1d0 | 2016-09-15 20:12:02 | [diff] [blame] | 240 | rtc_executable("voe_cmd_test") { |
| 241 | testonly = true |
| 242 | |
| 243 | deps = [ |
| 244 | ":channel_transport", |
| 245 | ":voice_engine", |
| 246 | "//testing/gtest", |
| 247 | "//third_party/gflags", |
skvlad | cc91d28 | 2016-10-04 01:31:22 | [diff] [blame] | 248 | "//webrtc/logging:rtc_event_log_api", |
solenberg | fb2c1d0 | 2016-09-15 20:12:02 | [diff] [blame] | 249 | "//webrtc/system_wrappers", |
| 250 | "//webrtc/system_wrappers:system_wrappers_default", |
| 251 | "//webrtc/test:test_support", |
| 252 | ] |
| 253 | |
| 254 | sources = [ |
| 255 | "test/cmd_test/voe_cmd_test.cc", |
| 256 | ] |
| 257 | |
kjellander | e40a7ee | 2016-10-17 06:56:12 | [diff] [blame] | 258 | if (!build_with_chromium && is_clang) { |
| 259 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
solenberg | fb2c1d0 | 2016-09-15 20:12:02 | [diff] [blame] | 260 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 261 | } |
| 262 | } |
| 263 | |
ossu | a16f7a8 | 2016-07-08 09:12:55 | [diff] [blame] | 264 | if (!is_ios) { |
ehmaldonado | 38a2132 | 2016-09-02 11:10:34 | [diff] [blame] | 265 | rtc_executable("voe_auto_test") { |
ossu | a16f7a8 | 2016-07-08 09:12:55 | [diff] [blame] | 266 | testonly = true |
| 267 | |
| 268 | deps = [ |
solenberg | ba56b6c | 2016-09-13 14:29:12 | [diff] [blame] | 269 | ":channel_transport", |
ossu | a16f7a8 | 2016-07-08 09:12:55 | [diff] [blame] | 270 | ":voice_engine", |
| 271 | "//testing/gmock", |
| 272 | "//testing/gtest", |
| 273 | "//third_party/gflags", |
skvlad | cc91d28 | 2016-10-04 01:31:22 | [diff] [blame] | 274 | "//webrtc/logging:rtc_event_log_api", |
ossu | a16f7a8 | 2016-07-08 09:12:55 | [diff] [blame] | 275 | "//webrtc/modules/video_capture", |
| 276 | "//webrtc/system_wrappers", |
| 277 | "//webrtc/system_wrappers/:system_wrappers_default", |
ossu | a16f7a8 | 2016-07-08 09:12:55 | [diff] [blame] | 278 | "//webrtc/test/:test_common", |
| 279 | "//webrtc/test/:test_support", |
| 280 | ] |
| 281 | |
| 282 | sources = [ |
| 283 | "test/auto_test/automated_mode.cc", |
| 284 | "test/auto_test/extended/agc_config_test.cc", |
| 285 | "test/auto_test/extended/ec_metrics_test.cc", |
| 286 | "test/auto_test/fakes/conference_transport.cc", |
| 287 | "test/auto_test/fakes/conference_transport.h", |
| 288 | "test/auto_test/fakes/loudest_filter.cc", |
| 289 | "test/auto_test/fakes/loudest_filter.h", |
| 290 | "test/auto_test/fixtures/after_initialization_fixture.cc", |
| 291 | "test/auto_test/fixtures/after_initialization_fixture.h", |
| 292 | "test/auto_test/fixtures/after_streaming_fixture.cc", |
| 293 | "test/auto_test/fixtures/after_streaming_fixture.h", |
| 294 | "test/auto_test/fixtures/before_initialization_fixture.cc", |
| 295 | "test/auto_test/fixtures/before_initialization_fixture.h", |
| 296 | "test/auto_test/fixtures/before_streaming_fixture.cc", |
| 297 | "test/auto_test/fixtures/before_streaming_fixture.h", |
ossu | a16f7a8 | 2016-07-08 09:12:55 | [diff] [blame] | 298 | "test/auto_test/standard/audio_processing_test.cc", |
| 299 | "test/auto_test/standard/codec_before_streaming_test.cc", |
| 300 | "test/auto_test/standard/codec_test.cc", |
| 301 | "test/auto_test/standard/dtmf_test.cc", |
| 302 | "test/auto_test/standard/external_media_test.cc", |
| 303 | "test/auto_test/standard/file_before_streaming_test.cc", |
| 304 | "test/auto_test/standard/file_test.cc", |
| 305 | "test/auto_test/standard/hardware_before_initializing_test.cc", |
| 306 | "test/auto_test/standard/hardware_test.cc", |
| 307 | "test/auto_test/standard/mixing_test.cc", |
| 308 | "test/auto_test/standard/neteq_stats_test.cc", |
| 309 | "test/auto_test/standard/rtp_rtcp_before_streaming_test.cc", |
| 310 | "test/auto_test/standard/rtp_rtcp_extensions.cc", |
| 311 | "test/auto_test/standard/rtp_rtcp_test.cc", |
| 312 | "test/auto_test/standard/video_sync_test.cc", |
| 313 | "test/auto_test/standard/voe_base_misc_test.cc", |
| 314 | "test/auto_test/standard/volume_test.cc", |
| 315 | "test/auto_test/voe_conference_test.cc", |
| 316 | "test/auto_test/voe_cpu_test.cc", |
| 317 | "test/auto_test/voe_cpu_test.h", |
| 318 | "test/auto_test/voe_output_test.cc", |
| 319 | "test/auto_test/voe_standard_test.cc", |
| 320 | "test/auto_test/voe_standard_test.h", |
| 321 | "test/auto_test/voe_stress_test.cc", |
| 322 | "test/auto_test/voe_stress_test.h", |
| 323 | "test/auto_test/voe_test_defines.h", |
| 324 | "test/auto_test/voe_test_interface.h", |
| 325 | ] |
| 326 | |
| 327 | if (!is_android) { |
| 328 | # Some tests are not supported on android yet, exclude these tests. |
| 329 | sources += |
| 330 | [ "test/auto_test/standard/hardware_before_streaming_test.cc" ] |
| 331 | } |
| 332 | |
| 333 | defines = [] |
| 334 | |
| 335 | if (rtc_enable_protobuf) { |
| 336 | defines = [ "ENABLE_RTC_EVENT_LOG" ] |
| 337 | } |
| 338 | |
| 339 | if (is_win) { |
| 340 | defines += [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ] |
| 341 | |
| 342 | cflags = [ |
| 343 | "/wd4267", # size_t to int truncation. |
| 344 | "/wd4373", # Virtual function override. |
| 345 | # TODO(kjellander): Bug 261: fix this warning. |
| 346 | ] |
| 347 | } |
| 348 | |
kjellander | e40a7ee | 2016-10-17 06:56:12 | [diff] [blame] | 349 | if (!build_with_chromium && is_clang) { |
| 350 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 11:10:34 | [diff] [blame] | 351 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
ossu | a16f7a8 | 2016-07-08 09:12:55 | [diff] [blame] | 352 | } |
| 353 | } |
| 354 | } |
| 355 | } |