Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(581)

Unified Diff: webrtc/modules/audio_device/BUILD.gn

Issue 2991343002: Decoupling audio_device from Obj-C code (Closed)
Patch Set: Private visibility for audio_device_objc_unittests Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/audio_device/DEPS » ('j') | webrtc/modules/audio_device/noop.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_device/BUILD.gn
diff --git a/webrtc/modules/audio_device/BUILD.gn b/webrtc/modules/audio_device/BUILD.gn
index 6cf2ea79cea59690600ea4e3cd11ed10e373e0a8..c81b4b946aa1450880459167032a43f9c048a500 100644
--- a/webrtc/modules/audio_device/BUILD.gn
+++ b/webrtc/modules/audio_device/BUILD.gn
@@ -46,6 +46,58 @@ config("audio_device_warnings_config") {
}
rtc_static_library("audio_device") {
+ sources = [
+ "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
+ ]
+ if (rtc_include_internal_audio_device && is_ios) {
+ public_deps = [
+ ":audio_device_objc",
+ ]
+ } else {
+ public_deps = [
+ ":audio_device_generic",
+ ]
+ }
+}
+
+if (rtc_include_internal_audio_device && is_ios) {
+ 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
+ visibility = [ ":*" ]
+ sources = [
+ "ios/audio_device_ios.h",
+ "ios/audio_device_ios.mm",
+ "ios/audio_device_not_implemented_ios.mm",
+ "ios/audio_session_observer.h",
+ "ios/objc/RTCAudioSessionDelegateAdapter.h",
+ "ios/objc/RTCAudioSessionDelegateAdapter.mm",
+ "ios/voice_processing_audio_unit.h",
+ "ios/voice_processing_audio_unit.mm",
+ ]
+ libs = [
+ "AudioToolbox.framework",
+ "AVFoundation.framework",
+ "Foundation.framework",
+ "UIKit.framework",
+ ]
+ deps = [
+ "../../rtc_base:gtest_prod",
+ "../../rtc_base:rtc_base",
+ "../../sdk:objc_audio",
+ "../../sdk:objc_common",
+ "../../system_wrappers:metrics_api",
+ ]
+ public_deps = [
+ ":audio_device_generic",
+ ]
+ if (!build_with_chromium && is_clang) {
+ # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
+ suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
+ }
+ }
+}
+
+rtc_static_library("audio_device_generic") {
+ visibility = [ ":*" ]
public_configs = [ ":audio_device_config" ]
deps = [
@@ -175,30 +227,6 @@ rtc_static_library("audio_device") {
"CoreGraphics.framework",
]
}
- if (is_ios) {
- public_deps = [
- "../../rtc_base:gtest_prod",
- "../../rtc_base:rtc_base",
- "../../sdk:objc_audio",
- "../../sdk:objc_common",
- ]
- sources += [
- "ios/audio_device_ios.h",
- "ios/audio_device_ios.mm",
- "ios/audio_device_not_implemented_ios.mm",
- "ios/audio_session_observer.h",
- "ios/objc/RTCAudioSessionDelegateAdapter.h",
- "ios/objc/RTCAudioSessionDelegateAdapter.mm",
- "ios/voice_processing_audio_unit.h",
- "ios/voice_processing_audio_unit.mm",
- ]
- libs = [
- "AudioToolbox.framework",
- "AVFoundation.framework",
- "Foundation.framework",
- "UIKit.framework",
- ]
- }
if (is_win) {
sources += [
"win/audio_device_core_win.cc",
@@ -266,6 +294,32 @@ rtc_source_set("mock_audio_device") {
}
if (rtc_include_tests) {
+ # TODO(kthelgason): Reenable these tests on simulator.
+ # See bugs.webrtc.org/7812
+ if (is_ios && !use_ios_simulator) {
+ rtc_source_set("audio_device_objc_unittests") {
+ testonly = true
+ visibility = [ ":*" ]
+ sources = [
+ "ios/audio_device_unittest_ios.mm",
+ ]
+ deps = [
+ ":audio_device",
+ ":mock_audio_device",
+ "../../rtc_base:rtc_base_approved",
+ "../../sdk:objc_audio",
+ "../../system_wrappers",
+ "../../test:test_support",
+ "//testing/gmock",
+ "//third_party/ocmock",
+ ]
+ if (!build_with_chromium && is_clang) {
+ # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
+ suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
+ }
+ }
+ }
+
rtc_source_set("audio_device_unittests") {
testonly = true
@@ -282,7 +336,7 @@ if (rtc_include_tests) {
":audio_device",
":mock_audio_device",
"../../rtc_base:rtc_base_approved",
- "../../system_wrappers:system_wrappers",
+ "../../system_wrappers",
"../../test:test_support",
"../utility:utility",
"//testing/gmock",
@@ -307,12 +361,6 @@ if (rtc_include_tests) {
"../../sdk/android:libjingle_peerconnection_java",
]
}
- if (is_ios && !use_ios_simulator) {
- # TODO(kthelgason): Reenable these tests on simulator.
- # See bugs.webrtc.org/7812
- sources += [ "ios/audio_device_unittest_ios.mm" ]
- deps += [ "//third_party/ocmock" ]
- }
if (!build_with_chromium && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
« no previous file with comments | « no previous file | webrtc/modules/audio_device/DEPS » ('j') | webrtc/modules/audio_device/noop.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698