blob: 91564b989041707a8567f0b51ea905bd3b7b5ad8 [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")
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000010import("../build/webrtc.gni")
11
12source_set("tools") {
13 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
26source_set("command_line_parser") {
27 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
Henrik Kjellander67bcb602015-10-07 08:42:52 +020038source_set("video_quality_analysis") {
39 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
55executable("frame_analyzer") {
56 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
71executable("psnr_ssim_analyzer") {
72 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
87executable("rgba_to_i420_converter") {
88 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
kjellanderbac04122016-06-02 02:18:48 -0700105source_set("frame_editing_lib") {
106 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.
120 configs -= [ "//build/config/clang:find_bad_constructs" ]
121 }
kjellander@webrtc.org3037bc32014-09-30 19:07:58 +0000122
kjellanderbac04122016-06-02 02:18:48 -0700123 deps = [
124 "../common_video",
125 ]
126}
127
128executable("frame_editor") {
129 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
144executable("force_mic_volume_max") {
145 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.
155 configs -= [ "//build/config/clang:find_bad_constructs" ]
156 }
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
166source_set("agc_test_utils") {
167 testonly = true
168 sources = [
169 "agc/test_utils.cc",
170 "agc/test_utils.h",
171 ]
172
173 configs += [ "..:common_config" ]
174 public_configs = [ "..:common_inherited_config" ]
175}
176
skvlad185ba292016-08-23 13:01:27 -0700177if (rtc_enable_protobuf) {
178 source_set("event_log_visualizer_utils") {
179 sources = [
180 "event_log_visualizer/analyzer.cc",
181 "event_log_visualizer/analyzer.h",
182 "event_log_visualizer/plot_base.cc",
183 "event_log_visualizer/plot_base.h",
184 "event_log_visualizer/plot_python.cc",
185 "event_log_visualizer/plot_python.h",
186 ]
187 configs += [ "..:common_config" ]
188 public_configs = [ "..:common_inherited_config" ]
189 if (is_clang && !is_nacl) {
190 # Suppress warnings from the Chromium Clang plugin.
191 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
192 configs -= [ "//build/config/clang:find_bad_constructs" ]
193 }
194 defines = [ "ENABLE_RTC_EVENT_LOG" ]
195 deps = [
196 "../:rtc_event_log",
197 "../:rtc_event_log_parser",
198 "../modules/congestion_controller:congestion_controller",
199 "../modules/rtp_rtcp:rtp_rtcp",
200 "../system_wrappers:system_wrappers_default",
201 "//build/config/sanitizers:deps",
202 ]
203 public_deps = [
204 "../:rtc_event_log_parser",
205 ]
206 }
207}
208
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200209# Exclude tools depending on gflags since that's not available in Chromium.
kjellander@webrtc.orgaff499c2016-06-06 23:04:31 +0200210if (rtc_include_tests) {
terelius54ce6802016-07-13 06:44:41 -0700211 if (rtc_enable_protobuf) {
212 executable("event_log_visualizer") {
Stefan Holmer13181032016-07-29 14:48:54 +0200213 testonly = true
terelius54ce6802016-07-13 06:44:41 -0700214 sources = [
tereliusd49a37b2016-08-10 07:12:38 -0700215 "event_log_visualizer/main.cc",
terelius54ce6802016-07-13 06:44:41 -0700216 ]
217
218 configs += [ "..:common_config" ]
219 public_configs = [ "..:common_inherited_config" ]
220
221 if (is_clang && !is_nacl) {
222 # Suppress warnings from the Chromium Clang plugin.
223 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
224 configs -= [ "//build/config/clang:find_bad_constructs" ]
225 }
226
227 defines = [ "ENABLE_RTC_EVENT_LOG" ]
228 deps = [
skvlad185ba292016-08-23 13:01:27 -0700229 ":event_log_visualizer_utils",
ehmaldonadobcba64a2016-08-19 02:11:07 -0700230 "//build/config/sanitizers:deps",
terelius54ce6802016-07-13 06:44:41 -0700231 "//third_party/gflags",
232 ]
233 }
234 }
235
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200236 executable("agc_harness") {
237 testonly = true
238 sources = [
239 "agc/agc_harness.cc",
240 ]
kjellanderbac04122016-06-02 02:18:48 -0700241
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200242 configs += [ "..:common_config" ]
243 public_configs = [ "..:common_inherited_config" ]
kjellanderbac04122016-06-02 02:18:48 -0700244
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200245 if (is_clang) {
246 # Suppress warnings from the Chromium Clang plugin.
247 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
248 configs -= [ "//build/config/clang:find_bad_constructs" ]
249 }
250
251 deps = [
252 "../system_wrappers:system_wrappers_default",
253 "../test:channel_transport",
254 "../test:test_support",
255 "../voice_engine",
256 "//build/win:default_exe_manifest",
257 "//testing/gtest",
258 "//third_party/gflags",
259 ]
kjellanderbac04122016-06-02 02:18:48 -0700260 }
261
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200262 executable("activity_metric") {
263 testonly = true
264 sources = [
265 "agc/activity_metric.cc",
266 ]
kjellanderbac04122016-06-02 02:18:48 -0700267
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200268 configs += [ "..:common_config" ]
269 public_configs = [ "..:common_inherited_config" ]
kjellanderbac04122016-06-02 02:18:48 -0700270
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200271 if (is_clang) {
272 # Suppress warnings from the Chromium Clang plugin.
273 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
274 configs -= [ "//build/config/clang:find_bad_constructs" ]
275 }
kjellanderbac04122016-06-02 02:18:48 -0700276
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200277 deps = [
278 "../modules/audio_processing",
279 "../system_wrappers:metrics_default",
280 "//build/win:default_exe_manifest",
281 "//testing/gtest",
282 "//third_party/gflags",
283 ]
kjellanderbac04122016-06-02 02:18:48 -0700284 }
285
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200286 executable("audio_e2e_harness") {
287 testonly = true
288 sources = [
289 "e2e_quality/audio/audio_e2e_harness.cc",
290 ]
kjellanderbac04122016-06-02 02:18:48 -0700291
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200292 configs += [ "..:common_config" ]
293 public_configs = [ "..:common_inherited_config" ]
kjellanderbac04122016-06-02 02:18:48 -0700294
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200295 if (is_clang) {
296 # Suppress warnings from the Chromium Clang plugin.
297 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
298 configs -= [ "//build/config/clang:find_bad_constructs" ]
299 }
kjellanderbac04122016-06-02 02:18:48 -0700300
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200301 deps = [
302 "../system_wrappers:system_wrappers_default",
303 "../test:channel_transport",
304 "../voice_engine",
305 "//build/win:default_exe_manifest",
306 "//testing/gtest",
307 "//third_party/gflags",
308 ]
kjellanderbac04122016-06-02 02:18:48 -0700309 }
310
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200311 test("tools_unittests") {
312 testonly = true
kjellanderbac04122016-06-02 02:18:48 -0700313
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200314 sources = [
315 "frame_analyzer/video_quality_analysis_unittest.cc",
316 "frame_editing/frame_editing_unittest.cc",
317 "simple_command_line_parser_unittest.cc",
318 ]
kjellanderbac04122016-06-02 02:18:48 -0700319
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200320 configs += [ "..:common_config" ]
321 public_configs = [ "..:common_inherited_config" ]
kjellanderbac04122016-06-02 02:18:48 -0700322
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200323 # TODO(jschuh): Bug 1348: fix this warning.
324 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellanderbac04122016-06-02 02:18:48 -0700325
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200326 if (is_clang) {
327 # Suppress warnings from the Chromium Clang plugin.
328 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
329 configs -= [ "//build/config/clang:find_bad_constructs" ]
330 }
kjellanderbac04122016-06-02 02:18:48 -0700331
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200332 deps = [
333 ":command_line_parser",
334 ":frame_editing_lib",
335 ":video_quality_analysis",
336 "../test:test_support_main",
337 "//testing/gtest",
338 ]
kjellanderbac04122016-06-02 02:18:48 -0700339
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200340 if (is_android) {
341 deps += [ "//testing/android/native_test:native_test_support" ]
ehmaldonado4556b452016-08-10 07:47:14 -0700342
343 data = [
344 "//resources/foreman_cif.yuv",
345 ]
sakal714dd4e2016-08-15 02:29:11 -0700346
347 shard_timeout = 900
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200348 }
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000349 }
aleloi7ebbf902016-06-20 07:39:15 -0700350
351 if (rtc_enable_protobuf) {
352 copy("rtp_analyzer") {
353 sources = [
354 "py_event_log_analyzer/misc.py",
355 "py_event_log_analyzer/pb_parse.py",
356 "py_event_log_analyzer/rtp_analyzer.py",
357 "py_event_log_analyzer/rtp_analyzer.sh",
358 ]
359 outputs = [
360 "$root_build_dir/{{source_file_part}}",
361 ]
362 deps = [
363 "..:rtc_event_log_proto",
364 ]
365 }
366 }
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000367}