blob: c06a4b313605250486dd141a3d3c9e3050bb22da [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
skvlad185ba292016-08-23 13:01:27 -0700167if (rtc_enable_protobuf) {
tereliusb246a292016-08-23 18:15:25 -0700168 proto_library("graph_proto") {
169 sources = [
170 "event_log_visualizer/graph.proto",
171 ]
172 proto_out_dir = "webrtc/tools/event_log_visualizer"
173 }
174
skvlad185ba292016-08-23 13:01:27 -0700175 source_set("event_log_visualizer_utils") {
176 sources = [
177 "event_log_visualizer/analyzer.cc",
178 "event_log_visualizer/analyzer.h",
179 "event_log_visualizer/plot_base.cc",
180 "event_log_visualizer/plot_base.h",
tereliusb246a292016-08-23 18:15:25 -0700181 "event_log_visualizer/plot_protobuf.cc",
182 "event_log_visualizer/plot_protobuf.h",
skvlad185ba292016-08-23 13:01:27 -0700183 "event_log_visualizer/plot_python.cc",
184 "event_log_visualizer/plot_python.h",
185 ]
186 configs += [ "..:common_config" ]
187 public_configs = [ "..:common_inherited_config" ]
188 if (is_clang && !is_nacl) {
189 # Suppress warnings from the Chromium Clang plugin.
190 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
191 configs -= [ "//build/config/clang:find_bad_constructs" ]
192 }
193 defines = [ "ENABLE_RTC_EVENT_LOG" ]
194 deps = [
195 "../:rtc_event_log",
196 "../:rtc_event_log_parser",
197 "../modules/congestion_controller:congestion_controller",
198 "../modules/rtp_rtcp:rtp_rtcp",
199 "../system_wrappers:system_wrappers_default",
200 "//build/config/sanitizers:deps",
201 ]
202 public_deps = [
tereliusb246a292016-08-23 18:15:25 -0700203 ":graph_proto",
skvlad185ba292016-08-23 13:01:27 -0700204 "../: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("activity_metric") {
237 testonly = true
238 sources = [
239 "agc/activity_metric.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 }
kjellanderbac04122016-06-02 02:18:48 -0700250
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200251 deps = [
252 "../modules/audio_processing",
253 "../system_wrappers:metrics_default",
ehmaldonado19319a32016-08-25 02:44:01 -0700254 "//build/config/sanitizers:deps",
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200255 "//build/win:default_exe_manifest",
256 "//testing/gtest",
257 "//third_party/gflags",
258 ]
kjellanderbac04122016-06-02 02:18:48 -0700259 }
260
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200261 executable("audio_e2e_harness") {
262 testonly = true
263 sources = [
264 "e2e_quality/audio/audio_e2e_harness.cc",
265 ]
kjellanderbac04122016-06-02 02:18:48 -0700266
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200267 configs += [ "..:common_config" ]
268 public_configs = [ "..:common_inherited_config" ]
kjellanderbac04122016-06-02 02:18:48 -0700269
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200270 if (is_clang) {
271 # Suppress warnings from the Chromium Clang plugin.
272 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
273 configs -= [ "//build/config/clang:find_bad_constructs" ]
274 }
kjellanderbac04122016-06-02 02:18:48 -0700275
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200276 deps = [
277 "../system_wrappers:system_wrappers_default",
278 "../test:channel_transport",
279 "../voice_engine",
ehmaldonado19319a32016-08-25 02:44:01 -0700280 "//build/config/sanitizers:deps",
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200281 "//build/win:default_exe_manifest",
282 "//testing/gtest",
283 "//third_party/gflags",
284 ]
kjellanderbac04122016-06-02 02:18:48 -0700285 }
286
kjellander32c4a202016-08-30 02:53:49 -0700287 if (is_android || is_ios) {
Henrik Kjellander7a122d62016-08-30 13:10:23 +0200288 tools_unittests_resources = [ "//resources/foreman_cif.yuv" ]
kjellander32c4a202016-08-30 02:53:49 -0700289 }
290
291 if (is_ios) {
292 bundle_data("tools_unittests_bundle_data") {
293 testonly = true
294 sources = tools_unittests_resources
295 outputs = [
296 "{{bundle_resources_dir}}/{{source_file_part}}",
297 ]
298 }
299 }
300
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200301 test("tools_unittests") {
302 testonly = true
kjellanderbac04122016-06-02 02:18:48 -0700303
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200304 sources = [
305 "frame_analyzer/video_quality_analysis_unittest.cc",
306 "frame_editing/frame_editing_unittest.cc",
307 "simple_command_line_parser_unittest.cc",
308 ]
kjellanderbac04122016-06-02 02:18:48 -0700309
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200310 configs += [ "..:common_config" ]
311 public_configs = [ "..:common_inherited_config" ]
kjellanderbac04122016-06-02 02:18:48 -0700312
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200313 # TODO(jschuh): Bug 1348: fix this warning.
314 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellanderbac04122016-06-02 02:18:48 -0700315
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200316 if (is_clang) {
317 # Suppress warnings from the Chromium Clang plugin.
318 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
319 configs -= [ "//build/config/clang:find_bad_constructs" ]
320 }
kjellanderbac04122016-06-02 02:18:48 -0700321
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200322 deps = [
323 ":command_line_parser",
324 ":frame_editing_lib",
325 ":video_quality_analysis",
326 "../test:test_support_main",
327 "//testing/gtest",
328 ]
kjellanderbac04122016-06-02 02:18:48 -0700329
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200330 if (is_android) {
331 deps += [ "//testing/android/native_test:native_test_support" ]
kjellander32c4a202016-08-30 02:53:49 -0700332 data = tools_unittests_resources
kjellander28a0ffd2016-08-24 07:48:42 -0700333 shard_timeout = 900
334 }
kjellander32c4a202016-08-30 02:53:49 -0700335 if (is_ios) {
336 deps += [ ":tools_unittests_bundle_data" ]
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200337 }
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000338 }
aleloi7ebbf902016-06-20 07:39:15 -0700339
340 if (rtc_enable_protobuf) {
341 copy("rtp_analyzer") {
342 sources = [
343 "py_event_log_analyzer/misc.py",
344 "py_event_log_analyzer/pb_parse.py",
345 "py_event_log_analyzer/rtp_analyzer.py",
346 "py_event_log_analyzer/rtp_analyzer.sh",
347 ]
348 outputs = [
349 "$root_build_dir/{{source_file_part}}",
350 ]
351 deps = [
352 "..:rtc_event_log_proto",
353 ]
354 }
355 }
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000356}