Broke out 'level_indicator' of the voice_engine GN target. This is
needed for the new audio_mixer to depend on just
'voice_engine:level_indicator' instead of the whole voice_engine and
avoid a circular dependency.
TBR=henrika@webrtc.org
NOTRY=True
Review-Url: https://codereview.webrtc.org/2221103004
Cr-Commit-Position: refs/heads/master@{#13709}
diff --git a/.gn b/.gn
index 460eae6..e151f7c 100644
--- a/.gn
+++ b/.gn
@@ -19,7 +19,7 @@
# their includes checked for proper dependencies when you run either
# "gn check" or "gn gen --check".
# TODO(kjellander): Keep adding paths to this list as work in webrtc:5589 is done.
-check_targets = []
+check_targets = [ "//webrtc/voice_engine:level_indicator" ]
# These are the list of GN files that run exec_script. This whitelist exists
# to force additional review for new uses of exec_script, which is strongly
@@ -49,4 +49,5 @@
"//third_party/openh264/BUILD.gn",
"//third_party/opus/BUILD.gn",
"//webrtc/modules/video_render/BUILD.gn",
+ "//webrtc/modules/video_render/BUILD.gn",
]
diff --git a/webrtc/voice_engine/BUILD.gn b/webrtc/voice_engine/BUILD.gn
index b587d04..808d980 100644
--- a/webrtc/voice_engine/BUILD.gn
+++ b/webrtc/voice_engine/BUILD.gn
@@ -29,8 +29,6 @@
"include/voe_rtp_rtcp.h",
"include/voe_video_sync.h",
"include/voe_volume_control.h",
- "level_indicator.cc",
- "level_indicator.h",
"monitor_module.cc",
"monitor_module.h",
"network_predictor.cc",
@@ -91,6 +89,7 @@
}
deps = [
+ ":level_indicator",
"..:rtc_event_log",
"..:webrtc_common",
"../base:rtc_base_approved",
@@ -108,6 +107,22 @@
]
}
+source_set("level_indicator") {
+ sources = [
+ "level_indicator.cc",
+ "level_indicator.h",
+ ]
+
+ configs += [ "..:common_config" ]
+ public_configs = [ "..:common_inherited_config" ]
+
+ deps = [
+ "..:webrtc_common",
+ "../base:rtc_base_approved",
+ "../common_audio",
+ ]
+}
+
if (rtc_include_tests) {
test("voice_engine_unittests") {
deps = [
diff --git a/webrtc/voice_engine/level_indicator.h b/webrtc/voice_engine/level_indicator.h
index 95ca7c1..cde077d 100644
--- a/webrtc/voice_engine/level_indicator.h
+++ b/webrtc/voice_engine/level_indicator.h
@@ -13,7 +13,6 @@
#include "webrtc/base/criticalsection.h"
#include "webrtc/typedefs.h"
-#include "webrtc/voice_engine/voice_engine_defines.h"
namespace webrtc {
diff --git a/webrtc/voice_engine/voice_engine.gyp b/webrtc/voice_engine/voice_engine.gyp
index 17a64b5..912b522 100644
--- a/webrtc/voice_engine/voice_engine.gyp
+++ b/webrtc/voice_engine/voice_engine.gyp
@@ -29,6 +29,7 @@
'<(webrtc_root)/modules/modules.gyp:webrtc_utility',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
'<(webrtc_root)/webrtc.gyp:rtc_event_log',
+ 'level_indicator',
],
'export_dependent_settings': [
'<(webrtc_root)/modules/modules.gyp:audio_coding_module',
@@ -52,8 +53,6 @@
'channel_manager.h',
'channel_proxy.cc',
'channel_proxy.h',
- 'level_indicator.cc',
- 'level_indicator.h',
'monitor_module.cc',
'monitor_module.h',
'network_predictor.cc',
@@ -95,6 +94,19 @@
'voice_engine_impl.h',
],
},
+ {
+ 'target_name': 'level_indicator',
+ 'type': 'static_library',
+ 'dependencies': [
+ '<(webrtc_root)/base/base.gyp:rtc_base_approved',
+ '<(webrtc_root)/common.gyp:webrtc_common',
+ '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
+ ],
+ 'sources': [
+ 'level_indicator.cc',
+ 'level_indicator.h',
+ ]
+ }
],
'conditions': [
['OS=="win"', {