blob: d5514830085bc40bfae570a3ff5f20508194b8f3 [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
kjellanderbac04122016-06-02 02:18:48 -07009import("//testing/test.gni")
tereliusb246a292016-08-23 18:15:25 -070010import("//third_party/protobuf/proto_library.gni")
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000011import("../build/webrtc.gni")
12
13source_set("tools") {
14 deps = [
15 ":command_line_parser",
16 ]
kjellandera8119682016-06-06 02:00:18 -070017
18 if (!build_with_chromium) {
19 # TODO(kjellander): Enable these when webrtc:5970 is fixed.
20 deps += [
21 ":frame_analyzer",
22 ":rgba_to_i420_converter",
23 ]
24 }
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000025}
26
27source_set("command_line_parser") {
28 sources = [
Henrik Kjellanderfa16dda2015-04-01 22:53:56 +020029 "simple_command_line_parser.cc",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020030 "simple_command_line_parser.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000031 ]
Henrik Kjellander67bcb602015-10-07 08:42:52 +020032 deps = [
kjellander988d31e2016-02-05 00:23:50 -080033 "../base:gtest_prod",
Henrik Kjellander67bcb602015-10-07 08:42:52 +020034 ]
kjellander@webrtc.org3037bc32014-09-30 19:07:58 +000035 configs += [ "..:common_config" ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020036 public_configs = [ "..:common_inherited_config" ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000037}
38
Henrik Kjellander67bcb602015-10-07 08:42:52 +020039source_set("video_quality_analysis") {
40 sources = [
41 "frame_analyzer/video_quality_analysis.cc",
42 "frame_analyzer/video_quality_analysis.h",
43 ]
kjellanderbac04122016-06-02 02:18:48 -070044
45 configs += [ "..:common_config" ]
46 public_configs = [ "..:common_inherited_config" ]
47
Henrik Kjellander67bcb602015-10-07 08:42:52 +020048 deps = [
49 "../common_video",
50 ]
51 public_deps = [
52 "../common_video",
53 ]
54}
55
56executable("frame_analyzer") {
57 sources = [
58 "frame_analyzer/frame_analyzer.cc",
59 ]
kjellanderbac04122016-06-02 02:18:48 -070060
61 configs += [ "..:common_config" ]
62 public_configs = [ "..:common_inherited_config" ]
63
64 deps = [
65 ":command_line_parser",
66 ":video_quality_analysis",
ehmaldonadobcba64a2016-08-19 02:11:07 -070067 "//build/config/sanitizers:deps",
kjellanderbac04122016-06-02 02:18:48 -070068 "//build/win:default_exe_manifest",
69 ]
70}
71
72executable("psnr_ssim_analyzer") {
73 sources = [
74 "psnr_ssim_analyzer/psnr_ssim_analyzer.cc",
75 ]
76
77 configs += [ "..:common_config" ]
78 public_configs = [ "..:common_inherited_config" ]
79
Henrik Kjellander67bcb602015-10-07 08:42:52 +020080 deps = [
81 ":command_line_parser",
82 ":video_quality_analysis",
ehmaldonadobcba64a2016-08-19 02:11:07 -070083 "//build/config/sanitizers:deps",
brucedawson84583e02016-04-28 00:21:08 -070084 "//build/win:default_exe_manifest",
Henrik Kjellander67bcb602015-10-07 08:42:52 +020085 ]
86}
87
88executable("rgba_to_i420_converter") {
89 sources = [
90 "converter/converter.cc",
91 "converter/converter.h",
92 "converter/rgba_to_i420_converter.cc",
93 ]
kjellanderbac04122016-06-02 02:18:48 -070094
95 configs += [ "..:common_config" ]
96 public_configs = [ "..:common_inherited_config" ]
97
Henrik Kjellander67bcb602015-10-07 08:42:52 +020098 deps = [
99 ":command_line_parser",
100 "../common_video",
ehmaldonadobcba64a2016-08-19 02:11:07 -0700101 "//build/config/sanitizers:deps",
brucedawson84583e02016-04-28 00:21:08 -0700102 "//build/win:default_exe_manifest",
Henrik Kjellander67bcb602015-10-07 08:42:52 +0200103 ]
104}
105
kjellanderbac04122016-06-02 02:18:48 -0700106source_set("frame_editing_lib") {
107 sources = [
108 "frame_editing/frame_editing_lib.cc",
109 "frame_editing/frame_editing_lib.h",
110 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000111
kjellanderbac04122016-06-02 02:18:48 -0700112 configs += [ "..:common_config" ]
113 public_configs = [ "..:common_inherited_config" ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000114
kjellanderbac04122016-06-02 02:18:48 -0700115 # TODO(jschuh): Bug 1348: fix this warning.
116 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000117
kjellanderbac04122016-06-02 02:18:48 -0700118 if (is_clang) {
119 # Suppress warnings from the Chromium Clang plugin.
120 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
121 configs -= [ "//build/config/clang:find_bad_constructs" ]
122 }
kjellander@webrtc.org3037bc32014-09-30 19:07:58 +0000123
kjellanderbac04122016-06-02 02:18:48 -0700124 deps = [
125 "../common_video",
126 ]
127}
128
129executable("frame_editor") {
130 sources = [
131 "frame_editing/frame_editing.cc",
132 ]
133
134 configs += [ "..:common_config" ]
135 public_configs = [ "..:common_inherited_config" ]
136
137 deps = [
138 ":command_line_parser",
139 ":frame_editing_lib",
ehmaldonadobcba64a2016-08-19 02:11:07 -0700140 "//build/config/sanitizers:deps",
kjellanderbac04122016-06-02 02:18:48 -0700141 "//build/win:default_exe_manifest",
142 ]
143}
144
145executable("force_mic_volume_max") {
146 sources = [
147 "force_mic_volume_max/force_mic_volume_max.cc",
148 ]
149
150 configs += [ "..:common_config" ]
151 public_configs = [ "..:common_inherited_config" ]
152
153 if (is_clang) {
154 # Suppress warnings from the Chromium Clang plugin.
155 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
156 configs -= [ "//build/config/clang:find_bad_constructs" ]
157 }
158
159 deps = [
160 "../system_wrappers:system_wrappers_default",
161 "../voice_engine",
ehmaldonadobcba64a2016-08-19 02:11:07 -0700162 "//build/config/sanitizers:deps",
kjellanderbac04122016-06-02 02:18:48 -0700163 "//build/win:default_exe_manifest",
164 ]
165}
166
167source_set("agc_test_utils") {
168 testonly = true
169 sources = [
170 "agc/test_utils.cc",
171 "agc/test_utils.h",
172 ]
173
174 configs += [ "..:common_config" ]
175 public_configs = [ "..:common_inherited_config" ]
176}
177
skvlad185ba292016-08-23 13:01:27 -0700178if (rtc_enable_protobuf) {
tereliusb246a292016-08-23 18:15:25 -0700179 proto_library("graph_proto") {
180 sources = [
181 "event_log_visualizer/graph.proto",
182 ]
183 proto_out_dir = "webrtc/tools/event_log_visualizer"
184 }
185
skvlad185ba292016-08-23 13:01:27 -0700186 source_set("event_log_visualizer_utils") {
187 sources = [
188 "event_log_visualizer/analyzer.cc",
189 "event_log_visualizer/analyzer.h",
190 "event_log_visualizer/plot_base.cc",
191 "event_log_visualizer/plot_base.h",
tereliusb246a292016-08-23 18:15:25 -0700192 "event_log_visualizer/plot_protobuf.cc",
193 "event_log_visualizer/plot_protobuf.h",
skvlad185ba292016-08-23 13:01:27 -0700194 "event_log_visualizer/plot_python.cc",
195 "event_log_visualizer/plot_python.h",
196 ]
197 configs += [ "..:common_config" ]
198 public_configs = [ "..:common_inherited_config" ]
199 if (is_clang && !is_nacl) {
200 # Suppress warnings from the Chromium Clang plugin.
201 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
202 configs -= [ "//build/config/clang:find_bad_constructs" ]
203 }
204 defines = [ "ENABLE_RTC_EVENT_LOG" ]
205 deps = [
206 "../:rtc_event_log",
207 "../:rtc_event_log_parser",
208 "../modules/congestion_controller:congestion_controller",
209 "../modules/rtp_rtcp:rtp_rtcp",
210 "../system_wrappers:system_wrappers_default",
211 "//build/config/sanitizers:deps",
212 ]
213 public_deps = [
tereliusb246a292016-08-23 18:15:25 -0700214 ":graph_proto",
skvlad185ba292016-08-23 13:01:27 -0700215 "../:rtc_event_log_parser",
216 ]
217 }
218}
219
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200220# Exclude tools depending on gflags since that's not available in Chromium.
kjellander@webrtc.orgaff499c2016-06-06 23:04:31 +0200221if (rtc_include_tests) {
terelius54ce6802016-07-13 06:44:41 -0700222 if (rtc_enable_protobuf) {
223 executable("event_log_visualizer") {
Stefan Holmer13181032016-07-29 14:48:54 +0200224 testonly = true
terelius54ce6802016-07-13 06:44:41 -0700225 sources = [
tereliusd49a37b2016-08-10 07:12:38 -0700226 "event_log_visualizer/main.cc",
terelius54ce6802016-07-13 06:44:41 -0700227 ]
228
229 configs += [ "..:common_config" ]
230 public_configs = [ "..:common_inherited_config" ]
231
232 if (is_clang && !is_nacl) {
233 # Suppress warnings from the Chromium Clang plugin.
234 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
235 configs -= [ "//build/config/clang:find_bad_constructs" ]
236 }
237
238 defines = [ "ENABLE_RTC_EVENT_LOG" ]
239 deps = [
skvlad185ba292016-08-23 13:01:27 -0700240 ":event_log_visualizer_utils",
ehmaldonadobcba64a2016-08-19 02:11:07 -0700241 "//build/config/sanitizers:deps",
terelius54ce6802016-07-13 06:44:41 -0700242 "//third_party/gflags",
243 ]
244 }
245 }
246
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200247 executable("agc_harness") {
248 testonly = true
249 sources = [
250 "agc/agc_harness.cc",
251 ]
kjellanderbac04122016-06-02 02:18:48 -0700252
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200253 configs += [ "..:common_config" ]
254 public_configs = [ "..:common_inherited_config" ]
kjellanderbac04122016-06-02 02:18:48 -0700255
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200256 if (is_clang) {
257 # Suppress warnings from the Chromium Clang plugin.
258 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
259 configs -= [ "//build/config/clang:find_bad_constructs" ]
260 }
261
262 deps = [
263 "../system_wrappers:system_wrappers_default",
264 "../test:channel_transport",
265 "../test:test_support",
266 "../voice_engine",
267 "//build/win:default_exe_manifest",
268 "//testing/gtest",
269 "//third_party/gflags",
270 ]
kjellanderbac04122016-06-02 02:18:48 -0700271 }
272
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200273 executable("activity_metric") {
274 testonly = true
275 sources = [
276 "agc/activity_metric.cc",
277 ]
kjellanderbac04122016-06-02 02:18:48 -0700278
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200279 configs += [ "..:common_config" ]
280 public_configs = [ "..:common_inherited_config" ]
kjellanderbac04122016-06-02 02:18:48 -0700281
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200282 if (is_clang) {
283 # Suppress warnings from the Chromium Clang plugin.
284 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
285 configs -= [ "//build/config/clang:find_bad_constructs" ]
286 }
kjellanderbac04122016-06-02 02:18:48 -0700287
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200288 deps = [
289 "../modules/audio_processing",
290 "../system_wrappers:metrics_default",
291 "//build/win:default_exe_manifest",
292 "//testing/gtest",
293 "//third_party/gflags",
294 ]
kjellanderbac04122016-06-02 02:18:48 -0700295 }
296
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200297 executable("audio_e2e_harness") {
298 testonly = true
299 sources = [
300 "e2e_quality/audio/audio_e2e_harness.cc",
301 ]
kjellanderbac04122016-06-02 02:18:48 -0700302
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200303 configs += [ "..:common_config" ]
304 public_configs = [ "..:common_inherited_config" ]
kjellanderbac04122016-06-02 02:18:48 -0700305
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200306 if (is_clang) {
307 # Suppress warnings from the Chromium Clang plugin.
308 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
309 configs -= [ "//build/config/clang:find_bad_constructs" ]
310 }
kjellanderbac04122016-06-02 02:18:48 -0700311
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200312 deps = [
313 "../system_wrappers:system_wrappers_default",
314 "../test:channel_transport",
315 "../voice_engine",
316 "//build/win:default_exe_manifest",
317 "//testing/gtest",
318 "//third_party/gflags",
319 ]
kjellanderbac04122016-06-02 02:18:48 -0700320 }
321
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200322 test("tools_unittests") {
323 testonly = true
kjellanderbac04122016-06-02 02:18:48 -0700324
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200325 sources = [
326 "frame_analyzer/video_quality_analysis_unittest.cc",
327 "frame_editing/frame_editing_unittest.cc",
328 "simple_command_line_parser_unittest.cc",
329 ]
kjellanderbac04122016-06-02 02:18:48 -0700330
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200331 configs += [ "..:common_config" ]
332 public_configs = [ "..:common_inherited_config" ]
kjellanderbac04122016-06-02 02:18:48 -0700333
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200334 # TODO(jschuh): Bug 1348: fix this warning.
335 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellanderbac04122016-06-02 02:18:48 -0700336
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200337 if (is_clang) {
338 # Suppress warnings from the Chromium Clang plugin.
339 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
340 configs -= [ "//build/config/clang:find_bad_constructs" ]
341 }
kjellanderbac04122016-06-02 02:18:48 -0700342
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200343 deps = [
344 ":command_line_parser",
345 ":frame_editing_lib",
346 ":video_quality_analysis",
347 "../test:test_support_main",
348 "//testing/gtest",
349 ]
kjellanderbac04122016-06-02 02:18:48 -0700350
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200351 if (is_android) {
352 deps += [ "//testing/android/native_test:native_test_support" ]
ehmaldonado4556b452016-08-10 07:47:14 -0700353
354 data = [
355 "//resources/foreman_cif.yuv",
356 ]
sakal714dd4e2016-08-15 02:29:11 -0700357
358 shard_timeout = 900
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200359 }
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000360 }
aleloi7ebbf902016-06-20 07:39:15 -0700361
362 if (rtc_enable_protobuf) {
363 copy("rtp_analyzer") {
364 sources = [
365 "py_event_log_analyzer/misc.py",
366 "py_event_log_analyzer/pb_parse.py",
367 "py_event_log_analyzer/rtp_analyzer.py",
368 "py_event_log_analyzer/rtp_analyzer.sh",
369 ]
370 outputs = [
371 "$root_build_dir/{{source_file_part}}",
372 ]
373 deps = [
374 "..:rtc_event_log_proto",
375 ]
376 }
377 }
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000378}