292 lines
10 KiB
Plaintext
Raw Normal View History

# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
{
'targets': [
{
'target_name': 'audio_device',
'type': 'static_library',
'dependencies': [
'webrtc_utility',
'<(webrtc_root)/base/base.gyp:rtc_base_approved',
'<(webrtc_root)/common.gyp:webrtc_common',
'<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
],
'include_dirs': [
'.',
'../include',
'include',
'dummy', # Contains dummy audio device implementations.
],
'direct_dependent_settings': {
'include_dirs': [
'../include',
'include',
],
},
# TODO(xians): Rename files to e.g. *_linux.{ext}, remove sources in conditions section
'sources': [
'include/audio_device.h',
'include/audio_device_defines.h',
'audio_device_buffer.cc',
'audio_device_buffer.h',
'audio_device_generic.cc',
'audio_device_generic.h',
'audio_device_config.h',
'dummy/audio_device_dummy.cc',
'dummy/audio_device_dummy.h',
'dummy/file_audio_device.cc',
'dummy/file_audio_device.h',
'fine_audio_buffer.cc',
'fine_audio_buffer.h',
],
'conditions': [
['OS=="linux"', {
'include_dirs': [
'linux',
],
}], # OS==linux
['OS=="ios"', {
'include_dirs': [
'ios',
],
}], # OS==ios
['OS=="mac"', {
'include_dirs': [
'mac',
],
}], # OS==mac
['OS=="win"', {
'include_dirs': [
'win',
],
}],
['OS=="android"', {
'include_dirs': [
'android',
],
}], # OS==android
['include_internal_audio_device==0', {
'defines': [
'WEBRTC_DUMMY_AUDIO_BUILD',
],
}],
['build_with_chromium==0', {
'sources': [
# Don't link these into Chrome since they contain static data.
'dummy/file_audio_device_factory.cc',
'dummy/file_audio_device_factory.h',
],
}],
['include_internal_audio_device==1', {
'sources': [
'audio_device_impl.cc',
'audio_device_impl.h',
],
'conditions': [
['OS=="android"', {
'sources': [
'android/audio_device_template.h',
'android/audio_manager.cc',
'android/audio_manager.h',
'android/audio_record_jni.cc',
'android/audio_record_jni.h',
'android/audio_track_jni.cc',
'android/audio_track_jni.h',
'android/build_info.cc',
'android/build_info.h',
'android/opensles_common.cc',
'android/opensles_common.h',
'android/opensles_player.cc',
'android/opensles_player.h',
],
'link_settings': {
'libraries': [
'-llog',
'-lOpenSLES',
],
},
}],
['OS=="linux"', {
'sources': [
'linux/alsasymboltable_linux.cc',
'linux/alsasymboltable_linux.h',
'linux/audio_device_alsa_linux.cc',
'linux/audio_device_alsa_linux.h',
'linux/audio_mixer_manager_alsa_linux.cc',
'linux/audio_mixer_manager_alsa_linux.h',
'linux/latebindingsymboltable_linux.cc',
'linux/latebindingsymboltable_linux.h',
],
'defines': [
'LINUX_ALSA',
],
'link_settings': {
'libraries': [
'-ldl','-lX11',
],
},
'conditions': [
['include_pulse_audio==1', {
'defines': [
'LINUX_PULSE',
],
'sources': [
'linux/audio_device_pulse_linux.cc',
'linux/audio_device_pulse_linux.h',
'linux/audio_mixer_manager_pulse_linux.cc',
'linux/audio_mixer_manager_pulse_linux.h',
'linux/pulseaudiosymboltable_linux.cc',
'linux/pulseaudiosymboltable_linux.h',
],
}],
],
}],
['OS=="mac"', {
'sources': [
'mac/audio_device_mac.cc',
'mac/audio_device_mac.h',
'mac/audio_mixer_manager_mac.cc',
'mac/audio_mixer_manager_mac.h',
'mac/portaudio/pa_memorybarrier.h',
'mac/portaudio/pa_ringbuffer.c',
'mac/portaudio/pa_ringbuffer.h',
],
'link_settings': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
'$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
],
},
}],
['OS=="ios"', {
'dependencies': [
'<(webrtc_root)/sdk/sdk.gyp:rtc_sdk_common_objc',
],
'export_dependent_settings': [
'<(webrtc_root)/sdk/sdk.gyp:rtc_sdk_common_objc',
],
'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/RTCAudioSession+Configuration.mm',
'ios/objc/RTCAudioSession+Private.h',
'ios/objc/RTCAudioSession.h',
'ios/objc/RTCAudioSession.mm',
'ios/objc/RTCAudioSessionConfiguration.h',
'ios/objc/RTCAudioSessionConfiguration.m',
'ios/objc/RTCAudioSessionDelegateAdapter.h',
'ios/objc/RTCAudioSessionDelegateAdapter.mm',
'ios/voice_processing_audio_unit.h',
'ios/voice_processing_audio_unit.mm',
],
'xcode_settings': {
'CLANG_ENABLE_OBJC_ARC': 'YES',
},
'link_settings': {
'xcode_settings': {
'OTHER_LDFLAGS': [
'-framework AudioToolbox',
'-framework AVFoundation',
'-framework Foundation',
'-framework UIKit',
],
},
},
}],
['OS=="win"', {
'sources': [
'win/audio_device_core_win.cc',
'win/audio_device_core_win.h',
'win/audio_device_wave_win.cc',
'win/audio_device_wave_win.h',
'win/audio_mixer_manager_win.cc',
'win/audio_mixer_manager_win.h',
],
'link_settings': {
'libraries': [
# Required for the built-in WASAPI AEC.
'-ldmoguids.lib',
'-lwmcodecdspuuid.lib',
'-lamstrmid.lib',
'-lmsdmo.lib',
],
},
}],
['OS=="win" and clang==1', {
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions': [
# Disable warnings failing when compiling with Clang on Windows.
# https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
'-Wno-bool-conversion',
'-Wno-delete-non-virtual-dtor',
'-Wno-logical-op-parentheses',
'-Wno-microsoft-extra-qualification',
'-Wno-microsoft-goto',
'-Wno-missing-braces',
'-Wno-parentheses-equality',
'-Wno-reorder',
'-Wno-shift-overflow',
'-Wno-tautological-compare',
'-Wno-unused-private-field',
],
},
},
}],
], # conditions
}], # include_internal_audio_device==1
], # conditions
},
],
'conditions': [
# Does not compile on iOS: webrtc:4755.
['include_tests==1 and OS!="ios"', {
'targets': [
{
'target_name': 'audio_device_tests',
'type': 'executable',
'dependencies': [
'audio_device',
'webrtc_utility',
'<(webrtc_root)/test/test.gyp:test_support_main',
'<(DEPTH)/testing/gtest.gyp:gtest',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
],
'sources': [
'test/audio_device_test_api.cc',
'test/audio_device_test_defines.h',
],
},
{
'target_name': 'audio_device_test_func',
'type': 'executable',
'dependencies': [
'audio_device',
'webrtc_utility',
'<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
'<(webrtc_root)/test/test.gyp:test_support',
'<(DEPTH)/testing/gtest.gyp:gtest',
],
'sources': [
'test/audio_device_test_func.cc',
'test/audio_device_test_defines.h',
'test/func_test_manager.cc',
'test/func_test_manager.h',
],
},
Isolate GYP target and .isolate files for tests This is a re-land attempt of http://review.webrtc.org/1673004/ It now includes a build/isolate.gypi in WebRTC that includes the same file as the one that would be included when WebRTC is used in a Chromium checkout. It is needed since it is not possible to use variables in GYP's includes sections. Implemented according to the instructions at http://www.chromium.org/developers/testing/isolated-testing Workflow has been like this: 1. create _run GYP target 2. create a stripped down .isolate file 3. export GYP_DEFINES="$GYP_DEFINES test_isolation_mode=check" 4. runhooks 5. compile 6. test if the test would run (i.e. find it's dependencies) without actually executing it: tools/swarm_client/isolate.py run --isolated out/Release/testname.isolated 7. If failing, run the fix_test_cases.py script like this: tools/swarm_client/googletest/fix_test_cases.py --isolated out/Release/testname.isolated All tests that run on the bots for WebRTC has got _run target and .isolate file created. "Normal tests" that run fine on any machine: * audio_decoder_unittests * common_audio_unittests * common_video_unittests * metrics_unittests * modules_tests * modules_unittests * neteq_unittests * system_wrappers_unittests * test_support_unittests * tools_unittests * video_engine_core_unittests * voice_engine_unittests Tests that requires bare-metal and audio/video devices: * audio_device_tests * video_capture_tests I also added the isolate boilerplate code for the following tests that are not yet pure gtest binaries (which means they cannot run isolated yet): * video_render_tests * vie_auto_test * voe_auto_test TEST=running isolate.py as described above. WebRTC trybots passing. Created a Chromium checkout with third_party/webrtc ToT and this patch applied, passing the runhooks step. BUG=1916 R=henrike@webrtc.org, tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2056004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4590 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-22 07:57:00 +00:00
], # targets
}], # include_tests==1 and OS!=ios
],
}