blob: 1bbebb005ea62efd8695f35851062fca1649ff36 [file] [log] [blame]
kjellanderd2b63cf2017-06-30 03:04:59 -07001# 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.
kjellanderd2b63cf2017-06-30 03:04:59 -07008import("../webrtc.gni")
Kimmo Kinnunen08f6a6c2019-02-26 11:46:17 +02009if (rtc_enable_protobuf) {
10 import("//third_party/protobuf/proto_library.gni")
11}
kjellanderd2b63cf2017-06-30 03:04:59 -070012
13group("rtc_tools") {
14 # This target shall build all targets in tools/.
15 testonly = true
16
Mirko Bonadeif5ff67c2017-12-06 16:31:18 +010017 deps = [
kjellanderd2b63cf2017-06-30 03:04:59 -070018 ":frame_analyzer",
Magnus Jedvert10e829a2018-09-05 10:46:18 +020019 ":video_file_reader",
kjellander6af0cbf2017-09-04 23:42:45 -070020 ":video_quality_analysis",
kjellanderd2b63cf2017-06-30 03:04:59 -070021 ]
kjellander6af0cbf2017-09-04 23:42:45 -070022 if (!build_with_chromium) {
Mirko Bonadeif5ff67c2017-12-06 16:31:18 +010023 deps += [
kjellander6af0cbf2017-09-04 23:42:45 -070024 ":psnr_ssim_analyzer",
25 ":rgba_to_i420_converter",
26 ]
kjellander6af0cbf2017-09-04 23:42:45 -070027 if (rtc_enable_protobuf) {
Mirko Bonadeif5ff67c2017-12-06 16:31:18 +010028 deps += [ ":chart_proto" ]
kjellander6af0cbf2017-09-04 23:42:45 -070029 }
kjellanderd2b63cf2017-06-30 03:04:59 -070030 }
31
32 if (rtc_include_tests) {
Artem Titov8041b652020-02-19 15:03:45 +010033 deps += [
34 ":tools_unittests",
35 ":yuv_to_ivf_converter",
36 ]
kjellanderd2b63cf2017-06-30 03:04:59 -070037 if (rtc_enable_protobuf) {
Yves Gerey21cddff2018-10-30 21:12:42 +010038 if (!build_with_chromium) {
39 deps += [ ":event_log_visualizer" ]
40 }
Mirko Bonadeif5ff67c2017-12-06 16:31:18 +010041 deps += [
Daniel Johansson89aaeda2019-12-10 11:00:38 +010042 ":audioproc_f",
kjellanderd2b63cf2017-06-30 03:04:59 -070043 ":rtp_analyzer",
Patrik Höglund844ce8b2017-12-12 15:53:31 +010044 ":unpack_aecdump",
kjellanderd2b63cf2017-06-30 03:04:59 -070045 "network_tester",
46 ]
47 }
48 }
49}
50
Mirko Bonadei86d053c2019-10-17 21:32:04 +020051rtc_library("video_file_reader") {
Magnus Jedvert10e829a2018-09-05 10:46:18 +020052 sources = [
53 "video_file_reader.cc",
54 "video_file_reader.h",
55 ]
56 deps = [
Mirko Bonadeid9708072019-01-25 20:26:48 +010057 "../api:scoped_refptr",
Magnus Jedvert10e829a2018-09-05 10:46:18 +020058 "../api/video:video_frame",
59 "../api/video:video_frame_i420",
Chen Xing5d24b162019-06-10 12:59:38 +020060 "../api/video:video_rtp_headers",
Yves Gerey3e707812018-11-28 16:47:49 +010061 "../rtc_base:checks",
Magnus Jedvert10e829a2018-09-05 10:46:18 +020062 "../rtc_base:rtc_base_approved",
Steve Anton68586e82018-12-13 17:41:25 -080063 "//third_party/abseil-cpp/absl/strings",
Magnus Jedvert10e829a2018-09-05 10:46:18 +020064 "//third_party/abseil-cpp/absl/types:optional",
65 ]
66}
67
Mirko Bonadei86d053c2019-10-17 21:32:04 +020068rtc_library("video_file_writer") {
Paulina Hensmanb671d462018-09-14 11:32:00 +020069 sources = [
70 "video_file_writer.cc",
71 "video_file_writer.h",
72 ]
73 deps = [
74 ":video_file_reader",
Mirko Bonadeid9708072019-01-25 20:26:48 +010075 "../api:scoped_refptr",
Paulina Hensmanb671d462018-09-14 11:32:00 +020076 "../api/video:video_frame",
77 "../api/video:video_frame_i420",
Chen Xing5d24b162019-06-10 12:59:38 +020078 "../api/video:video_rtp_headers",
Paulina Hensmanb671d462018-09-14 11:32:00 +020079 "../rtc_base:rtc_base_approved",
Steve Anton68586e82018-12-13 17:41:25 -080080 "//third_party/abseil-cpp/absl/strings",
Paulina Hensmanb671d462018-09-14 11:32:00 +020081 "//third_party/abseil-cpp/absl/types:optional",
82 ]
83}
84
Mirko Bonadei86d053c2019-10-17 21:32:04 +020085rtc_library("video_quality_analysis") {
Patrik Höglund2ea27962020-01-13 15:10:40 +010086 testonly = true
kjellanderd2b63cf2017-06-30 03:04:59 -070087 sources = [
Magnus Jedvert1927dfa2018-09-11 12:56:06 +020088 "frame_analyzer/linear_least_squares.cc",
89 "frame_analyzer/linear_least_squares.h",
90 "frame_analyzer/video_color_aligner.cc",
91 "frame_analyzer/video_color_aligner.h",
Magnus Jedvert286df002018-11-22 15:17:30 +010092 "frame_analyzer/video_geometry_aligner.cc",
93 "frame_analyzer/video_geometry_aligner.h",
kjellanderd2b63cf2017-06-30 03:04:59 -070094 "frame_analyzer/video_quality_analysis.cc",
95 "frame_analyzer/video_quality_analysis.h",
Magnus Jedvert62228c42018-09-05 15:04:08 +020096 "frame_analyzer/video_temporal_aligner.cc",
97 "frame_analyzer/video_temporal_aligner.h",
kjellanderd2b63cf2017-06-30 03:04:59 -070098 ]
Mirko Bonadei0250be52017-12-01 13:53:04 +010099 deps = [
Magnus Jedvert10e829a2018-09-05 10:46:18 +0200100 ":video_file_reader",
Magnus Jedvert1927dfa2018-09-11 12:56:06 +0200101 "../api:array_view",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100102 "../api:scoped_refptr",
Magnus Jedvert286df002018-11-22 15:17:30 +0100103 "../api/video:video_frame",
Magnus Jedvert10e829a2018-09-05 10:46:18 +0200104 "../api/video:video_frame_i420",
Chen Xing5d24b162019-06-10 12:59:38 +0200105 "../api/video:video_rtp_headers",
Mirko Bonadeif5ff67c2017-12-06 16:31:18 +0100106 "../common_video",
Magnus Jedvert62228c42018-09-05 15:04:08 +0200107 "../rtc_base:checks",
108 "../rtc_base:rtc_base_approved",
Edward Lemur2e5966b2018-01-30 15:33:02 +0100109 "../test:perf_test",
Magnus Jedvert62228c42018-09-05 15:04:08 +0200110 "//third_party/abseil-cpp/absl/types:optional",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100111 "//third_party/libyuv",
kjellanderd2b63cf2017-06-30 03:04:59 -0700112 ]
113}
114
115rtc_executable("frame_analyzer") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000116 visibility = [ "*" ]
Mirko Bonadei6bafc8b2019-06-18 21:09:24 +0200117 testonly = true
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100118 sources = [ "frame_analyzer/frame_analyzer.cc" ]
kjellanderd2b63cf2017-06-30 03:04:59 -0700119
120 deps = [
Magnus Jedvert10e829a2018-09-05 10:46:18 +0200121 ":video_file_reader",
Paulina Hensmanb671d462018-09-14 11:32:00 +0200122 ":video_file_writer",
kjellanderd2b63cf2017-06-30 03:04:59 -0700123 ":video_quality_analysis",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100124 "../api:scoped_refptr",
Magnus Jedvertb468ace2018-09-05 16:11:48 +0200125 "../rtc_base:stringutils",
Edward Lemur2e5966b2018-01-30 15:33:02 +0100126 "../test:perf_test",
Mirko Bonadei6bafc8b2019-06-18 21:09:24 +0200127 "//third_party/abseil-cpp/absl/flags:flag",
128 "//third_party/abseil-cpp/absl/flags:parse",
Steve Anton68586e82018-12-13 17:41:25 -0800129 "//third_party/abseil-cpp/absl/strings",
kjellanderd2b63cf2017-06-30 03:04:59 -0700130 ]
131}
132
Mirko Bonadei080afed2018-09-18 13:39:37 +0200133if (!build_with_chromium && !build_with_mozilla) {
134 action("frame_analyzer_host") {
135 script = "//tools_webrtc/executable_host_build.py"
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100136 outputs = [ "${root_out_dir}/frame_analyzer_host" ]
Mirko Bonadei080afed2018-09-18 13:39:37 +0200137 args = [
138 "--executable_name",
139 "frame_analyzer",
140 ]
141 }
Mirko Bonadeib56706f2018-09-18 11:03:39 +0200142}
143
Mirko Bonadeia5cec552020-02-06 10:16:20 +0100144if (!is_component_build) {
145 # This target can be built from Chromium but it doesn't support
146 # is_component_build=true because it depends on WebRTC testonly code
147 # which is not part of //third_party/webrtc_overrides:webrtc_component.
Mirko Bonadei8573aae2019-02-04 15:21:46 +0100148 rtc_executable("rtp_generator") {
149 visibility = [ "*" ]
150 testonly = true
151 sources = [
152 "rtp_generator/main.cc",
153 "rtp_generator/rtp_generator.cc",
154 "rtp_generator/rtp_generator.h",
155 ]
156
157 deps = [
Artem Titov33f9d2b2019-12-05 15:59:00 +0100158 "../api:create_frame_generator",
Niels Möller6dcd4dc2019-08-26 10:45:28 +0200159 "../api:rtp_parameters",
Mirko Bonadei8573aae2019-02-04 15:21:46 +0100160 "../api:transport_api",
Danil Chapovalov83bbe912019-08-07 12:24:53 +0200161 "../api/rtc_event_log",
Ilya Nikolaevskiyca160212019-07-10 15:34:45 +0200162 "../api/task_queue:default_task_queue_factory",
163 "../api/task_queue:task_queue",
Mirko Bonadei8573aae2019-02-04 15:21:46 +0100164 "../api/video:builtin_video_bitrate_allocator_factory",
165 "../api/video_codecs:builtin_video_decoder_factory",
166 "../api/video_codecs:builtin_video_encoder_factory",
167 "../api/video_codecs:video_codecs_api",
168 "../call",
169 "../call:call_interfaces",
170 "../call:fake_network",
171 "../call:rtp_interfaces",
172 "../call:rtp_sender",
173 "../call:simulated_network",
174 "../call:simulated_packet_receiver",
175 "../call:video_stream_api",
Mirko Bonadei8573aae2019-02-04 15:21:46 +0100176 "../media:rtc_audio_video",
177 "../media:rtc_media_base",
Artem Titov94b57c02019-03-21 13:35:10 +0100178 "../rtc_base",
Mirko Bonadei8573aae2019-02-04 15:21:46 +0100179 "../rtc_base:rtc_base_approved",
180 "../rtc_base:rtc_json",
181 "../rtc_base/system:file_wrapper",
182 "../test:fileutils",
183 "../test:rtp_test_utils",
184 "../test:video_test_common",
Mirko Bonadeia95949e2019-06-25 08:46:18 +0200185 "//third_party/abseil-cpp/absl/flags:flag",
186 "//third_party/abseil-cpp/absl/flags:parse",
Mirko Bonadei06cdb232019-07-19 10:02:46 +0200187 "//third_party/abseil-cpp/absl/flags:usage",
Mirko Bonadei8573aae2019-02-04 15:21:46 +0100188 "//third_party/abseil-cpp/absl/strings",
189 ]
Mirko Bonadeia5cec552020-02-06 10:16:20 +0100190 if (build_with_chromium) {
191 # When building from Chromium, WebRTC's metrics and field trial
192 # implementations need to be replaced by the Chromium ones.
193 deps += [ "//third_party/webrtc_overrides:webrtc_component" ]
194 }
Mirko Bonadei8573aae2019-02-04 15:21:46 +0100195 }
Mirko Bonadeid4c3c3a2020-02-07 10:02:31 +0100196
197 # This target can be built from Chromium but it doesn't support
198 # is_component_build=true because it depends on WebRTC testonly code
199 # which is not part of //third_party/webrtc_overrides:webrtc_component.
200 rtc_executable("video_replay") {
201 visibility = [ "*" ]
202 testonly = true
203 sources = [ "video_replay.cc" ]
204 deps = [
205 "../api/rtc_event_log",
206 "../api/task_queue:default_task_queue_factory",
207 "../api/test/video:function_video_factory",
208 "../api/transport:field_trial_based_config",
209 "../api/video_codecs:video_codecs_api",
210 "../call",
211 "../call:call_interfaces",
212 "../common_video",
213 "../media:rtc_internal_video_codecs",
214 "../rtc_base:checks",
215 "../rtc_base:rtc_json",
216 "../rtc_base:stringutils",
217 "../rtc_base:timeutils",
218 "../system_wrappers",
219 "../test:call_config_utils",
220 "../test:encoder_settings",
221 "../test:fake_video_codecs",
222 "../test:null_transport",
223 "../test:rtp_test_utils",
224 "../test:run_test",
225 "../test:run_test_interface",
226 "../test:test_common",
227 "../test:test_renderer",
228 "../test:test_support",
229 "../test:video_test_common",
230 "../test:video_test_support",
231 "//third_party/abseil-cpp/absl/flags:flag",
232 "//third_party/abseil-cpp/absl/flags:parse",
233 ]
234 if (build_with_chromium) {
235 # When building from Chromium, WebRTC's metrics and field trial
236 # implementations need to be replaced by the Chromium ones.
237 deps += [ "//third_party/webrtc_overrides:webrtc_component" ]
238 }
239 }
Mirko Bonadeia5cec552020-02-06 10:16:20 +0100240}
Mirko Bonadei8573aae2019-02-04 15:21:46 +0100241
Mirko Bonadeia5cec552020-02-06 10:16:20 +0100242# Only expose the targets needed by Chromium (e.g. frame_analyzer) to avoid
243# building a lot of redundant code as part of Chromium builds.
244if (!build_with_chromium) {
kjellander6af0cbf2017-09-04 23:42:45 -0700245 rtc_executable("psnr_ssim_analyzer") {
Mirko Bonadei8e032c82019-06-25 08:51:01 +0200246 testonly = true
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100247 sources = [ "psnr_ssim_analyzer/psnr_ssim_analyzer.cc" ]
kjellanderd2b63cf2017-06-30 03:04:59 -0700248
kjellanderd2b63cf2017-06-30 03:04:59 -0700249 deps = [
Magnus Jedvert10e829a2018-09-05 10:46:18 +0200250 ":video_file_reader",
kjellander6af0cbf2017-09-04 23:42:45 -0700251 ":video_quality_analysis",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100252 "../api:scoped_refptr",
Yves Gerey3e707812018-11-28 16:47:49 +0100253 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +0200254 "../api/video:video_rtp_headers",
Mirko Bonadei8e032c82019-06-25 08:51:01 +0200255 "//third_party/abseil-cpp/absl/flags:flag",
256 "//third_party/abseil-cpp/absl/flags:parse",
Mirko Bonadei4e722452019-07-19 10:08:41 +0200257 "//third_party/abseil-cpp/absl/flags:usage",
kjellanderd2b63cf2017-06-30 03:04:59 -0700258 ]
259 }
kjellanderd2b63cf2017-06-30 03:04:59 -0700260
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200261 rtc_library("reference_less_video_analysis_lib") {
Patrik Höglund2ea27962020-01-13 15:10:40 +0100262 testonly = true
kjellanderd2b63cf2017-06-30 03:04:59 -0700263 sources = [
kjellander6af0cbf2017-09-04 23:42:45 -0700264 "frame_analyzer/reference_less_video_analysis_lib.cc",
265 "frame_analyzer/reference_less_video_analysis_lib.h",
kjellanderd2b63cf2017-06-30 03:04:59 -0700266 ]
kjellander6af0cbf2017-09-04 23:42:45 -0700267
268 deps = [
Magnus Jedvert10e829a2018-09-05 10:46:18 +0200269 ":video_file_reader",
kjellander6af0cbf2017-09-04 23:42:45 -0700270 ":video_quality_analysis",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100271 "../api:scoped_refptr",
Yves Gerey3e707812018-11-28 16:47:49 +0100272 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +0200273 "../api/video:video_rtp_headers",
kjellander6af0cbf2017-09-04 23:42:45 -0700274 ]
kjellanderd2b63cf2017-06-30 03:04:59 -0700275 }
276
kjellander6af0cbf2017-09-04 23:42:45 -0700277 rtc_executable("reference_less_video_analysis") {
Mirko Bonadei6d6b0fb2019-06-25 08:49:03 +0200278 testonly = true
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100279 sources = [ "frame_analyzer/reference_less_video_analysis.cc" ]
kjellander6af0cbf2017-09-04 23:42:45 -0700280
281 deps = [
kjellander6af0cbf2017-09-04 23:42:45 -0700282 ":reference_less_video_analysis_lib",
Mirko Bonadei6d6b0fb2019-06-25 08:49:03 +0200283 "//third_party/abseil-cpp/absl/flags:flag",
284 "//third_party/abseil-cpp/absl/flags:parse",
Mirko Bonadei7ddca162019-07-19 10:32:16 +0200285 "//third_party/abseil-cpp/absl/flags:usage",
kjellander6af0cbf2017-09-04 23:42:45 -0700286 ]
287 }
288
289 rtc_executable("rgba_to_i420_converter") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000290 visibility = [ "*" ]
Mirko Bonadei2308bb22019-06-25 08:52:47 +0200291 testonly = true
kjellander6af0cbf2017-09-04 23:42:45 -0700292 sources = [
293 "converter/converter.cc",
294 "converter/converter.h",
295 "converter/rgba_to_i420_converter.cc",
296 ]
297
298 deps = [
kjellander6af0cbf2017-09-04 23:42:45 -0700299 "../common_video",
Mirko Bonadei2308bb22019-06-25 08:52:47 +0200300 "//third_party/abseil-cpp/absl/flags:flag",
301 "//third_party/abseil-cpp/absl/flags:parse",
Mirko Bonadei249bade2019-07-19 11:58:07 +0200302 "//third_party/abseil-cpp/absl/flags:usage",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100303 "//third_party/libyuv",
kjellander6af0cbf2017-09-04 23:42:45 -0700304 ]
305 }
306
kjellander6af0cbf2017-09-04 23:42:45 -0700307 if (rtc_enable_protobuf) {
308 proto_library("chart_proto") {
Bjorn Terelius9b809d32019-04-24 17:12:45 +0200309 visibility = [ "*" ]
kjellander6af0cbf2017-09-04 23:42:45 -0700310 sources = [
Mirko Bonadei575998c2019-07-25 13:57:41 +0200311 "rtc_event_log_visualizer/proto/chart.proto",
312 "rtc_event_log_visualizer/proto/chart_enums.proto",
kjellander6af0cbf2017-09-04 23:42:45 -0700313 ]
Mirko Bonadei575998c2019-07-25 13:57:41 +0200314 proto_out_dir = "rtc_tools/rtc_event_log_visualizer/proto"
kjellander6af0cbf2017-09-04 23:42:45 -0700315 }
316
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200317 rtc_library("event_log_visualizer_utils") {
Per Kjellandera0f5f602018-01-10 15:57:32 +0000318 visibility = [ "*" ]
kjellander6af0cbf2017-09-04 23:42:45 -0700319 sources = [
Mirko Bonadei575998c2019-07-25 13:57:41 +0200320 "rtc_event_log_visualizer/analyzer.cc",
321 "rtc_event_log_visualizer/analyzer.h",
322 "rtc_event_log_visualizer/log_simulation.cc",
323 "rtc_event_log_visualizer/log_simulation.h",
324 "rtc_event_log_visualizer/plot_base.cc",
325 "rtc_event_log_visualizer/plot_base.h",
326 "rtc_event_log_visualizer/plot_protobuf.cc",
327 "rtc_event_log_visualizer/plot_protobuf.h",
328 "rtc_event_log_visualizer/plot_python.cc",
329 "rtc_event_log_visualizer/plot_python.h",
330 "rtc_event_log_visualizer/triage_notifications.h",
kjellander6af0cbf2017-09-04 23:42:45 -0700331 ]
kjellander6af0cbf2017-09-04 23:42:45 -0700332 deps = [
Mirko Bonadeif5ff67c2017-12-06 16:31:18 +0100333 ":chart_proto",
Artem Titov741daaf2019-03-21 14:37:36 +0100334 "../api:function_view",
Mirko Bonadei3663ed32019-10-19 12:03:23 +0200335 "../rtc_base:ignore_wundef",
Niels Möller3f651d82018-12-19 15:06:17 +0100336
337 # TODO(kwiberg): Remove this dependency.
338 "../api/audio_codecs:audio_codecs_api",
Sebastian Jansson95edb032019-01-17 16:24:12 +0100339 "../api/transport:field_trial_based_config",
Niels Möller3f651d82018-12-19 15:06:17 +0100340 "../api/transport:goog_cc",
Sebastian Jansson1175ae02019-03-13 08:56:58 +0100341 "../api/transport:network_control",
kjellander6af0cbf2017-09-04 23:42:45 -0700342 "../call:call_interfaces",
343 "../call:video_stream_api",
kjellander6af0cbf2017-09-04 23:42:45 -0700344 "../logging:rtc_event_log_parser",
Qingsi Wang970b0882018-02-01 11:04:46 -0800345 "../logging:rtc_stream_config",
kjellander6af0cbf2017-09-04 23:42:45 -0700346 "../modules/audio_coding:ana_debug_dump_proto",
Mirko Bonadei818d9102017-12-12 12:46:13 +0100347 "../modules/audio_coding:audio_network_adaptor",
kjellander6af0cbf2017-09-04 23:42:45 -0700348 "../modules/audio_coding:neteq_tools",
kjellander6af0cbf2017-09-04 23:42:45 -0700349 "../modules/congestion_controller",
Sebastian Jansson04b18cb2018-07-02 09:25:25 +0200350 "../modules/congestion_controller/goog_cc:delay_based_bwe",
Sebastian Jansson172fd852018-05-24 14:17:06 +0200351 "../modules/congestion_controller/goog_cc:estimators",
Sebastian Jansson5c94f552018-10-15 18:46:51 +0200352 "../modules/congestion_controller/rtp:transport_feedback",
Niels Möllerfd6c0912017-10-31 10:19:10 +0100353 "../modules/pacing",
Sebastian Jansson5c94f552018-10-15 18:46:51 +0200354 "../modules/remote_bitrate_estimator",
kjellander6af0cbf2017-09-04 23:42:45 -0700355 "../modules/rtp_rtcp",
Niels Möller3f651d82018-12-19 15:06:17 +0100356 "../modules/rtp_rtcp:rtp_rtcp_format",
357 "../rtc_base:checks",
358 "../rtc_base:rtc_base_approved",
359 "../rtc_base:rtc_numerics",
360 "../rtc_base:stringutils",
Björn Tereliusc69c1bb2019-10-11 15:06:58 +0200361 "//third_party/abseil-cpp/absl/algorithm:container",
Bjorn Terelius6c4b1b72019-01-11 13:01:29 +0100362 "//third_party/abseil-cpp/absl/strings",
kjellander6af0cbf2017-09-04 23:42:45 -0700363 ]
kjellander6af0cbf2017-09-04 23:42:45 -0700364 }
kjellanderd2b63cf2017-06-30 03:04:59 -0700365 }
366}
367
kjellanderd2b63cf2017-06-30 03:04:59 -0700368if (rtc_include_tests) {
Artem Titov8041b652020-02-19 15:03:45 +0100369 rtc_executable("yuv_to_ivf_converter") {
370 visibility = [ "*" ]
371 testonly = true
372 sources = [
373 "converter/yuv_to_ivf_converter.cc",
374 ]
375 deps = [
376 "../api:create_frame_generator",
377 "../api:frame_generator_api",
378 "../api/task_queue:default_task_queue_factory",
379 "../api/video:encoded_image",
380 "../api/video:video_frame",
381 "../api/video_codecs:video_codecs_api",
382 "../media:rtc_media_base",
383 "../modules/rtp_rtcp:rtp_rtcp_format",
384 "../modules/video_coding:video_codec_interface",
385 "../modules/video_coding:video_coding_utility",
386 "../modules/video_coding:webrtc_h264",
387 "../modules/video_coding:webrtc_vp8",
388 "../modules/video_coding:webrtc_vp9",
389 "../rtc_base:checks",
390 "../rtc_base:criticalsection",
391 "../rtc_base:logging",
392 "../rtc_base:rtc_event",
393 "../rtc_base:rtc_task_queue",
394 "../rtc_base/system:file_wrapper",
395 "../test:video_test_common",
396 "../test:video_test_support",
397 "//third_party/abseil-cpp/absl/debugging:failure_signal_handler",
398 "//third_party/abseil-cpp/absl/debugging:symbolize",
399 "//third_party/abseil-cpp/absl/flags:flag",
400 "//third_party/abseil-cpp/absl/flags:parse",
401 "//third_party/abseil-cpp/absl/strings",
402 ]
403 }
404
Yves Gerey21cddff2018-10-30 21:12:42 +0100405 if (rtc_enable_protobuf && !build_with_chromium) {
kjellanderd2b63cf2017-06-30 03:04:59 -0700406 rtc_executable("event_log_visualizer") {
407 testonly = true
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100408 sources = [ "rtc_event_log_visualizer/main.cc" ]
Mirko Bonadei71574f72020-01-14 19:20:50 +0100409 data = [
410 # If --wav_filename is not provided, event_log_visualizer uses
411 # EN_script2_F_sp2_B1.wav by default. This is a good default to use
412 # for example with flags --plot=all when there is no need to use a
413 # specific .wav file.
414 "../resources/audio_processing/conversational_speech/EN_script2_F_sp2_B1.wav",
415 ]
kjellanderd2b63cf2017-06-30 03:04:59 -0700416 deps = [
417 ":event_log_visualizer_utils",
Ivo Creusen3ce44a32019-10-31 14:38:11 +0100418 "../api/neteq:neteq_api",
Danil Chapovalov83bbe912019-08-07 12:24:53 +0200419 "../api/rtc_event_log",
Mirko Bonadeif5ff67c2017-12-06 16:31:18 +0100420 "../logging:rtc_event_log_parser",
Yves Gerey3e707812018-11-28 16:47:49 +0100421 "../modules/audio_coding:neteq",
422 "../modules/rtp_rtcp:rtp_rtcp_format",
423 "../rtc_base:checks",
Mirko Bonadei818d9102017-12-12 12:46:13 +0100424 "../rtc_base:protobuf_utils",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700425 "../rtc_base:rtc_base_approved",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200426 "../system_wrappers:field_trial",
kjellanderd2b63cf2017-06-30 03:04:59 -0700427 "../test:field_trial",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100428 "../test:fileutils",
kjellanderd2b63cf2017-06-30 03:04:59 -0700429 "../test:test_support",
Bjorn Terelius1aa9ee92019-06-11 17:39:38 +0200430 "//third_party/abseil-cpp/absl/algorithm:container",
Mirko Bonadeif2d97b82019-07-24 15:29:47 +0200431 "//third_party/abseil-cpp/absl/flags:config",
Mirko Bonadei4b091f42019-07-16 11:55:08 +0200432 "//third_party/abseil-cpp/absl/flags:flag",
433 "//third_party/abseil-cpp/absl/flags:parse",
Mirko Bonadeif2d97b82019-07-24 15:29:47 +0200434 "//third_party/abseil-cpp/absl/flags:usage",
435 "//third_party/abseil-cpp/absl/strings",
kjellanderd2b63cf2017-06-30 03:04:59 -0700436 ]
437 }
438 }
439
kjellanderd2b63cf2017-06-30 03:04:59 -0700440 tools_unittests_resources = [
Magnus Jedvert62228c42018-09-05 15:04:08 +0200441 "../resources/foreman_128x96.yuv",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200442 "../resources/foreman_cif.yuv",
443 "../resources/reference_less_video_test_file.y4m",
kjellanderd2b63cf2017-06-30 03:04:59 -0700444 ]
445
446 if (is_ios) {
447 bundle_data("tools_unittests_bundle_data") {
448 testonly = true
449 sources = tools_unittests_resources
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100450 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
kjellanderd2b63cf2017-06-30 03:04:59 -0700451 }
452 }
453
454 rtc_test("tools_unittests") {
455 testonly = true
456
457 sources = [
Magnus Jedvert1927dfa2018-09-11 12:56:06 +0200458 "frame_analyzer/linear_least_squares_unittest.cc",
kjellanderd2b63cf2017-06-30 03:04:59 -0700459 "frame_analyzer/reference_less_video_analysis_unittest.cc",
Magnus Jedvert1927dfa2018-09-11 12:56:06 +0200460 "frame_analyzer/video_color_aligner_unittest.cc",
Magnus Jedvert286df002018-11-22 15:17:30 +0100461 "frame_analyzer/video_geometry_aligner_unittest.cc",
kjellanderd2b63cf2017-06-30 03:04:59 -0700462 "frame_analyzer/video_quality_analysis_unittest.cc",
Magnus Jedvert62228c42018-09-05 15:04:08 +0200463 "frame_analyzer/video_temporal_aligner_unittest.cc",
Oleh Prypin66ca7e32017-09-14 13:05:00 +0200464 "sanitizers_unittest.cc",
Magnus Jedvert10e829a2018-09-05 10:46:18 +0200465 "video_file_reader_unittest.cc",
Paulina Hensmanb671d462018-09-14 11:32:00 +0200466 "video_file_writer_unittest.cc",
kjellanderd2b63cf2017-06-30 03:04:59 -0700467 ]
468
kjellanderd2b63cf2017-06-30 03:04:59 -0700469 deps = [
Magnus Jedvert10e829a2018-09-05 10:46:18 +0200470 ":video_file_reader",
Paulina Hensmanb671d462018-09-14 11:32:00 +0200471 ":video_file_writer",
kjellanderd2b63cf2017-06-30 03:04:59 -0700472 ":video_quality_analysis",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100473 "../api:scoped_refptr",
Yves Gerey3e707812018-11-28 16:47:49 +0100474 "../api/video:video_frame",
475 "../api/video:video_frame_i420",
Chen Xing5d24b162019-06-10 12:59:38 +0200476 "../api/video:video_rtp_headers",
Artem Titov94b57c02019-03-21 13:35:10 +0100477 "../common_video",
Oleh Prypin66ca7e32017-09-14 13:05:00 +0200478 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100479 "../rtc_base:checks",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100480 "../test:fileutils",
kjellanderd2b63cf2017-06-30 03:04:59 -0700481 "../test:test_main",
Yves Gerey21cddff2018-10-30 21:12:42 +0100482 "../test:test_support",
kjellanderd2b63cf2017-06-30 03:04:59 -0700483 "//testing/gtest",
Magnus Jedvert1927dfa2018-09-11 12:56:06 +0200484 "//third_party/libyuv",
kjellanderd2b63cf2017-06-30 03:04:59 -0700485 ]
486
Yves Gerey21cddff2018-10-30 21:12:42 +0100487 if (!build_with_chromium) {
Mirko Bonadei5693c262019-07-19 11:35:45 +0200488 deps += [ ":reference_less_video_analysis_lib" ]
Yves Gerey21cddff2018-10-30 21:12:42 +0100489 }
490
kjellanderd2b63cf2017-06-30 03:04:59 -0700491 if (rtc_enable_protobuf) {
492 deps += [ "network_tester:network_tester_unittests" ]
493 }
494
495 data = tools_unittests_resources
496 if (is_android) {
497 deps += [ "//testing/android/native_test:native_test_support" ]
498 shard_timeout = 900
499 }
500 if (is_ios) {
501 deps += [ ":tools_unittests_bundle_data" ]
502 }
503 }
504
505 if (rtc_enable_protobuf) {
Daniel Johansson89aaeda2019-12-10 11:00:38 +0100506 rtc_executable("audioproc_f") {
507 testonly = true
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100508 sources = [ "audioproc_f/audioproc_float_main.cc" ]
Daniel Johansson89aaeda2019-12-10 11:00:38 +0100509 deps = [
510 "../api:audioproc_f_api",
511 "../modules/audio_processing",
512 "../modules/audio_processing:api",
513 "../rtc_base:rtc_base_approved",
514 ]
515 }
516
kjellanderd2b63cf2017-06-30 03:04:59 -0700517 copy("rtp_analyzer") {
518 sources = [
519 "py_event_log_analyzer/misc.py",
520 "py_event_log_analyzer/pb_parse.py",
521 "py_event_log_analyzer/rtp_analyzer.py",
522 "py_event_log_analyzer/rtp_analyzer.sh",
523 ]
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100524 outputs = [ "$root_build_dir/{{source_file_part}}" ]
525 deps = [ "../logging:rtc_event_log_proto" ]
Patrik Höglund844ce8b2017-12-12 15:53:31 +0100526 } # rtp_analyzer
527
528 rtc_executable("unpack_aecdump") {
Mirko Bonadeie5a93a72018-01-10 22:18:27 +0100529 visibility = [ "*" ]
Patrik Höglund844ce8b2017-12-12 15:53:31 +0100530 testonly = true
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100531 sources = [ "unpack_aecdump/unpack.cc" ]
Patrik Höglund844ce8b2017-12-12 15:53:31 +0100532
533 deps = [
Fredrik Hernqvist3be9da32019-05-21 12:23:31 +0200534 "../api:function_view",
Patrik Höglund844ce8b2017-12-12 15:53:31 +0100535 "../common_audio",
536 "../modules/audio_processing",
537 "../modules/audio_processing:audioproc_debug_proto",
538 "../modules/audio_processing:audioproc_debug_proto",
539 "../modules/audio_processing:audioproc_protobuf_utils",
540 "../modules/audio_processing:audioproc_test_utils",
Mirko Bonadei3663ed32019-10-19 12:03:23 +0200541 "../rtc_base:ignore_wundef",
Patrik Höglund844ce8b2017-12-12 15:53:31 +0100542 "../rtc_base:protobuf_utils",
543 "../rtc_base:rtc_base_approved",
Mirko Bonadei9d962092019-07-04 10:19:10 +0200544 "//third_party/abseil-cpp/absl/flags:flag",
545 "//third_party/abseil-cpp/absl/flags:parse",
Patrik Höglund844ce8b2017-12-12 15:53:31 +0100546 ]
547 } # unpack_aecdump
kjellanderd2b63cf2017-06-30 03:04:59 -0700548 }
549}