From 277b6ea8508e0574f9ee7785abd798effa717e05 Mon Sep 17 00:00:00 2001 From: Alessio Bazzica Date: Tue, 6 Nov 2018 14:24:51 +0100 Subject: [PATCH] Isolating APM API build target: adding dummy :api target. This CL is part of a refactoring work to unblock other CLs that would generate a circular dependency when including modules/audio_processing. It will also allow to easily move the APM interface part under //api. More in detail, this change adds a dummy build target named :api in modules/audio_processing. It is needed to adapt the downstream projects before the APM interface files are moved to the :api target. A follow up CL will make :api an actual target and will remove the interface files from :audio_processing. Bug: webrtc:9535 Change-Id: Ifb4e1a0ac7e482a8a089ef858d7e9a91f974e51f Reviewed-on: https://webrtc-review.googlesource.com/c/109585 Reviewed-by: Sam Zackrisson Commit-Queue: Alessio Bazzica Cr-Commit-Position: refs/heads/master@{#25523} --- modules/audio_processing/BUILD.gn | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/modules/audio_processing/BUILD.gn b/modules/audio_processing/BUILD.gn index a5bcaf2f53..53744b8ee1 100644 --- a/modules/audio_processing/BUILD.gn +++ b/modules/audio_processing/BUILD.gn @@ -26,6 +26,27 @@ config("apm_debug_dump") { } } +rtc_static_library("config") { + visibility = [ ":*" ] + sources = [ + "include/config.cc", + "include/config.h", + ] + deps = [ + "../../rtc_base:macromagic", + "../../rtc_base/system:rtc_export", + ] +} + +# Temporary dummy target for the APM interface. +rtc_source_set("api") { + visibility = [ "*" ] + + # TODO(bugs.webrtc.org/9535): Adapt downstream projects and populate. + sources = [] + deps = [] +} + rtc_static_library("audio_processing") { visibility = [ "*" ] configs += [ ":apm_debug_dump" ] @@ -55,10 +76,11 @@ rtc_static_library("audio_processing") { "gain_controller2.h", "include/aec_dump.cc", "include/aec_dump.h", + + # TODO(bugs.webrtc.org/9535): Adapt downstream projects and remove + # include/audio_processing.cc/h. "include/audio_processing.cc", "include/audio_processing.h", - "include/config.cc", - "include/config.h", "level_estimator_impl.cc", "level_estimator_impl.h", "low_cut_filter.cc", @@ -95,11 +117,13 @@ rtc_static_library("audio_processing") { defines = [] deps = [ + ":api", ":apm_logging", ":audio_frame_view", ":audio_generator_interface", ":audio_processing_c", ":audio_processing_statistics", + ":config", ":gain_control_interface", "../..:webrtc_common", "../../api:array_view", @@ -360,10 +384,12 @@ if (rtc_include_tests) { deps = [ ":analog_mic_simulation", + ":api", ":apm_logging", ":audio_frame_view", ":audio_processing", ":audioproc_test_utils", + ":config", ":file_audio_generator_unittests", ":mocks", "../..:webrtc_common",