blob: 2e5df7559f099d2c959d0d9255760787b8fd2ca1 [file] [log] [blame]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +00001# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
2#
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
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
tereliusb246a292016-08-23 18:15:25 -07009import("//third_party/protobuf/proto_library.gni")
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000010import("../build/webrtc.gni")
11
ehmaldonado38a21322016-09-02 04:10:34 -070012rtc_source_set("tools") {
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000013 deps = [
14 ":command_line_parser",
15 ]
kjellandera8119682016-06-06 02:00:18 -070016
17 if (!build_with_chromium) {
18 # TODO(kjellander): Enable these when webrtc:5970 is fixed.
19 deps += [
20 ":frame_analyzer",
21 ":rgba_to_i420_converter",
22 ]
23 }
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000024}
25
ehmaldonado38a21322016-09-02 04:10:34 -070026rtc_source_set("command_line_parser") {
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000027 sources = [
Henrik Kjellanderfa16dda2015-04-01 22:53:56 +020028 "simple_command_line_parser.cc",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020029 "simple_command_line_parser.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000030 ]
Henrik Kjellander67bcb602015-10-07 08:42:52 +020031 deps = [
kjellander988d31e2016-02-05 00:23:50 -080032 "../base:gtest_prod",
Henrik Kjellander67bcb602015-10-07 08:42:52 +020033 ]
kjellander@webrtc.org3037bc32014-09-30 19:07:58 +000034 configs += [ "..:common_config" ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020035 public_configs = [ "..:common_inherited_config" ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000036}
37
ehmaldonado38a21322016-09-02 04:10:34 -070038rtc_source_set("video_quality_analysis") {
Henrik Kjellander67bcb602015-10-07 08:42:52 +020039 sources = [
40 "frame_analyzer/video_quality_analysis.cc",
41 "frame_analyzer/video_quality_analysis.h",
42 ]
kjellanderbac04122016-06-02 02:18:48 -070043
44 configs += [ "..:common_config" ]
45 public_configs = [ "..:common_inherited_config" ]
46
Henrik Kjellander67bcb602015-10-07 08:42:52 +020047 deps = [
48 "../common_video",
49 ]
50 public_deps = [
51 "../common_video",
52 ]
53}
54
ehmaldonado38a21322016-09-02 04:10:34 -070055rtc_executable("frame_analyzer") {
Henrik Kjellander67bcb602015-10-07 08:42:52 +020056 sources = [
57 "frame_analyzer/frame_analyzer.cc",
58 ]
kjellanderbac04122016-06-02 02:18:48 -070059
60 configs += [ "..:common_config" ]
61 public_configs = [ "..:common_inherited_config" ]
62
63 deps = [
64 ":command_line_parser",
65 ":video_quality_analysis",
ehmaldonadobcba64a2016-08-19 02:11:07 -070066 "//build/config/sanitizers:deps",
kjellanderbac04122016-06-02 02:18:48 -070067 "//build/win:default_exe_manifest",
68 ]
69}
70
ehmaldonado38a21322016-09-02 04:10:34 -070071rtc_executable("psnr_ssim_analyzer") {
kjellanderbac04122016-06-02 02:18:48 -070072 sources = [
73 "psnr_ssim_analyzer/psnr_ssim_analyzer.cc",
74 ]
75
76 configs += [ "..:common_config" ]
77 public_configs = [ "..:common_inherited_config" ]
78
Henrik Kjellander67bcb602015-10-07 08:42:52 +020079 deps = [
80 ":command_line_parser",
81 ":video_quality_analysis",
ehmaldonadobcba64a2016-08-19 02:11:07 -070082 "//build/config/sanitizers:deps",
brucedawson84583e02016-04-28 00:21:08 -070083 "//build/win:default_exe_manifest",
Henrik Kjellander67bcb602015-10-07 08:42:52 +020084 ]
85}
86
ehmaldonado38a21322016-09-02 04:10:34 -070087rtc_executable("rgba_to_i420_converter") {
Henrik Kjellander67bcb602015-10-07 08:42:52 +020088 sources = [
89 "converter/converter.cc",
90 "converter/converter.h",
91 "converter/rgba_to_i420_converter.cc",
92 ]
kjellanderbac04122016-06-02 02:18:48 -070093
94 configs += [ "..:common_config" ]
95 public_configs = [ "..:common_inherited_config" ]
96
Henrik Kjellander67bcb602015-10-07 08:42:52 +020097 deps = [
98 ":command_line_parser",
99 "../common_video",
ehmaldonadobcba64a2016-08-19 02:11:07 -0700100 "//build/config/sanitizers:deps",
brucedawson84583e02016-04-28 00:21:08 -0700101 "//build/win:default_exe_manifest",
Henrik Kjellander67bcb602015-10-07 08:42:52 +0200102 ]
103}
104
ehmaldonado38a21322016-09-02 04:10:34 -0700105rtc_source_set("frame_editing_lib") {
kjellanderbac04122016-06-02 02:18:48 -0700106 sources = [
107 "frame_editing/frame_editing_lib.cc",
108 "frame_editing/frame_editing_lib.h",
109 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000110
kjellanderbac04122016-06-02 02:18:48 -0700111 configs += [ "..:common_config" ]
112 public_configs = [ "..:common_inherited_config" ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000113
kjellanderbac04122016-06-02 02:18:48 -0700114 # TODO(jschuh): Bug 1348: fix this warning.
115 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000116
kjellanderbac04122016-06-02 02:18:48 -0700117 if (is_clang) {
118 # Suppress warnings from the Chromium Clang plugin.
119 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700120 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderbac04122016-06-02 02:18:48 -0700121 }
kjellander@webrtc.org3037bc32014-09-30 19:07:58 +0000122
kjellanderbac04122016-06-02 02:18:48 -0700123 deps = [
124 "../common_video",
125 ]
126}
127
ehmaldonado38a21322016-09-02 04:10:34 -0700128rtc_executable("frame_editor") {
kjellanderbac04122016-06-02 02:18:48 -0700129 sources = [
130 "frame_editing/frame_editing.cc",
131 ]
132
133 configs += [ "..:common_config" ]
134 public_configs = [ "..:common_inherited_config" ]
135
136 deps = [
137 ":command_line_parser",
138 ":frame_editing_lib",
ehmaldonadobcba64a2016-08-19 02:11:07 -0700139 "//build/config/sanitizers:deps",
kjellanderbac04122016-06-02 02:18:48 -0700140 "//build/win:default_exe_manifest",
141 ]
142}
143
ehmaldonado38a21322016-09-02 04:10:34 -0700144rtc_executable("force_mic_volume_max") {
kjellanderbac04122016-06-02 02:18:48 -0700145 sources = [
146 "force_mic_volume_max/force_mic_volume_max.cc",
147 ]
148
149 configs += [ "..:common_config" ]
150 public_configs = [ "..:common_inherited_config" ]
151
152 if (is_clang) {
153 # Suppress warnings from the Chromium Clang plugin.
154 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700155 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderbac04122016-06-02 02:18:48 -0700156 }
157
158 deps = [
159 "../system_wrappers:system_wrappers_default",
160 "../voice_engine",
ehmaldonadobcba64a2016-08-19 02:11:07 -0700161 "//build/config/sanitizers:deps",
kjellanderbac04122016-06-02 02:18:48 -0700162 "//build/win:default_exe_manifest",
163 ]
164}
165
skvlad185ba292016-08-23 13:01:27 -0700166if (rtc_enable_protobuf) {
tereliusb246a292016-08-23 18:15:25 -0700167 proto_library("graph_proto") {
168 sources = [
169 "event_log_visualizer/graph.proto",
170 ]
171 proto_out_dir = "webrtc/tools/event_log_visualizer"
172 }
173
ehmaldonado38a21322016-09-02 04:10:34 -0700174 rtc_source_set("event_log_visualizer_utils") {
skvlad185ba292016-08-23 13:01:27 -0700175 sources = [
176 "event_log_visualizer/analyzer.cc",
177 "event_log_visualizer/analyzer.h",
178 "event_log_visualizer/plot_base.cc",
179 "event_log_visualizer/plot_base.h",
tereliusb246a292016-08-23 18:15:25 -0700180 "event_log_visualizer/plot_protobuf.cc",
181 "event_log_visualizer/plot_protobuf.h",
skvlad185ba292016-08-23 13:01:27 -0700182 "event_log_visualizer/plot_python.cc",
183 "event_log_visualizer/plot_python.h",
184 ]
185 configs += [ "..:common_config" ]
186 public_configs = [ "..:common_inherited_config" ]
187 if (is_clang && !is_nacl) {
188 # Suppress warnings from the Chromium Clang plugin.
189 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700190 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
skvlad185ba292016-08-23 13:01:27 -0700191 }
192 defines = [ "ENABLE_RTC_EVENT_LOG" ]
193 deps = [
194 "../:rtc_event_log",
195 "../:rtc_event_log_parser",
196 "../modules/congestion_controller:congestion_controller",
197 "../modules/rtp_rtcp:rtp_rtcp",
198 "../system_wrappers:system_wrappers_default",
199 "//build/config/sanitizers:deps",
200 ]
201 public_deps = [
tereliusb246a292016-08-23 18:15:25 -0700202 ":graph_proto",
skvlad185ba292016-08-23 13:01:27 -0700203 "../:rtc_event_log_parser",
204 ]
205 }
206}
207
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200208# Exclude tools depending on gflags since that's not available in Chromium.
kjellander@webrtc.orgaff499c2016-06-06 23:04:31 +0200209if (rtc_include_tests) {
terelius54ce6802016-07-13 06:44:41 -0700210 if (rtc_enable_protobuf) {
ehmaldonado38a21322016-09-02 04:10:34 -0700211 rtc_executable("event_log_visualizer") {
Stefan Holmer13181032016-07-29 14:48:54 +0200212 testonly = true
terelius54ce6802016-07-13 06:44:41 -0700213 sources = [
tereliusd49a37b2016-08-10 07:12:38 -0700214 "event_log_visualizer/main.cc",
terelius54ce6802016-07-13 06:44:41 -0700215 ]
216
217 configs += [ "..:common_config" ]
218 public_configs = [ "..:common_inherited_config" ]
219
220 if (is_clang && !is_nacl) {
221 # Suppress warnings from the Chromium Clang plugin.
222 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700223 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
terelius54ce6802016-07-13 06:44:41 -0700224 }
225
226 defines = [ "ENABLE_RTC_EVENT_LOG" ]
227 deps = [
skvlad185ba292016-08-23 13:01:27 -0700228 ":event_log_visualizer_utils",
ehmaldonadobcba64a2016-08-19 02:11:07 -0700229 "//build/config/sanitizers:deps",
terelius54ce6802016-07-13 06:44:41 -0700230 "//third_party/gflags",
231 ]
232 }
233 }
234
ehmaldonado38a21322016-09-02 04:10:34 -0700235 rtc_executable("activity_metric") {
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200236 testonly = true
237 sources = [
238 "agc/activity_metric.cc",
239 ]
kjellanderbac04122016-06-02 02:18:48 -0700240
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200241 configs += [ "..:common_config" ]
242 public_configs = [ "..:common_inherited_config" ]
kjellanderbac04122016-06-02 02:18:48 -0700243
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200244 if (is_clang) {
245 # Suppress warnings from the Chromium Clang plugin.
246 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700247 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200248 }
kjellanderbac04122016-06-02 02:18:48 -0700249
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200250 deps = [
251 "../modules/audio_processing",
252 "../system_wrappers:metrics_default",
ehmaldonado19319a32016-08-25 02:44:01 -0700253 "//build/config/sanitizers:deps",
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200254 "//build/win:default_exe_manifest",
255 "//testing/gtest",
256 "//third_party/gflags",
257 ]
kjellanderbac04122016-06-02 02:18:48 -0700258 }
259
ehmaldonado38a21322016-09-02 04:10:34 -0700260 rtc_executable("audio_e2e_harness") {
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200261 testonly = true
262 sources = [
263 "e2e_quality/audio/audio_e2e_harness.cc",
264 ]
kjellanderbac04122016-06-02 02:18:48 -0700265
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200266 configs += [ "..:common_config" ]
267 public_configs = [ "..:common_inherited_config" ]
kjellanderbac04122016-06-02 02:18:48 -0700268
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200269 if (is_clang) {
270 # Suppress warnings from the Chromium Clang plugin.
271 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700272 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200273 }
kjellanderbac04122016-06-02 02:18:48 -0700274
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200275 deps = [
276 "../system_wrappers:system_wrappers_default",
277 "../test:channel_transport",
278 "../voice_engine",
ehmaldonado19319a32016-08-25 02:44:01 -0700279 "//build/config/sanitizers:deps",
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200280 "//build/win:default_exe_manifest",
281 "//testing/gtest",
282 "//third_party/gflags",
283 ]
kjellanderbac04122016-06-02 02:18:48 -0700284 }
285
kjellander32c4a202016-08-30 02:53:49 -0700286 if (is_android || is_ios) {
Henrik Kjellander7a122d62016-08-30 13:10:23 +0200287 tools_unittests_resources = [ "//resources/foreman_cif.yuv" ]
kjellander32c4a202016-08-30 02:53:49 -0700288 }
289
290 if (is_ios) {
291 bundle_data("tools_unittests_bundle_data") {
292 testonly = true
293 sources = tools_unittests_resources
294 outputs = [
295 "{{bundle_resources_dir}}/{{source_file_part}}",
296 ]
297 }
298 }
299
ehmaldonado38a21322016-09-02 04:10:34 -0700300 rtc_test("tools_unittests") {
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200301 testonly = true
kjellanderbac04122016-06-02 02:18:48 -0700302
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200303 sources = [
304 "frame_analyzer/video_quality_analysis_unittest.cc",
305 "frame_editing/frame_editing_unittest.cc",
306 "simple_command_line_parser_unittest.cc",
307 ]
kjellanderbac04122016-06-02 02:18:48 -0700308
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200309 configs += [ "..:common_config" ]
310 public_configs = [ "..:common_inherited_config" ]
kjellanderbac04122016-06-02 02:18:48 -0700311
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200312 # TODO(jschuh): Bug 1348: fix this warning.
313 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellanderbac04122016-06-02 02:18:48 -0700314
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200315 if (is_clang) {
316 # Suppress warnings from the Chromium Clang plugin.
317 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700318 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200319 }
kjellanderbac04122016-06-02 02:18:48 -0700320
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200321 deps = [
322 ":command_line_parser",
323 ":frame_editing_lib",
324 ":video_quality_analysis",
325 "../test:test_support_main",
326 "//testing/gtest",
327 ]
kjellanderbac04122016-06-02 02:18:48 -0700328
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200329 if (is_android) {
330 deps += [ "//testing/android/native_test:native_test_support" ]
kjellander32c4a202016-08-30 02:53:49 -0700331 data = tools_unittests_resources
kjellander28a0ffd2016-08-24 07:48:42 -0700332 shard_timeout = 900
333 }
kjellander32c4a202016-08-30 02:53:49 -0700334 if (is_ios) {
335 deps += [ ":tools_unittests_bundle_data" ]
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200336 }
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000337 }
aleloi7ebbf902016-06-20 07:39:15 -0700338
339 if (rtc_enable_protobuf) {
340 copy("rtp_analyzer") {
341 sources = [
342 "py_event_log_analyzer/misc.py",
343 "py_event_log_analyzer/pb_parse.py",
344 "py_event_log_analyzer/rtp_analyzer.py",
345 "py_event_log_analyzer/rtp_analyzer.sh",
346 ]
347 outputs = [
348 "$root_build_dir/{{source_file_part}}",
349 ]
350 deps = [
351 "..:rtc_event_log_proto",
352 ]
353 }
354 }
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000355}