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 28 matching lines...) Expand all Loading... | |
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_static_library("audio_device") { |
49 sources = [ | |
50 "noop.cc", | |
kjellander_webrtc
2017/08/16 09:31:53
IIRC, this is only needed to avoid an error when c
mbonadei
2017/08/16 12:19:37
Right. It is only needed to compile a static_libra
| |
51 ] | |
52 if (rtc_include_internal_audio_device && is_ios) { | |
53 public_deps = [ | |
54 ":audio_device_objc", | |
55 ] | |
56 } else { | |
57 public_deps = [ | |
58 ":audio_device_generic", | |
59 ] | |
60 } | |
61 } | |
62 | |
63 if (rtc_include_internal_audio_device && is_ios) { | |
64 rtc_static_library("audio_device_objc") { | |
kjellander_webrtc
2017/08/16 09:31:53
I think audio_device_ios is a better name, as we'v
henrika_webrtc
2017/08/16 12:09:22
Agree. iOS should at least be part of the name.
mbonadei
2017/08/16 14:03:43
Yes, let's pick audio_device_ios_objc I prefer it
| |
65 visibility = [ ":*" ] | |
66 sources = [ | |
67 "ios/audio_device_ios.h", | |
68 "ios/audio_device_ios.mm", | |
69 "ios/audio_device_not_implemented_ios.mm", | |
70 "ios/audio_session_observer.h", | |
71 "ios/objc/RTCAudioSessionDelegateAdapter.h", | |
72 "ios/objc/RTCAudioSessionDelegateAdapter.mm", | |
73 "ios/voice_processing_audio_unit.h", | |
74 "ios/voice_processing_audio_unit.mm", | |
75 ] | |
76 libs = [ | |
77 "AudioToolbox.framework", | |
78 "AVFoundation.framework", | |
79 "Foundation.framework", | |
80 "UIKit.framework", | |
81 ] | |
82 deps = [ | |
83 "../../rtc_base:gtest_prod", | |
84 "../../rtc_base:rtc_base", | |
85 "../../sdk:objc_audio", | |
86 "../../sdk:objc_common", | |
87 "../../system_wrappers:metrics_api", | |
88 ] | |
89 public_deps = [ | |
90 ":audio_device_generic", | |
91 ] | |
92 if (!build_with_chromium && is_clang) { | |
93 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
94 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
95 } | |
96 } | |
97 } | |
98 | |
99 rtc_static_library("audio_device_generic") { | |
100 visibility = [ ":*" ] | |
49 public_configs = [ ":audio_device_config" ] | 101 public_configs = [ ":audio_device_config" ] |
50 | 102 |
51 deps = [ | 103 deps = [ |
52 "..:module_api", | 104 "..:module_api", |
53 "../..:webrtc_common", | 105 "../..:webrtc_common", |
54 "../../common_audio", | 106 "../../common_audio", |
55 "../../rtc_base:rtc_base_approved", | 107 "../../rtc_base:rtc_base_approved", |
56 "../../rtc_base:rtc_task_queue", | 108 "../../rtc_base:rtc_task_queue", |
57 "../../system_wrappers", | 109 "../../system_wrappers", |
58 "../utility", | 110 "../utility", |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
168 # Needed for CoreGraphics: | 220 # Needed for CoreGraphics: |
169 "ApplicationServices.framework", | 221 "ApplicationServices.framework", |
170 | 222 |
171 "AudioToolbox.framework", | 223 "AudioToolbox.framework", |
172 "CoreAudio.framework", | 224 "CoreAudio.framework", |
173 | 225 |
174 # Needed for CGEventSourceKeyState in audio_device_mac.cc: | 226 # Needed for CGEventSourceKeyState in audio_device_mac.cc: |
175 "CoreGraphics.framework", | 227 "CoreGraphics.framework", |
176 ] | 228 ] |
177 } | 229 } |
178 if (is_ios) { | |
179 public_deps = [ | |
180 "../../rtc_base:gtest_prod", | |
181 "../../rtc_base:rtc_base", | |
182 "../../sdk:objc_audio", | |
183 "../../sdk:objc_common", | |
184 ] | |
185 sources += [ | |
186 "ios/audio_device_ios.h", | |
187 "ios/audio_device_ios.mm", | |
188 "ios/audio_device_not_implemented_ios.mm", | |
189 "ios/audio_session_observer.h", | |
190 "ios/objc/RTCAudioSessionDelegateAdapter.h", | |
191 "ios/objc/RTCAudioSessionDelegateAdapter.mm", | |
192 "ios/voice_processing_audio_unit.h", | |
193 "ios/voice_processing_audio_unit.mm", | |
194 ] | |
195 libs = [ | |
196 "AudioToolbox.framework", | |
197 "AVFoundation.framework", | |
198 "Foundation.framework", | |
199 "UIKit.framework", | |
200 ] | |
201 } | |
202 if (is_win) { | 230 if (is_win) { |
203 sources += [ | 231 sources += [ |
204 "win/audio_device_core_win.cc", | 232 "win/audio_device_core_win.cc", |
205 "win/audio_device_core_win.h", | 233 "win/audio_device_core_win.h", |
206 ] | 234 ] |
207 libs = [ | 235 libs = [ |
208 # Required for the built-in WASAPI AEC. | 236 # Required for the built-in WASAPI AEC. |
209 "dmoguids.lib", | 237 "dmoguids.lib", |
210 "wmcodecdspuuid.lib", | 238 "wmcodecdspuuid.lib", |
211 "amstrmid.lib", | 239 "amstrmid.lib", |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
259 "include/mock_audio_transport.h", | 287 "include/mock_audio_transport.h", |
260 ] | 288 ] |
261 deps = [ | 289 deps = [ |
262 ":audio_device", | 290 ":audio_device", |
263 "../../test:test_support", | 291 "../../test:test_support", |
264 ] | 292 ] |
265 all_dependent_configs = [ ":mock_audio_device_config" ] | 293 all_dependent_configs = [ ":mock_audio_device_config" ] |
266 } | 294 } |
267 | 295 |
268 if (rtc_include_tests) { | 296 if (rtc_include_tests) { |
297 # TODO(kthelgason): Reenable these tests on simulator. | |
298 # See bugs.webrtc.org/7812 | |
299 if (is_ios && !use_ios_simulator) { | |
300 rtc_source_set("audio_device_objc_unittests") { | |
301 testonly = true | |
302 visibility = [ ":*" ] | |
303 sources = [ | |
304 "ios/audio_device_unittest_ios.mm", | |
305 ] | |
306 deps = [ | |
307 ":audio_device", | |
308 ":mock_audio_device", | |
309 "../../rtc_base:rtc_base_approved", | |
310 "../../sdk:objc_audio", | |
311 "../../system_wrappers", | |
312 "../../test:test_support", | |
313 "//testing/gmock", | |
314 "//third_party/ocmock", | |
315 ] | |
316 if (!build_with_chromium && is_clang) { | |
317 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163) . | |
318 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
319 } | |
320 } | |
321 } | |
322 | |
269 rtc_source_set("audio_device_unittests") { | 323 rtc_source_set("audio_device_unittests") { |
270 testonly = true | 324 testonly = true |
271 | 325 |
272 # Skip restricting visibility on mobile platforms since the tests on those | 326 # Skip restricting visibility on mobile platforms since the tests on those |
273 # gets additional generated targets which would require many lines here to | 327 # gets additional generated targets which would require many lines here to |
274 # cover (which would be confusing to read and hard to maintain). | 328 # cover (which would be confusing to read and hard to maintain). |
275 if (!is_android && !is_ios) { | 329 if (!is_android && !is_ios) { |
276 visibility = [ "..:modules_unittests" ] | 330 visibility = [ "..:modules_unittests" ] |
277 } | 331 } |
278 sources = [ | 332 sources = [ |
279 "fine_audio_buffer_unittest.cc", | 333 "fine_audio_buffer_unittest.cc", |
280 ] | 334 ] |
281 deps = [ | 335 deps = [ |
282 ":audio_device", | 336 ":audio_device", |
283 ":mock_audio_device", | 337 ":mock_audio_device", |
284 "../../rtc_base:rtc_base_approved", | 338 "../../rtc_base:rtc_base_approved", |
285 "../../system_wrappers:system_wrappers", | 339 "../../system_wrappers", |
286 "../../test:test_support", | 340 "../../test:test_support", |
287 "../utility:utility", | 341 "../utility:utility", |
288 "//testing/gmock", | 342 "//testing/gmock", |
289 ] | 343 ] |
290 if (is_linux || is_mac || is_win) { | 344 if (is_linux || is_mac || is_win) { |
291 sources += [ "audio_device_unittest.cc" ] | 345 sources += [ "audio_device_unittest.cc" ] |
292 } | 346 } |
293 if (is_android) { | 347 if (is_android) { |
294 # Need to disable error due to the line in | 348 # Need to disable error due to the line in |
295 # base/android/jni_android.h triggering it: | 349 # base/android/jni_android.h triggering it: |
296 # const BASE_EXPORT jobject GetApplicationContext() | 350 # const BASE_EXPORT jobject GetApplicationContext() |
297 # error: type qualifiers ignored on function return type | 351 # error: type qualifiers ignored on function return type |
298 cflags = [ "-Wno-ignored-qualifiers" ] | 352 cflags = [ "-Wno-ignored-qualifiers" ] |
299 sources += [ | 353 sources += [ |
300 "android/audio_device_unittest.cc", | 354 "android/audio_device_unittest.cc", |
301 "android/audio_manager_unittest.cc", | 355 "android/audio_manager_unittest.cc", |
302 "android/ensure_initialized.cc", | 356 "android/ensure_initialized.cc", |
303 "android/ensure_initialized.h", | 357 "android/ensure_initialized.h", |
304 ] | 358 ] |
305 deps += [ | 359 deps += [ |
306 "../../../base", | 360 "../../../base", |
307 "../../sdk/android:libjingle_peerconnection_java", | 361 "../../sdk/android:libjingle_peerconnection_java", |
308 ] | 362 ] |
309 } | 363 } |
310 if (is_ios && !use_ios_simulator) { | |
311 # TODO(kthelgason): Reenable these tests on simulator. | |
312 # See bugs.webrtc.org/7812 | |
313 sources += [ "ios/audio_device_unittest_ios.mm" ] | |
314 deps += [ "//third_party/ocmock" ] | |
315 } | |
316 if (!build_with_chromium && is_clang) { | 364 if (!build_with_chromium && is_clang) { |
317 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 365 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
318 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 366 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
319 } | 367 } |
320 } | 368 } |
321 | 369 |
322 if (!is_ios) { | 370 if (!is_ios) { |
323 # These tests do not work on ios, see | 371 # These tests do not work on ios, see |
324 # https://bugs.chromium.org/p/webrtc/issues/detail?id=4755 | 372 # https://bugs.chromium.org/p/webrtc/issues/detail?id=4755 |
325 rtc_executable("audio_device_tests") { | 373 rtc_executable("audio_device_tests") { |
(...skipping 26 matching lines...) Expand all Loading... | |
352 "android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java", | 400 "android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java", |
353 "android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java", | 401 "android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java", |
354 "android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java", | 402 "android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java", |
355 "android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java", | 403 "android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java", |
356 ] | 404 ] |
357 deps = [ | 405 deps = [ |
358 "../../rtc_base:base_java", | 406 "../../rtc_base:base_java", |
359 ] | 407 ] |
360 } | 408 } |
361 } | 409 } |
OLD | NEW |