Chromium Code Reviews| 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 if (rtc_include_internal_audio_device && (is_ios || is_mac)) { | |
| 49 rtc_static_library("objc_audio_device") { | |
|
kjellander_webrtc
2017/08/14 06:54:13
I prefer audio_device_objc
mbonadei
2017/08/16 09:15:25
Done.
| |
| 50 sources = [ | |
| 51 "ios/audio_device_ios.h", | |
| 52 "ios/audio_device_ios.mm", | |
| 53 "ios/audio_device_not_implemented_ios.mm", | |
| 54 "ios/audio_session_observer.h", | |
| 55 "ios/objc/RTCAudioSessionDelegateAdapter.h", | |
| 56 "ios/objc/RTCAudioSessionDelegateAdapter.mm", | |
| 57 "ios/voice_processing_audio_unit.h", | |
| 58 "ios/voice_processing_audio_unit.mm", | |
| 59 ] | |
| 60 libs = [ | |
| 61 "AudioToolbox.framework", | |
| 62 "AVFoundation.framework", | |
| 63 "Foundation.framework", | |
| 64 "UIKit.framework", | |
| 65 ] | |
| 66 check_includes = false | |
|
kjellander_webrtc
2017/08/14 06:54:14
we usually have this earlier in the target. I'm no
mbonadei
2017/08/16 09:15:25
Right. This has been removed in ps#6 because the c
| |
| 67 deps = [ | |
| 68 # There is a cyclic dependency with :audio_device | |
|
kjellander_webrtc
2017/08/14 06:54:13
I prefer to have this comment at the check_include
mbonadei
2017/08/16 09:15:25
Done.
| |
| 69 # ":audio_device", | |
| 70 "../../rtc_base:gtest_prod", | |
| 71 "../../rtc_base:rtc_base", | |
| 72 "../../sdk:objc_audio", | |
| 73 "../../sdk:objc_common", | |
| 74 "../../system_wrappers:metrics_api", | |
| 75 ] | |
| 76 if (!build_with_chromium && is_clang) { | |
| 77 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
| 78 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
| 79 } | |
| 80 } | |
| 81 } | |
| 82 | |
| 48 rtc_static_library("audio_device") { | 83 rtc_static_library("audio_device") { |
| 49 public_configs = [ ":audio_device_config" ] | 84 public_configs = [ ":audio_device_config" ] |
| 50 | 85 |
| 51 deps = [ | 86 deps = [ |
| 52 "..:module_api", | 87 "..:module_api", |
| 53 "../..:webrtc_common", | 88 "../..:webrtc_common", |
| 54 "../../common_audio", | 89 "../../common_audio", |
| 55 "../../rtc_base:rtc_base_approved", | 90 "../../rtc_base:rtc_base_approved", |
| 56 "../../rtc_base:rtc_task_queue", | 91 "../../rtc_base:rtc_task_queue", |
| 57 "../../system_wrappers", | 92 "../../system_wrappers", |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 168 # Needed for CoreGraphics: | 203 # Needed for CoreGraphics: |
| 169 "ApplicationServices.framework", | 204 "ApplicationServices.framework", |
| 170 | 205 |
| 171 "AudioToolbox.framework", | 206 "AudioToolbox.framework", |
| 172 "CoreAudio.framework", | 207 "CoreAudio.framework", |
| 173 | 208 |
| 174 # Needed for CGEventSourceKeyState in audio_device_mac.cc: | 209 # Needed for CGEventSourceKeyState in audio_device_mac.cc: |
| 175 "CoreGraphics.framework", | 210 "CoreGraphics.framework", |
| 176 ] | 211 ] |
| 177 } | 212 } |
| 178 if (is_ios) { | 213 if (is_ios) { |
|
kjellander_webrtc
2017/08/16 09:31:53
I think this would have caused an error if rtc_inc
kjellander_webrtc
2017/08/16 09:33:09
To be clear: you are fixing this in your CL, so th
| |
| 179 public_deps = [ | 214 deps += [ ":objc_audio_device" ] |
| 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 } | 215 } |
| 202 if (is_win) { | 216 if (is_win) { |
| 203 sources += [ | 217 sources += [ |
| 204 "win/audio_device_core_win.cc", | 218 "win/audio_device_core_win.cc", |
| 205 "win/audio_device_core_win.h", | 219 "win/audio_device_core_win.h", |
| 206 ] | 220 ] |
| 207 libs = [ | 221 libs = [ |
| 208 # Required for the built-in WASAPI AEC. | 222 # Required for the built-in WASAPI AEC. |
| 209 "dmoguids.lib", | 223 "dmoguids.lib", |
| 210 "wmcodecdspuuid.lib", | 224 "wmcodecdspuuid.lib", |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 259 "include/mock_audio_transport.h", | 273 "include/mock_audio_transport.h", |
| 260 ] | 274 ] |
| 261 deps = [ | 275 deps = [ |
| 262 ":audio_device", | 276 ":audio_device", |
| 263 "../../test:test_support", | 277 "../../test:test_support", |
| 264 ] | 278 ] |
| 265 all_dependent_configs = [ ":mock_audio_device_config" ] | 279 all_dependent_configs = [ ":mock_audio_device_config" ] |
| 266 } | 280 } |
| 267 | 281 |
| 268 if (rtc_include_tests) { | 282 if (rtc_include_tests) { |
| 283 # TODO(kthelgason): Reenable these tests on simulator. | |
| 284 # See bugs.webrtc.org/7812 | |
| 285 if (is_ios && !use_ios_simulator) { | |
| 286 rtc_source_set("objc_audio_device_unittests") { | |
|
kjellander_webrtc
2017/08/14 06:54:13
audio_device_objc_unittests
mbonadei
2017/08/16 09:15:25
Done.
| |
| 287 testonly = true | |
| 288 sources = [ | |
| 289 "ios/audio_device_unittest_ios.mm", | |
| 290 ] | |
| 291 deps = [ | |
| 292 ":audio_device", | |
| 293 ":mock_audio_device", | |
| 294 ":objc_audio_device", | |
| 295 "../../rtc_base:rtc_base_approved", | |
| 296 "../../sdk:objc_audio", | |
| 297 "../../system_wrappers", | |
| 298 "../../test:test_support", | |
| 299 "//testing/gmock", | |
| 300 "//third_party/ocmock", | |
| 301 ] | |
| 302 if (!build_with_chromium && is_clang) { | |
| 303 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163) . | |
| 304 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
| 305 } | |
| 306 } | |
| 307 } | |
| 308 | |
| 269 rtc_source_set("audio_device_unittests") { | 309 rtc_source_set("audio_device_unittests") { |
| 270 testonly = true | 310 testonly = true |
| 271 | 311 |
| 272 # Skip restricting visibility on mobile platforms since the tests on those | 312 # Skip restricting visibility on mobile platforms since the tests on those |
| 273 # gets additional generated targets which would require many lines here to | 313 # gets additional generated targets which would require many lines here to |
| 274 # cover (which would be confusing to read and hard to maintain). | 314 # cover (which would be confusing to read and hard to maintain). |
| 275 if (!is_android && !is_ios) { | 315 if (!is_android && !is_ios) { |
| 276 visibility = [ "..:modules_unittests" ] | 316 visibility = [ "..:modules_unittests" ] |
| 277 } | 317 } |
| 278 sources = [ | 318 sources = [ |
| 279 "fine_audio_buffer_unittest.cc", | 319 "fine_audio_buffer_unittest.cc", |
| 280 ] | 320 ] |
| 281 deps = [ | 321 deps = [ |
| 282 ":audio_device", | 322 ":audio_device", |
| 283 ":mock_audio_device", | 323 ":mock_audio_device", |
| 284 "../../rtc_base:rtc_base_approved", | 324 "../../rtc_base:rtc_base_approved", |
| 285 "../../system_wrappers:system_wrappers", | 325 "../../system_wrappers", |
| 286 "../../test:test_support", | 326 "../../test:test_support", |
| 287 "../utility:utility", | 327 "../utility:utility", |
| 288 "//testing/gmock", | 328 "//testing/gmock", |
| 289 ] | 329 ] |
| 290 if (is_linux || is_mac || is_win) { | 330 if (is_linux || is_mac || is_win) { |
| 291 sources += [ "audio_device_unittest.cc" ] | 331 sources += [ "audio_device_unittest.cc" ] |
| 292 } | 332 } |
| 293 if (is_android) { | 333 if (is_android) { |
| 294 # Need to disable error due to the line in | 334 # Need to disable error due to the line in |
| 295 # base/android/jni_android.h triggering it: | 335 # base/android/jni_android.h triggering it: |
| 296 # const BASE_EXPORT jobject GetApplicationContext() | 336 # const BASE_EXPORT jobject GetApplicationContext() |
| 297 # error: type qualifiers ignored on function return type | 337 # error: type qualifiers ignored on function return type |
| 298 cflags = [ "-Wno-ignored-qualifiers" ] | 338 cflags = [ "-Wno-ignored-qualifiers" ] |
| 299 sources += [ | 339 sources += [ |
| 300 "android/audio_device_unittest.cc", | 340 "android/audio_device_unittest.cc", |
| 301 "android/audio_manager_unittest.cc", | 341 "android/audio_manager_unittest.cc", |
| 302 "android/ensure_initialized.cc", | 342 "android/ensure_initialized.cc", |
| 303 "android/ensure_initialized.h", | 343 "android/ensure_initialized.h", |
| 304 ] | 344 ] |
| 305 deps += [ | 345 deps += [ |
| 306 "../../../base", | 346 "../../../base", |
| 307 "../../sdk/android:libjingle_peerconnection_java", | 347 "../../sdk/android:libjingle_peerconnection_java", |
| 308 ] | 348 ] |
| 309 } | 349 } |
| 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) { | 350 if (!build_with_chromium && is_clang) { |
| 317 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 351 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 318 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 352 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 319 } | 353 } |
| 320 } | 354 } |
| 321 | 355 |
| 322 if (!is_ios) { | 356 if (!is_ios) { |
| 323 # These tests do not work on ios, see | 357 # These tests do not work on ios, see |
| 324 # https://bugs.chromium.org/p/webrtc/issues/detail?id=4755 | 358 # https://bugs.chromium.org/p/webrtc/issues/detail?id=4755 |
| 325 rtc_executable("audio_device_tests") { | 359 rtc_executable("audio_device_tests") { |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 352 "android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java", | 386 "android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java", |
| 353 "android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java", | 387 "android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java", |
| 354 "android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java", | 388 "android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java", |
| 355 "android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java", | 389 "android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java", |
| 356 ] | 390 ] |
| 357 deps = [ | 391 deps = [ |
| 358 "../../rtc_base:base_java", | 392 "../../rtc_base:base_java", |
| 359 ] | 393 ] |
| 360 } | 394 } |
| 361 } | 395 } |
| OLD | NEW |