OLD | NEW |
1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license | 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 | 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 | 5 # tree. An additional intellectual property rights grant can be found |
6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
8 | 8 |
9 import("../../webrtc.gni") | 9 import("../../webrtc.gni") |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 "-Wno-tautological-compare", | 38 "-Wno-tautological-compare", |
39 | 39 |
40 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6265 | 40 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6265 |
41 # for -Wno-thread-safety-analysis | 41 # for -Wno-thread-safety-analysis |
42 "-Wno-thread-safety-analysis", | 42 "-Wno-thread-safety-analysis", |
43 "-Wno-unused-private-field", | 43 "-Wno-unused-private-field", |
44 ] | 44 ] |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 rtc_static_library("audio_device") { | 48 rtc_source_set("audio_device") { |
| 49 public_deps = [ |
| 50 ":audio_device_generic", |
| 51 ] |
| 52 if (rtc_include_internal_audio_device && is_ios) { |
| 53 public_deps += [ ":audio_device_ios_objc" ] |
| 54 } |
| 55 } |
| 56 |
| 57 if (rtc_include_internal_audio_device && is_ios) { |
| 58 rtc_source_set("audio_device_ios_objc") { |
| 59 visibility = [ ":audio_device" ] |
| 60 sources = [ |
| 61 "ios/audio_device_ios.h", |
| 62 "ios/audio_device_ios.mm", |
| 63 "ios/audio_device_not_implemented_ios.mm", |
| 64 "ios/audio_session_observer.h", |
| 65 "ios/objc/RTCAudioSessionDelegateAdapter.h", |
| 66 "ios/objc/RTCAudioSessionDelegateAdapter.mm", |
| 67 "ios/voice_processing_audio_unit.h", |
| 68 "ios/voice_processing_audio_unit.mm", |
| 69 ] |
| 70 libs = [ |
| 71 "AudioToolbox.framework", |
| 72 "AVFoundation.framework", |
| 73 "Foundation.framework", |
| 74 "UIKit.framework", |
| 75 ] |
| 76 deps = [ |
| 77 ":audio_device_generic", |
| 78 "../../api:array_view", |
| 79 "../../rtc_base:gtest_prod", |
| 80 "../../rtc_base:rtc_base", |
| 81 "../../sdk:audio_objc", |
| 82 "../../sdk:common_objc", |
| 83 "../../system_wrappers:metrics_api", |
| 84 ] |
| 85 if (!build_with_chromium && is_clang) { |
| 86 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 87 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 88 } |
| 89 } |
| 90 } |
| 91 |
| 92 rtc_source_set("audio_device_generic") { |
| 93 visibility = [ |
| 94 ":audio_device", |
| 95 ":audio_device_ios_objc", |
| 96 ] |
49 public_configs = [ ":audio_device_config" ] | 97 public_configs = [ ":audio_device_config" ] |
50 | 98 |
51 deps = [ | 99 deps = [ |
52 "..:module_api", | 100 "..:module_api", |
53 "../..:webrtc_common", | 101 "../..:webrtc_common", |
54 "../../api:array_view", | 102 "../../api:array_view", |
55 "../../common_audio", | 103 "../../common_audio", |
56 "../../rtc_base:rtc_base_approved", | 104 "../../rtc_base:rtc_base_approved", |
57 "../../rtc_base:rtc_task_queue", | 105 "../../rtc_base:rtc_task_queue", |
58 "../../system_wrappers", | 106 "../../system_wrappers", |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 # Needed for CoreGraphics: | 217 # Needed for CoreGraphics: |
170 "ApplicationServices.framework", | 218 "ApplicationServices.framework", |
171 | 219 |
172 "AudioToolbox.framework", | 220 "AudioToolbox.framework", |
173 "CoreAudio.framework", | 221 "CoreAudio.framework", |
174 | 222 |
175 # Needed for CGEventSourceKeyState in audio_device_mac.cc: | 223 # Needed for CGEventSourceKeyState in audio_device_mac.cc: |
176 "CoreGraphics.framework", | 224 "CoreGraphics.framework", |
177 ] | 225 ] |
178 } | 226 } |
179 if (is_ios) { | |
180 public_deps = [ | |
181 "../../rtc_base:gtest_prod", | |
182 "../../rtc_base:rtc_base", | |
183 "../../sdk:audio_objc", | |
184 "../../sdk:common_objc", | |
185 ] | |
186 sources += [ | |
187 "ios/audio_device_ios.h", | |
188 "ios/audio_device_ios.mm", | |
189 "ios/audio_device_not_implemented_ios.mm", | |
190 "ios/audio_session_observer.h", | |
191 "ios/objc/RTCAudioSessionDelegateAdapter.h", | |
192 "ios/objc/RTCAudioSessionDelegateAdapter.mm", | |
193 "ios/voice_processing_audio_unit.h", | |
194 "ios/voice_processing_audio_unit.mm", | |
195 ] | |
196 libs = [ | |
197 "AudioToolbox.framework", | |
198 "AVFoundation.framework", | |
199 "Foundation.framework", | |
200 "UIKit.framework", | |
201 ] | |
202 } | |
203 if (is_win) { | 227 if (is_win) { |
204 sources += [ | 228 sources += [ |
205 "win/audio_device_core_win.cc", | 229 "win/audio_device_core_win.cc", |
206 "win/audio_device_core_win.h", | 230 "win/audio_device_core_win.h", |
207 ] | 231 ] |
208 libs = [ | 232 libs = [ |
209 # Required for the built-in WASAPI AEC. | 233 # Required for the built-in WASAPI AEC. |
210 "dmoguids.lib", | 234 "dmoguids.lib", |
211 "wmcodecdspuuid.lib", | 235 "wmcodecdspuuid.lib", |
212 "amstrmid.lib", | 236 "amstrmid.lib", |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 "include/mock_audio_transport.h", | 284 "include/mock_audio_transport.h", |
261 ] | 285 ] |
262 deps = [ | 286 deps = [ |
263 ":audio_device", | 287 ":audio_device", |
264 "../../test:test_support", | 288 "../../test:test_support", |
265 ] | 289 ] |
266 all_dependent_configs = [ ":mock_audio_device_config" ] | 290 all_dependent_configs = [ ":mock_audio_device_config" ] |
267 } | 291 } |
268 | 292 |
269 if (rtc_include_tests) { | 293 if (rtc_include_tests) { |
| 294 # TODO(kthelgason): Reenable these tests on simulator. |
| 295 # See bugs.webrtc.org/7812 |
| 296 if (is_ios && !use_ios_simulator) { |
| 297 rtc_source_set("audio_device_ios_objc_unittests") { |
| 298 testonly = true |
| 299 visibility = [ ":*" ] |
| 300 sources = [ |
| 301 "ios/audio_device_unittest_ios.mm", |
| 302 ] |
| 303 deps = [ |
| 304 ":audio_device", |
| 305 ":mock_audio_device", |
| 306 "../../rtc_base:rtc_base_approved", |
| 307 "../../sdk:audio_objc", |
| 308 "../../system_wrappers", |
| 309 "../../test:test_support", |
| 310 "//testing/gmock", |
| 311 "//third_party/ocmock", |
| 312 ] |
| 313 if (!build_with_chromium && is_clang) { |
| 314 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163)
. |
| 315 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 316 } |
| 317 } |
| 318 } |
| 319 |
270 rtc_source_set("audio_device_unittests") { | 320 rtc_source_set("audio_device_unittests") { |
271 testonly = true | 321 testonly = true |
272 | 322 |
273 # Skip restricting visibility on mobile platforms since the tests on those | 323 # Skip restricting visibility on mobile platforms since the tests on those |
274 # gets additional generated targets which would require many lines here to | 324 # gets additional generated targets which would require many lines here to |
275 # cover (which would be confusing to read and hard to maintain). | 325 # cover (which would be confusing to read and hard to maintain). |
276 if (!is_android && !is_ios) { | 326 if (!is_android && !is_ios) { |
277 visibility = [ "..:modules_unittests" ] | 327 visibility = [ "..:modules_unittests" ] |
278 } | 328 } |
279 sources = [ | 329 sources = [ |
280 "fine_audio_buffer_unittest.cc", | 330 "fine_audio_buffer_unittest.cc", |
281 ] | 331 ] |
282 deps = [ | 332 deps = [ |
283 ":audio_device", | 333 ":audio_device", |
284 ":mock_audio_device", | 334 ":mock_audio_device", |
285 "../../api:array_view", | 335 "../../api:array_view", |
286 "../../api:optional", | 336 "../../api:optional", |
287 "../../rtc_base:rtc_base_approved", | 337 "../../rtc_base:rtc_base_approved", |
288 "../../system_wrappers:system_wrappers", | 338 "../../system_wrappers", |
289 "../../test:test_support", | 339 "../../test:test_support", |
290 "../utility:utility", | 340 "../utility:utility", |
291 "//testing/gmock", | 341 "//testing/gmock", |
292 ] | 342 ] |
293 if (is_linux || is_mac || is_win) { | 343 if (is_linux || is_mac || is_win) { |
294 sources += [ "audio_device_unittest.cc" ] | 344 sources += [ "audio_device_unittest.cc" ] |
295 } | 345 } |
296 if (is_android) { | 346 if (is_android) { |
297 # Need to disable error due to the line in | 347 # Need to disable error due to the line in |
298 # base/android/jni_android.h triggering it: | 348 # base/android/jni_android.h triggering it: |
299 # const BASE_EXPORT jobject GetApplicationContext() | 349 # const BASE_EXPORT jobject GetApplicationContext() |
300 # error: type qualifiers ignored on function return type | 350 # error: type qualifiers ignored on function return type |
301 cflags = [ "-Wno-ignored-qualifiers" ] | 351 cflags = [ "-Wno-ignored-qualifiers" ] |
302 sources += [ | 352 sources += [ |
303 "android/audio_device_unittest.cc", | 353 "android/audio_device_unittest.cc", |
304 "android/audio_manager_unittest.cc", | 354 "android/audio_manager_unittest.cc", |
305 "android/ensure_initialized.cc", | 355 "android/ensure_initialized.cc", |
306 "android/ensure_initialized.h", | 356 "android/ensure_initialized.h", |
307 ] | 357 ] |
308 deps += [ | 358 deps += [ |
309 "../../../base", | 359 "../../../base", |
310 "../../sdk/android:libjingle_peerconnection_java", | 360 "../../sdk/android:libjingle_peerconnection_java", |
311 ] | 361 ] |
312 } | 362 } |
313 if (is_ios && !use_ios_simulator) { | |
314 # TODO(kthelgason): Reenable these tests on simulator. | |
315 # See bugs.webrtc.org/7812 | |
316 sources += [ "ios/audio_device_unittest_ios.mm" ] | |
317 deps += [ "//third_party/ocmock" ] | |
318 } | |
319 if (!build_with_chromium && is_clang) { | 363 if (!build_with_chromium && is_clang) { |
320 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 364 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
321 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 365 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
322 } | 366 } |
323 } | 367 } |
324 } | 368 } |
325 | 369 |
326 if (!build_with_chromium && is_android) { | 370 if (!build_with_chromium && is_android) { |
327 android_library("audio_device_java") { | 371 android_library("audio_device_java") { |
328 java_files = [ | 372 java_files = [ |
329 "android/java/src/org/webrtc/voiceengine/BuildInfo.java", | 373 "android/java/src/org/webrtc/voiceengine/BuildInfo.java", |
330 "android/java/src/org/webrtc/voiceengine/WebRtcAudioEffects.java", | 374 "android/java/src/org/webrtc/voiceengine/WebRtcAudioEffects.java", |
331 "android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java", | 375 "android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java", |
332 "android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java", | 376 "android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java", |
333 "android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java", | 377 "android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java", |
334 "android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java", | 378 "android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java", |
335 ] | 379 ] |
336 deps = [ | 380 deps = [ |
337 "../../rtc_base:base_java", | 381 "../../rtc_base:base_java", |
338 ] | 382 ] |
339 | 383 |
340 # TODO(sakal): Fix build hooks crbug.com/webrtc/8148 | 384 # TODO(sakal): Fix build hooks crbug.com/webrtc/8148 |
341 no_build_hooks = true | 385 no_build_hooks = true |
342 } | 386 } |
343 } | 387 } |
OLD | NEW |