blob: 5af4766810f9a1b6d475bd93d9228932a3b6d7e2 [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
kjellander0f380d82016-06-01 04:48:26 -07009import("//build/config/ui.gni")
Robin Raymondce1b1402018-11-22 20:10:11 -050010import("../webrtc.gni")
kjellander0f380d82016-06-01 04:48:26 -070011if (is_android) {
12 import("//build/config/android/rules.gni")
13}
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000014
kjellanderb62dbbe2016-09-23 00:38:52 -070015group("test") {
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000016 testonly = true
17
18 deps = [
Artem Titov66a29b92019-01-15 14:43:20 +010019 ":copy_to_file_audio_capturer",
kjellander0f380d82016-06-01 04:48:26 -070020 ":rtp_test_utils",
21 ":test_common",
22 ":test_renderer",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000023 ":test_support",
kjellander0f380d82016-06-01 04:48:26 -070024 ":video_test_common",
Artem Titov4895b452019-01-14 16:54:04 +010025 "pc/e2e",
kjellander0f380d82016-06-01 04:48:26 -070026 ]
mbonadei148d5a22017-04-28 05:24:50 -070027
oprypinfbbba3f2017-09-25 08:34:41 -070028 if (rtc_include_tests) {
mbonadei148d5a22017-04-28 05:24:50 -070029 deps += [
30 ":test_main",
31 ":test_support_unittests",
Sebastian Jansson98b07e92018-09-27 13:47:01 +020032 "scenario/scenario_tests",
mbonadei148d5a22017-04-28 05:24:50 -070033 ]
34 }
kjellander0f380d82016-06-01 04:48:26 -070035}
36
ehmaldonado38a21322016-09-02 04:10:34 -070037rtc_source_set("video_test_common") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000038 visibility = [ "*" ]
kjellander0f380d82016-06-01 04:48:26 -070039 testonly = true
40 sources = [
41 "fake_texture_frame.cc",
42 "fake_texture_frame.h",
43 "frame_generator.cc",
44 "frame_generator.h",
ehmaldonado656610f2017-02-06 02:21:11 -080045 "frame_generator_capturer.cc",
46 "frame_generator_capturer.h",
kjellander0f380d82016-06-01 04:48:26 -070047 "frame_utils.cc",
48 "frame_utils.h",
Sebastian Janssonf1f363f2018-08-13 14:24:58 +020049 "test_video_capturer.cc",
50 "test_video_capturer.h",
mflodman351424e2017-08-10 02:43:14 -070051 "video_codec_settings.h",
kjellander0f380d82016-06-01 04:48:26 -070052 ]
53
kjellander0f380d82016-06-01 04:48:26 -070054 deps = [
Sebastian Jansson53571c72019-07-31 17:30:03 +020055 ":fileutils",
Patrik Höglund9e194032018-01-04 15:58:20 +010056 "../api:libjingle_peerconnection_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +010057 "../api:scoped_refptr",
Sebastian Janssonfb14c5d2019-02-28 13:30:04 +010058 "../api/task_queue",
Niels Möllerc6ce9c52018-05-11 11:15:30 +020059 "../api/video:video_frame",
Emircan Uysaler0823eec2018-07-13 17:10:00 -070060 "../api/video:video_frame_i010",
Niels Möllerc6ce9c52018-05-11 11:15:30 +020061 "../api/video:video_frame_i420",
Chen Xing5d24b162019-06-10 12:59:38 +020062 "../api/video:video_rtp_headers",
mflodman351424e2017-08-10 02:43:14 -070063 "../api/video_codecs:video_codecs_api",
aleloi440b6d92017-08-22 05:43:23 -070064 "../call:video_stream_api",
kjellander0f380d82016-06-01 04:48:26 -070065 "../common_video",
sprangc5d62e22017-04-02 23:53:04 -070066 "../media:rtc_media_base",
Artem Titov94b57c02019-03-21 13:35:10 +010067 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010068 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -070069 "../rtc_base:rtc_task_queue",
Sebastian Janssonecb68972019-01-18 10:30:54 +010070 "../rtc_base/task_utils:repeating_task",
mbonadei3edccb92017-06-01 04:47:20 -070071 "../system_wrappers",
Danil Chapovalovabd42732018-09-10 14:07:45 +020072 "//third_party/abseil-cpp/absl/memory",
Danil Chapovalov431abd92018-06-18 12:54:17 +020073 "//third_party/abseil-cpp/absl/types:optional",
kjellander0f380d82016-06-01 04:48:26 -070074 ]
75}
76
Kári Tristan Helgasonede7cb22019-03-06 10:34:09 +010077if (!build_with_chromium) {
78 if (is_mac || is_ios) {
79 rtc_source_set("video_test_mac") {
80 testonly = true
81 sources = [
82 "mac_capturer.h",
83 "mac_capturer.mm",
84 ]
85 deps = [
86 ":video_test_common",
87 "../api:libjingle_peerconnection_api",
88 "../api:scoped_refptr",
89 "../modules/video_capture:video_capture_module",
Artem Titov94b57c02019-03-21 13:35:10 +010090 "../rtc_base",
Kári Tristan Helgasonede7cb22019-03-06 10:34:09 +010091 "../sdk:base_objc",
92 "../sdk:native_api",
93 "../sdk:native_video",
94 "../sdk:videocapture_objc",
95 ]
96 }
97 }
98
99 rtc_source_set("platform_video_capturer") {
100 testonly = true
101 sources = [
102 "platform_video_capturer.cc",
103 "platform_video_capturer.h",
104 ]
105 deps = [
106 ":video_test_common",
107 "//third_party/abseil-cpp/absl/memory",
108 ]
109 if (is_mac || is_ios) {
110 deps += [ ":video_test_mac" ]
111 } else {
112 sources += [
113 "vcm_capturer.cc",
114 "vcm_capturer.h",
115 ]
116 deps += [
117 "../api:scoped_refptr",
118 "../modules/video_capture:video_capture_module",
119 "../rtc_base:checks",
120 "../rtc_base:logging",
121 ]
122 }
123 }
124}
125
ehmaldonado38a21322016-09-02 04:10:34 -0700126rtc_source_set("rtp_test_utils") {
kjellander0f380d82016-06-01 04:48:26 -0700127 testonly = true
128 sources = [
129 "rtcp_packet_parser.cc",
130 "rtcp_packet_parser.h",
131 "rtp_file_reader.cc",
132 "rtp_file_reader.h",
133 "rtp_file_writer.cc",
134 "rtp_file_writer.h",
135 ]
136
kjellander0f380d82016-06-01 04:48:26 -0700137 deps = [
kwiberg529662a2017-09-04 05:43:17 -0700138 "../api:array_view",
kjellander0f380d82016-06-01 04:48:26 -0700139 "../modules/rtp_rtcp",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100140 "../modules/rtp_rtcp:rtp_rtcp_format",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100141 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700142 "../rtc_base:rtc_base_approved",
Niels Möllera12c42a2018-07-25 16:05:48 +0200143 "../rtc_base/system:arch",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000144 ]
145}
146
ehmaldonado38a21322016-09-02 04:10:34 -0700147rtc_source_set("field_trial") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000148 visibility = [ "*" ]
kjellander0f380d82016-06-01 04:48:26 -0700149 testonly = true
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000150 sources = [
151 "field_trial.cc",
152 "field_trial.h",
153 ]
154
155 deps = [
Mirko Bonadei17f48782018-09-28 08:51:10 +0200156 "../system_wrappers:field_trial",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000157 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000158}
159
Edward Lemure66572b2018-01-05 15:34:09 +0100160rtc_source_set("perf_test") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000161 visibility = [ "*" ]
Edward Lemure66572b2018-01-05 15:34:09 +0100162 sources = [
163 "testsupport/perf_test.cc",
164 "testsupport/perf_test.h",
165 ]
166 deps = [
Edward Lemure66572b2018-01-05 15:34:09 +0100167 "../api:array_view",
Oleh Prypind136b282018-10-03 13:53:44 +0200168 "../rtc_base:checks",
Edward Lemure66572b2018-01-05 15:34:09 +0100169 "../rtc_base:rtc_base_approved",
170 ]
171}
172
mbonadeicd95a4e2017-08-23 23:55:54 -0700173if (is_ios) {
174 rtc_source_set("test_support_objc") {
175 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700176 visibility = [ ":test_support" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700177 sources = [
Artem Titarenko34fc3462018-11-06 12:29:29 +0100178 "ios/coverage_util_ios.h",
179 "ios/coverage_util_ios.mm",
mbonadeicd95a4e2017-08-23 23:55:54 -0700180 "ios/test_support.h",
181 "ios/test_support.mm",
182 ]
denicijad207a392017-09-11 06:43:28 -0700183 deps = [
Edward Lemure66572b2018-01-05 15:34:09 +0100184 ":perf_test",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200185 "../sdk:helpers_objc",
denicijad207a392017-09-11 06:43:28 -0700186 ]
Artem Titarenko34fc3462018-11-06 12:29:29 +0100187 configs += [ ":test_support_objc_config" ]
188 }
189
190 config("test_support_objc_config") {
191 defines = []
192
193 if (use_clang_coverage) {
194 defines += [ "WEBRTC_IOS_ENABLE_COVERAGE" ]
195 }
mbonadeicd95a4e2017-08-23 23:55:54 -0700196 }
197}
198
Patrik Höglund34924c22018-01-19 09:11:07 +0100199config("suppress_warning_4373") {
200 if (is_win) {
201 cflags = [
202 # MSVC has a bug which generates this warning when using mocks; see the
203 # section on warning 4373 in he googlemock FAQ. This warning isn't the
204 # least relevant for us, anyway.
205 "/wd4373",
206 ]
207 }
208}
209
Sebastian Jansson2afd2812018-08-23 14:44:05 +0200210config("test_main_direct_config") {
211 visibility = [ ":*" ]
212 defines = [ "UNIT_TEST" ]
213}
mbonadei148d5a22017-04-28 05:24:50 -0700214rtc_source_set("test_support") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000215 visibility = [ "*" ]
mbonadei148d5a22017-04-28 05:24:50 -0700216 testonly = true
kjellander32c4a202016-08-30 02:53:49 -0700217
Mirko Bonadei65ce3112018-01-26 11:57:47 +0100218 all_dependent_configs = [
219 ":suppress_warning_4373",
220 "//third_party/googletest:gmock_config",
221 "//third_party/googletest:gtest_config",
222 ]
Patrik Höglund34924c22018-01-19 09:11:07 +0100223
mbonadei148d5a22017-04-28 05:24:50 -0700224 sources = [
225 "gmock.h",
226 "gtest.h",
mbonadei148d5a22017-04-28 05:24:50 -0700227 ]
228
Kári Tristan Helgasonede7cb22019-03-06 10:34:09 +0100229 public_deps = [] # no-presubmit-check TODO(webrtc:8603)
Kári Tristan Helgasone2baffb2017-06-09 10:31:58 +0200230 if (is_ios) {
Kári Tristan Helgasonede7cb22019-03-06 10:34:09 +0100231 public_deps += [ ":test_support_objc" ] # no-presubmit-check TODO(webrtc:8603)
Kári Tristan Helgasone2baffb2017-06-09 10:31:58 +0200232 }
233
Sebastian Jansson2afd2812018-08-23 14:44:05 +0200234 public_configs = [ ":test_main_direct_config" ]
mbonadei148d5a22017-04-28 05:24:50 -0700235 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700236 "../rtc_base:rtc_base_approved",
mbonadei148d5a22017-04-28 05:24:50 -0700237 "//testing/gmock",
238 "//testing/gtest",
239 ]
kjellander32c4a202016-08-30 02:53:49 -0700240}
241
oprypinfbbba3f2017-09-25 08:34:41 -0700242if (rtc_include_tests) {
Artem Titov40a7a352018-10-15 15:25:34 +0200243 rtc_source_set("test_main_lib") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000244 visibility = [ "*" ]
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200245 testonly = true
Oleh Prypin5ab68542017-09-25 09:18:00 +0000246 sources = [
Artem Titov40a7a352018-10-15 15:25:34 +0200247 "test_main_lib.cc",
248 "test_main_lib.h",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000249 ]
250
Oleh Prypin5ab68542017-09-25 09:18:00 +0000251 deps = [
252 ":field_trial",
Edward Lemure66572b2018-01-05 15:34:09 +0100253 ":perf_test",
Artem Titov40a7a352018-10-15 15:25:34 +0200254 ":test_support",
Artem Titov94b57c02019-03-21 13:35:10 +0100255 "../rtc_base",
Yves Gerey3e707812018-11-28 16:47:49 +0100256 "../rtc_base:checks",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200257 "../system_wrappers:field_trial",
258 "../system_wrappers:metrics",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000259 "//testing/gtest",
Mirko Bonadei2ab97f62019-07-18 13:44:12 +0200260 "//third_party/abseil-cpp/absl/flags:flag",
261 "//third_party/abseil-cpp/absl/flags:parse",
Yves Gerey3e707812018-11-28 16:47:49 +0100262 "//third_party/abseil-cpp/absl/memory",
Patrik Höglund77301932018-10-09 15:09:51 +0200263
264 # TODO(bugs.webrtc.org/9792): This is needed for downstream projects on
265 # Android, where it's replaced by an internal version of fileutils that
266 # has a certain flag. Remove this once the internal fileutils has been
267 # eliminated.
268 "../test:fileutils",
mbonadei9452c622017-04-27 12:29:29 -0700269 ]
270 }
mbonadei9452c622017-04-27 12:29:29 -0700271
Artem Titov40a7a352018-10-15 15:25:34 +0200272 rtc_source_set("test_main") {
273 visibility = [ "*" ]
274 testonly = true
275 sources = [
276 "test_main.cc",
277 ]
278
279 deps = [
280 ":test_main_lib",
281 ]
282 }
283
Oleh Prypin5ab68542017-09-25 09:18:00 +0000284 rtc_source_set("video_test_support") {
285 testonly = true
286
287 sources = [
288 "testsupport/frame_reader.h",
289 "testsupport/frame_writer.h",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000290 "testsupport/mock/mock_frame_reader.h",
Artem Titov08a9b612019-01-17 21:37:19 +0100291 "testsupport/video_frame_writer.cc",
292 "testsupport/video_frame_writer.h",
Artem Titov645df9e2019-01-14 14:21:59 +0100293 "testsupport/y4m_frame_reader.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000294 "testsupport/y4m_frame_writer.cc",
295 "testsupport/yuv_frame_reader.cc",
296 "testsupport/yuv_frame_writer.cc",
297 ]
298
299 deps = [
Patrik Höglund7696bef2018-03-15 15:05:39 +0100300 ":fileutils",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000301 ":test_support",
302 ":video_test_common",
Artem Titov08a9b612019-01-17 21:37:19 +0100303 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200304 "../api/video:video_frame",
305 "../api/video:video_frame_i420",
Chen Xing5d24b162019-06-10 12:59:38 +0200306 "../api/video:video_rtp_headers",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000307 "../common_video",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100308 "../rtc_base:checks",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000309 "../rtc_base:rtc_base_approved",
310 "../system_wrappers",
Artem Titov533a9fe2019-03-21 12:18:05 +0100311 "//third_party/abseil-cpp/absl/memory",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100312 "//third_party/libyuv",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000313 ]
314
315 if (!is_ios) {
316 deps += [ "//third_party:jpeg" ]
317 sources += [ "testsupport/jpeg_frame_writer.cc" ]
318 } else {
319 sources += [ "testsupport/jpeg_frame_writer_ios.cc" ]
320 }
321
Oleh Prypin5ab68542017-09-25 09:18:00 +0000322 if (is_android) {
Artem Titov94b57c02019-03-21 13:35:10 +0100323 deps += [ "//base" ]
Oleh Prypin5ab68542017-09-25 09:18:00 +0000324 }
Oleh Prypin5ab68542017-09-25 09:18:00 +0000325 }
326
Edward Lemuraf8659a2017-09-27 14:46:24 +0200327 rtc_source_set("test_support_test_artifacts") {
Oleh Prypin5ab68542017-09-25 09:18:00 +0000328 testonly = true
329 sources = [
Edward Lemuraf8659a2017-09-27 14:46:24 +0200330 "testsupport/test_artifacts.cc",
331 "testsupport/test_artifacts.h",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000332 ]
333 deps = [
334 ":fileutils",
335 "../rtc_base:rtc_base_approved",
Niels Möllerb7edf692019-02-08 16:40:53 +0100336 "../rtc_base/system:file_wrapper",
Mirko Bonadei2ab97f62019-07-18 13:44:12 +0200337 "//third_party/abseil-cpp/absl/flags:flag",
338 "//third_party/abseil-cpp/absl/flags:parse",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000339 ]
340 }
341
342 test_support_unittests_resources = [
343 "../resources/foreman_cif_short.yuv",
344 "../resources/video_coding/frame-ethernet-ii.pcap",
345 "../resources/video_coding/frame-loopback.pcap",
346 "../resources/video_coding/pltype103.rtp",
347 "../resources/video_coding/pltype103_header_only.rtp",
348 "../resources/video_coding/ssrcs-2.pcap",
349 "../resources/video_coding/ssrcs-3.pcap",
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200350 ]
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200351
352 if (is_ios) {
Oleh Prypin5ab68542017-09-25 09:18:00 +0000353 bundle_data("test_support_unittests_bundle_data") {
354 testonly = true
355 sources = test_support_unittests_resources
356 outputs = [
357 "{{bundle_resources_dir}}/{{source_file_part}}",
358 ]
359 }
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200360 }
361
Oleh Prypin5ab68542017-09-25 09:18:00 +0000362 rtc_test("test_support_unittests") {
363 deps = [
Benjamin Wright9db8b882019-01-14 15:30:20 -0800364 ":call_config_utils",
Artem Titov66a29b92019-01-15 14:43:20 +0100365 ":copy_to_file_audio_capturer_unittest",
Sebastian Jansson09408112018-04-24 14:41:22 +0200366 ":direct_transport",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200367 ":fake_video_codecs",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100368 ":fileutils",
Mirko Bonadei46399992018-08-22 15:32:38 +0200369 ":fileutils_unittests",
Edward Lemure66572b2018-01-05 15:34:09 +0100370 ":perf_test",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000371 ":rtp_test_utils",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200372 ":test_common",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200373 ":test_main",
374 ":test_support",
375 ":test_support_test_artifacts",
376 ":video_test_common",
377 ":video_test_support",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200378 "../api:create_simulcast_test_fixture_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100379 "../api:scoped_refptr",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200380 "../api:simulcast_test_fixture_api",
Danil Chapovalov99b71df2018-10-26 15:57:48 +0200381 "../api/test/video:function_video_factory",
Jiawei Ouc2ebe212018-11-08 10:02:56 -0800382 "../api/video:builtin_video_bitrate_allocator_factory",
Yves Gerey3e707812018-11-28 16:47:49 +0100383 "../api/video:video_frame",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200384 "../api/video:video_frame_i420",
Chen Xing5d24b162019-06-10 12:59:38 +0200385 "../api/video:video_rtp_headers",
Benjamin Wright9db8b882019-01-14 15:30:20 -0800386 "../call:video_stream_api",
Artem Titov94b57c02019-03-21 13:35:10 +0100387 "../modules/rtp_rtcp",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200388 "../modules/video_coding:simulcast_test_fixture_impl",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000389 "../rtc_base:rtc_base_approved",
Niels Möllerb7edf692019-02-08 16:40:53 +0100390 "../rtc_base/system:file_wrapper",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200391 "../test:single_threaded_task_queue",
Artem Titov4895b452019-01-14 16:54:04 +0100392 "pc/e2e:e2e_unittests",
Sebastian Jansson98b07e92018-09-27 13:47:01 +0200393 "scenario:scenario_unittests",
Sebastian Jansson53571c72019-07-31 17:30:03 +0200394 "time_controller",
Sebastian Jansson0d617cc2019-03-22 15:22:16 +0100395 "time_controller:time_controller_unittests",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200396 "//testing/gmock",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200397 "//testing/gtest",
Mirko Bonadei2ab97f62019-07-18 13:44:12 +0200398 "//third_party/abseil-cpp/absl/flags:flag",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200399 "//third_party/abseil-cpp/absl/memory",
Artem Titov645df9e2019-01-14 14:21:59 +0100400 "//third_party/abseil-cpp/absl/strings",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000401 ]
402 sources = [
Benjamin Wright9db8b882019-01-14 15:30:20 -0800403 "call_config_utils_unittest.cc",
Sebastian Jansson09408112018-04-24 14:41:22 +0200404 "direct_transport_unittest.cc",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200405 "fake_vp8_encoder_unittest.cc",
Sebastian Jansson53571c72019-07-31 17:30:03 +0200406 "frame_generator_capturer_unittest.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000407 "frame_generator_unittest.cc",
408 "rtp_file_reader_unittest.cc",
409 "rtp_file_writer_unittest.cc",
410 "single_threaded_task_queue_unittest.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000411 "testsupport/perf_test_unittest.cc",
Edward Lemuraf8659a2017-09-27 14:46:24 +0200412 "testsupport/test_artifacts_unittest.cc",
Artem Titov08a9b612019-01-17 21:37:19 +0100413 "testsupport/video_frame_writer_unittest.cc",
Artem Titov645df9e2019-01-14 14:21:59 +0100414 "testsupport/y4m_frame_reader_unittest.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000415 "testsupport/y4m_frame_writer_unittest.cc",
416 "testsupport/yuv_frame_reader_unittest.cc",
417 "testsupport/yuv_frame_writer_unittest.cc",
418 ]
419
Oleh Prypin5ab68542017-09-25 09:18:00 +0000420 data = test_support_unittests_resources
421 if (is_android) {
422 deps += [ "//testing/android/native_test:native_test_support" ]
423 shard_timeout = 900
424 }
425
426 if (is_ios) {
427 deps += [ ":test_support_unittests_bundle_data" ]
428 }
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200429
Mirko Bonadei9098b302018-04-06 10:48:10 +0200430 if (!is_android && !build_with_chromium) {
431 # This is needed in order to avoid:
432 # undefined symbol: webrtc::videocapturemodule::VideoCaptureImpl::Create
433 deps += [ "../modules/video_capture:video_capture_internal_impl" ]
434 }
Oleh Prypin5ab68542017-09-25 09:18:00 +0000435 }
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200436}
437
mbonadeicd95a4e2017-08-23 23:55:54 -0700438if (is_ios) {
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200439 rtc_source_set("fileutils_ios_objc") {
Artem Titov8f726be2018-10-23 15:50:10 +0200440 visibility = [
441 ":fileutils",
442 ":fileutils_override_impl",
443 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700444 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800445 "testsupport/ios_file_utils.h",
446 "testsupport/ios_file_utils.mm",
mbonadeicd95a4e2017-08-23 23:55:54 -0700447 ]
448 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100449 "../rtc_base:checks",
mbonadeicd95a4e2017-08-23 23:55:54 -0700450 "../rtc_base:rtc_base_approved",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200451 "../sdk:helpers_objc",
mbonadeicd95a4e2017-08-23 23:55:54 -0700452 ]
453 }
454}
455
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200456if (is_mac) {
457 rtc_source_set("fileutils_mac_objc") {
Artem Titov8f726be2018-10-23 15:50:10 +0200458 visibility = [
459 ":fileutils",
460 ":fileutils_override_impl",
461 ]
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200462 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800463 "testsupport/mac_file_utils.h",
464 "testsupport/mac_file_utils.mm",
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200465 ]
466 deps = [
467 "../rtc_base:checks",
468 ]
469 }
470}
471
mbonadei9452c622017-04-27 12:29:29 -0700472rtc_source_set("fileutils") {
473 testonly = true
Patrik Höglund7696bef2018-03-15 15:05:39 +0100474 visibility = [ "*" ]
mbonadei9452c622017-04-27 12:29:29 -0700475 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800476 "testsupport/file_utils.cc",
477 "testsupport/file_utils.h",
mbonadei9452c622017-04-27 12:29:29 -0700478 ]
mbonadei3edccb92017-06-01 04:47:20 -0700479 deps = [
Artem Titov8f726be2018-10-23 15:50:10 +0200480 ":fileutils_override_api",
481 ":fileutils_override_impl",
Artem Titov8f726be2018-10-23 15:50:10 +0200482 "../rtc_base:checks",
483 "../rtc_base:rtc_base_approved",
484 "../rtc_base/system:arch",
485 "//third_party/abseil-cpp/absl/types:optional",
486 ]
487 if (is_ios) {
488 deps += [ ":fileutils_ios_objc" ]
489 }
490 if (is_mac) {
491 deps += [ ":fileutils_mac_objc" ]
492 }
493 if (is_win) {
Artem Titov94b57c02019-03-21 13:35:10 +0100494 deps += [ "../rtc_base" ]
Artem Titov8f726be2018-10-23 15:50:10 +0200495 }
496}
497
498# We separate header into own target to make it possible for downstream
499# projects to override implementation.
500rtc_source_set("fileutils_override_api") {
501 testonly = true
502 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800503 "testsupport/file_utils_override.h",
Artem Titov8f726be2018-10-23 15:50:10 +0200504 ]
505}
506
507rtc_source_set("fileutils_override_impl") {
508 testonly = true
509 visibility = [ ":fileutils" ]
510 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800511 "testsupport/file_utils_override.cc",
Artem Titov8f726be2018-10-23 15:50:10 +0200512 ]
513 deps = [
514 ":fileutils_override_api",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100515 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700516 "../rtc_base:rtc_base_approved",
Niels Möllera12c42a2018-07-25 16:05:48 +0200517 "../rtc_base/system:arch",
Danil Chapovalov431abd92018-06-18 12:54:17 +0200518 "//third_party/abseil-cpp/absl/types:optional",
mbonadei3edccb92017-06-01 04:47:20 -0700519 ]
mbonadei9452c622017-04-27 12:29:29 -0700520 if (is_ios) {
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200521 deps += [ ":fileutils_ios_objc" ]
522 }
523 if (is_mac) {
524 deps += [ ":fileutils_mac_objc" ]
mbonadei3edccb92017-06-01 04:47:20 -0700525 }
526 if (is_win) {
Artem Titov94b57c02019-03-21 13:35:10 +0100527 deps += [ "../rtc_base" ]
mbonadei9452c622017-04-27 12:29:29 -0700528 }
mbonadei9452c622017-04-27 12:29:29 -0700529}
530
531rtc_source_set("run_test") {
532 testonly = true
mbonadeicd95a4e2017-08-23 23:55:54 -0700533 if (is_mac) {
Kári Tristan Helgasonede7cb22019-03-06 10:34:09 +0100534 public_deps = [ # no-presubmit-check TODO(webrtc:8603)
mbonadeicd95a4e2017-08-23 23:55:54 -0700535 ":run_test_objc",
536 ]
537 } else {
Kári Tristan Helgasonede7cb22019-03-06 10:34:09 +0100538 public_deps = [ # no-presubmit-check TODO(webrtc:8603)
mbonadeicd95a4e2017-08-23 23:55:54 -0700539 ":run_test_generic",
540 ]
541 }
542}
543
544rtc_source_set("run_test_interface") {
mbonadei9452c622017-04-27 12:29:29 -0700545 sources = [
546 "run_test.h",
547 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700548}
549
550if (is_mac) {
551 rtc_source_set("run_test_objc") {
552 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700553 visibility = [ ":run_test" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700554 sources = [
555 "mac/run_test.mm",
556 ]
mbonadei9c296b32017-09-05 05:11:41 -0700557 deps = [
mbonadeicd95a4e2017-08-23 23:55:54 -0700558 ":run_test_interface",
559 ]
mbonadei9452c622017-04-27 12:29:29 -0700560 }
561}
562
mbonadeicd95a4e2017-08-23 23:55:54 -0700563rtc_source_set("run_test_generic") {
564 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700565 visibility = [ ":run_test" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700566 sources = [
567 "run_test.cc",
568 ]
mbonadei9c296b32017-09-05 05:11:41 -0700569 deps = [
mbonadeicd95a4e2017-08-23 23:55:54 -0700570 ":run_test_interface",
571 ]
572}
573
ehmaldonado37535bf2016-12-05 06:42:45 -0800574rtc_source_set("fileutils_unittests") {
575 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700576 visibility = [ ":*" ] # Only targets in this file can depend on this.
ehmaldonado37535bf2016-12-05 06:42:45 -0800577 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800578 "testsupport/file_utils_unittest.cc",
ehmaldonado37535bf2016-12-05 06:42:45 -0800579 ]
580 deps = [
581 ":fileutils",
mbonadei3edccb92017-06-01 04:47:20 -0700582 ":test_support",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100583 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700584 "../rtc_base:rtc_base_approved",
ehmaldonado37535bf2016-12-05 06:42:45 -0800585 "//testing/gtest",
Danil Chapovalov431abd92018-06-18 12:54:17 +0200586 "//third_party/abseil-cpp/absl/types:optional",
ehmaldonado37535bf2016-12-05 06:42:45 -0800587 ]
588}
kjellander0f380d82016-06-01 04:48:26 -0700589
perkj488c5dc2017-02-08 05:55:51 -0800590rtc_source_set("direct_transport") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000591 visibility = [ "*" ]
perkj488c5dc2017-02-08 05:55:51 -0800592 testonly = true
593 sources = [
594 "direct_transport.cc",
595 "direct_transport.h",
perkj488c5dc2017-02-08 05:55:51 -0800596 ]
perkj488c5dc2017-02-08 05:55:51 -0800597 deps = [
Artem Titov46c4e602018-08-17 14:26:54 +0200598 "../api:simulated_network_api",
perkj488c5dc2017-02-08 05:55:51 -0800599 "../api:transport_api",
Mirko Bonadeia0e1a552017-12-04 10:50:51 +0100600 "../call:call_interfaces",
Artem Titov46c4e602018-08-17 14:26:54 +0200601 "../call:simulated_packet_receiver",
mbonadei3edccb92017-06-01 04:47:20 -0700602 "../modules/rtp_rtcp",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700603 "../rtc_base:rtc_base_approved",
Sebastian Janssonb55015e2019-04-09 13:44:04 +0200604 "../rtc_base/synchronization:sequence_checker",
mbonadei3edccb92017-06-01 04:47:20 -0700605 "../system_wrappers",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200606 "//third_party/abseil-cpp/absl/memory",
perkj488c5dc2017-02-08 05:55:51 -0800607 ]
Kári Tristan Helgasonede7cb22019-03-06 10:34:09 +0100608 public_deps = [ # no-presubmit-check TODO(webrtc:8603)
eladalon413ee9a2017-08-22 04:02:52 -0700609 ":single_threaded_task_queue",
Erik Språng09708512018-03-14 15:16:50 +0100610 "../call:fake_network",
eladalon413ee9a2017-08-22 04:02:52 -0700611 ]
612}
613
614rtc_source_set("single_threaded_task_queue") {
615 testonly = true
616 sources = [
617 "single_threaded_task_queue.cc",
618 "single_threaded_task_queue.h",
619 ]
620 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100621 "../rtc_base:checks",
eladalon413ee9a2017-08-22 04:02:52 -0700622 "../rtc_base:rtc_base_approved",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200623 "//third_party/abseil-cpp/absl/memory",
eladalon413ee9a2017-08-22 04:02:52 -0700624 ]
perkj488c5dc2017-02-08 05:55:51 -0800625}
626
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200627rtc_source_set("fake_video_codecs") {
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -0500628 allow_poison = [ "software_video_codecs" ]
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200629 visibility = [ "*" ]
630 sources = [
631 "configurable_frame_size_encoder.cc",
632 "configurable_frame_size_encoder.h",
633 "fake_decoder.cc",
634 "fake_decoder.h",
635 "fake_encoder.cc",
636 "fake_encoder.h",
Per Kjellander841c9122018-10-04 18:40:28 +0200637 "fake_vp8_decoder.cc",
638 "fake_vp8_decoder.h",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200639 "fake_vp8_encoder.cc",
640 "fake_vp8_encoder.h",
641 ]
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200642 deps = [
Elad Alon8f01c4e2019-06-28 15:19:43 +0200643 "../api:fec_controller_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100644 "../api:scoped_refptr",
Danil Chapovalov471783f2019-03-11 14:26:02 +0100645 "../api/task_queue",
Niels Möller4dc66c52018-10-05 14:17:58 +0200646 "../api/video:encoded_image",
Yves Gerey3e707812018-11-28 16:47:49 +0100647 "../api/video:video_bitrate_allocation",
648 "../api/video:video_frame",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200649 "../api/video:video_frame_i420",
Chen Xing5d24b162019-06-10 12:59:38 +0200650 "../api/video:video_rtp_headers",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200651 "../api/video_codecs:video_codecs_api",
Elad Aloncde8ab22019-03-20 11:56:20 +0100652 "../api/video_codecs:vp8_temporal_layers_factory",
Artem Titov94b57c02019-03-21 13:35:10 +0100653 "../common_video",
Yves Gerey3e707812018-11-28 16:47:49 +0100654 "../modules:module_api",
655 "../modules/video_coding:codec_globals_headers",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200656 "../modules/video_coding:video_codec_interface",
657 "../modules/video_coding:video_coding_utility",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200658 "../modules/video_coding:webrtc_vp8",
659 "../modules/video_coding:webrtc_vp9",
660 "../rtc_base:checks",
661 "../rtc_base:rtc_base_approved",
662 "../rtc_base:rtc_task_queue",
Sebastian Janssonb55015e2019-04-09 13:44:04 +0200663 "../rtc_base/synchronization:sequence_checker",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200664 "../system_wrappers",
Niels Möllerd7380712019-03-06 10:09:47 +0100665 "//third_party/abseil-cpp/absl/memory",
Yves Gerey3e707812018-11-28 16:47:49 +0100666 "//third_party/abseil-cpp/absl/types:optional",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200667 ]
668}
669
Danil Chapovalovce928172019-04-24 18:17:42 +0200670rtc_source_set("null_transport") {
671 testonly = true
672 sources = [
673 "null_transport.cc",
674 "null_transport.h",
675 ]
676 deps = [
677 "../api:transport_api",
678 ]
679}
680
681rtc_source_set("encoder_settings") {
682 testonly = true
683 sources = [
684 "encoder_settings.cc",
685 "encoder_settings.h",
686 ]
687 deps = [
688 "../api:scoped_refptr",
689 "../api/video_codecs:video_codecs_api",
690 "../call:rtp_interfaces",
691 "../call:video_stream_api",
692 "../rtc_base:checks",
693 "../rtc_base:refcount",
694 ]
695}
696
ehmaldonado38a21322016-09-02 04:10:34 -0700697rtc_source_set("test_common") {
kjellander0f380d82016-06-01 04:48:26 -0700698 testonly = true
699 sources = [
700 "call_test.cc",
701 "call_test.h",
kjellander0f380d82016-06-01 04:48:26 -0700702 "drifting_clock.cc",
703 "drifting_clock.h",
sakal55d932b2016-09-30 06:19:08 -0700704 "fake_videorenderer.h",
kjellander0f380d82016-06-01 04:48:26 -0700705 "layer_filtering_transport.cc",
706 "layer_filtering_transport.h",
Danil Chapovalovdd7e2842018-03-09 15:37:03 +0000707 "mock_transport.cc",
kjellander0f380d82016-06-01 04:48:26 -0700708 "mock_transport.h",
kjellander0f380d82016-06-01 04:48:26 -0700709 "rtp_rtcp_observer.h",
Niels Möllercbcbc222018-09-28 09:07:24 +0200710 "video_decoder_proxy_factory.h",
711 "video_encoder_proxy_factory.h",
kjellander0f380d82016-06-01 04:48:26 -0700712 ]
Robin Raymondce1b1402018-11-22 20:10:11 -0500713 if (current_os != "winuwp") {
714 # The filtering of *_win.cc is not done for WinUWP (intentionally) as
715 # most _win.cc files are compatible with WinUWP. However, the
716 # peek/dispatch Win32 runloops are entirely WinUWP incompatible thus
717 # WinUWP uses the generic runloop as defined for non-Windows targets.
718 sources += [ "win/run_loop_win.cc" ]
719 }
720 if (!is_win || current_os == "winuwp") {
kjellander0f380d82016-06-01 04:48:26 -0700721 sources += [
722 "run_loop.cc",
723 "run_loop.h",
724 ]
725 }
726
kjellander0f380d82016-06-01 04:48:26 -0700727 deps = [
perkj488c5dc2017-02-08 05:55:51 -0800728 ":direct_transport",
Danil Chapovalovce928172019-04-24 18:17:42 +0200729 ":encoder_settings",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200730 ":fake_video_codecs",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100731 ":fileutils",
kjellander0f380d82016-06-01 04:48:26 -0700732 ":rtp_test_utils",
733 ":test_support",
perkjc5726c12017-03-01 03:37:08 -0800734 ":video_test_common",
Patrik Höglundbe214a22018-01-04 12:14:35 +0100735 "../api:libjingle_peerconnection_api",
Niels Mölleref1052a2019-03-20 08:40:23 +0100736 "../api:rtp_headers",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100737 "../api:scoped_refptr",
Artem Titov46c4e602018-08-17 14:26:54 +0200738 "../api:simulated_network_api",
mbonadei3edccb92017-06-01 04:47:20 -0700739 "../api:transport_api",
mbonadei3edccb92017-06-01 04:47:20 -0700740 "../api/audio_codecs:builtin_audio_decoder_factory",
ossueb1fde42017-05-02 06:46:30 -0700741 "../api/audio_codecs:builtin_audio_encoder_factory",
Danil Chapovalova92e6242019-04-18 10:58:56 +0200742 "../api/task_queue",
743 "../api/task_queue:default_task_queue_factory",
Danil Chapovalovddc84e92018-10-24 17:01:58 +0200744 "../api/test/video:function_video_factory",
Jiawei Ouc2ebe212018-11-08 10:02:56 -0800745 "../api/video:builtin_video_bitrate_allocator_factory",
746 "../api/video:video_bitrate_allocator_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200747 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +0200748 "../api/video:video_rtp_headers",
ilnikd60d06a2017-04-05 03:02:20 -0700749 "../api/video_codecs:video_codecs_api",
kjellander94cee312016-06-10 01:56:57 -0700750 "../audio",
kjellander94cee312016-06-10 01:56:57 -0700751 "../call",
Mirko Bonadeia0e1a552017-12-04 10:50:51 +0100752 "../call:call_interfaces",
Artem Titov4e199e92018-08-20 13:30:39 +0200753 "../call:fake_network",
sprangdb2a9fc2017-08-09 06:42:32 -0700754 "../call:rtp_sender",
Artem Titov4e199e92018-08-20 13:30:39 +0200755 "../call:simulated_network",
Artem Titov46c4e602018-08-17 14:26:54 +0200756 "../call:simulated_packet_receiver",
aleloi440b6d92017-08-22 05:43:23 -0700757 "../call:video_stream_api",
mbonadei3edccb92017-06-01 04:47:20 -0700758 "../logging:rtc_event_log_api",
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800759 "../media:rtc_internal_video_codecs",
Mirko Bonadeiad627922017-11-30 17:16:21 +0100760 "../media:rtc_media_base",
Artem Titov3faa8322018-03-07 14:44:00 +0100761 "../modules/audio_device",
Paulina Hensman7bd79a02018-03-15 12:44:12 +0100762 "../modules/audio_device:audio_device_impl",
mbonadei3edccb92017-06-01 04:47:20 -0700763 "../modules/audio_device:mock_audio_device",
aleloi10111bc2016-11-17 06:48:48 -0800764 "../modules/audio_mixer:audio_mixer_impl",
aleloidd310712016-11-17 06:28:59 -0800765 "../modules/audio_processing",
mbonadei3edccb92017-06-01 04:47:20 -0700766 "../modules/rtp_rtcp",
767 "../modules/rtp_rtcp:mock_rtp_rtcp",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100768 "../modules/rtp_rtcp:rtp_rtcp_format",
Yves Gerey3e707812018-11-28 16:47:49 +0100769 "../modules/rtp_rtcp:rtp_video_header",
770 "../modules/video_coding:codec_globals_headers",
charujaincb728ea2017-09-18 03:08:08 -0700771 "../modules/video_coding:video_coding_utility",
mbonadei3edccb92017-06-01 04:47:20 -0700772 "../modules/video_coding:webrtc_h264",
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800773 "../modules/video_coding:webrtc_multiplex",
Sergio Garcia Murillo43800f92018-06-21 16:16:38 +0200774 "../modules/video_coding:webrtc_vp8",
mbonadei3edccb92017-06-01 04:47:20 -0700775 "../modules/video_coding:webrtc_vp9",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100776 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700777 "../rtc_base:rtc_base_approved",
Yves Gerey79e9f4b2019-04-13 18:59:53 +0200778 "../rtc_base:rtc_numerics",
mbonadei3edccb92017-06-01 04:47:20 -0700779 "../system_wrappers",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200780 "../system_wrappers:field_trial",
kjellander94cee312016-06-10 01:56:57 -0700781 "../video",
kjellander0f380d82016-06-01 04:48:26 -0700782 "//testing/gtest",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200783 "//third_party/abseil-cpp/absl/memory",
Elad Alond8d32482019-02-18 23:45:57 +0100784 "//third_party/abseil-cpp/absl/types:optional",
kjellander0f380d82016-06-01 04:48:26 -0700785 ]
mbonadei148d5a22017-04-28 05:24:50 -0700786 if (!is_android && !build_with_chromium) {
oprypin92220ff2017-03-23 03:40:03 -0700787 deps += [ "../modules/video_capture:video_capture_internal_impl" ]
788 }
kjellander0f380d82016-06-01 04:48:26 -0700789}
790
ehmaldonado38a21322016-09-02 04:10:34 -0700791rtc_source_set("test_renderer") {
Kári Tristan Helgasonede7cb22019-03-06 10:34:09 +0100792 public_deps = [ # no-presubmit-check TODO(webrtc:8603)
mbonadei9c296b32017-09-05 05:11:41 -0700793 ":test_renderer_generic",
794 ]
kjellander0f380d82016-06-01 04:48:26 -0700795 testonly = true
mbonadeicd95a4e2017-08-23 23:55:54 -0700796 if (is_mac) {
Kári Tristan Helgasonede7cb22019-03-06 10:34:09 +0100797 public_deps += [ ":test_renderer_objc" ] # no-presubmit-check TODO(webrtc:8603)
mbonadeicd95a4e2017-08-23 23:55:54 -0700798 }
799}
800
801if (is_mac) {
802 rtc_source_set("test_renderer_objc") {
803 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700804 visibility = [ ":test_renderer" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700805 sources = [
806 "mac/video_renderer_mac.h",
807 "mac/video_renderer_mac.mm",
808 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700809 deps = [
mbonadei9c296b32017-09-05 05:11:41 -0700810 ":test_renderer_generic",
mbonadeicd95a4e2017-08-23 23:55:54 -0700811 "../rtc_base:rtc_base_approved",
812 ]
813 libs = [
814 "Cocoa.framework",
815 "OpenGL.framework",
816 "CoreVideo.framework",
817 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700818 }
819}
820
821rtc_source_set("test_renderer_generic") {
822 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700823 visibility = [
824 ":test_renderer",
825 ":test_renderer_objc",
826 ]
kjellander0f380d82016-06-01 04:48:26 -0700827 libs = []
828 sources = [
kjellander0f380d82016-06-01 04:48:26 -0700829 "video_renderer.cc",
830 "video_renderer.h",
831 "win/d3d_renderer.cc",
832 "win/d3d_renderer.h",
833 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700834 deps = [
835 ":test_support",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100836 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200837 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +0200838 "../api/video:video_rtp_headers",
mbonadeicd95a4e2017-08-23 23:55:54 -0700839 "../common_video",
Mirko Bonadeiad627922017-11-30 17:16:21 +0100840 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100841 "../rtc_base:checks",
mbonadeicd95a4e2017-08-23 23:55:54 -0700842 "../rtc_base:rtc_base_approved",
843 "//testing/gtest",
844 ]
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100845 if (!(is_linux && rtc_use_x11) && !is_mac && !is_win) {
kjellander0f380d82016-06-01 04:48:26 -0700846 sources += [ "null_platform_renderer.cc" ]
847 }
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100848 if ((is_linux && rtc_use_x11) || is_mac) {
kjellander0f380d82016-06-01 04:48:26 -0700849 sources += [
850 "gl/gl_renderer.cc",
851 "gl/gl_renderer.h",
852 ]
853 }
854
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100855 if (is_linux && rtc_use_x11) {
Edward Lemur84a87c42017-11-07 19:07:31 +0100856 sources += [
857 "linux/glx_renderer.cc",
858 "linux/glx_renderer.h",
859 "linux/video_renderer_linux.cc",
860 ]
kjellander0f380d82016-06-01 04:48:26 -0700861 libs += [
862 "Xext",
863 "X11",
864 "GL",
865 ]
866 }
867 if (is_android) {
868 libs += [
869 "GLESv2",
870 "log",
871 ]
872 }
kjellander0f380d82016-06-01 04:48:26 -0700873}
kwiberg37e99fd2017-04-10 05:15:48 -0700874
875rtc_source_set("audio_codec_mocks") {
876 testonly = true
877 sources = [
Niels Möller3f651d82018-12-19 15:06:17 +0100878 # TODO(nisse): Move these factories to their own target, to avoid
879 # unnecessary dependencies on gmock and gtest.
Niels Möllerb7180c02018-12-06 13:07:11 +0100880 "audio_decoder_proxy_factory.h",
Niels Möllera0f44302018-11-30 10:45:12 +0100881 "function_audio_decoder_factory.h",
kwiberg2b3aa142017-06-14 03:31:17 -0700882 "mock_audio_decoder.cc",
kwiberg37e99fd2017-04-10 05:15:48 -0700883 "mock_audio_decoder.h",
884 "mock_audio_decoder_factory.h",
ossueb1fde42017-05-02 06:46:30 -0700885 "mock_audio_encoder.cc",
886 "mock_audio_encoder.h",
887 "mock_audio_encoder_factory.h",
888 ]
889
890 deps = [
mbonadei3edccb92017-06-01 04:47:20 -0700891 ":test_support",
kwiberg529662a2017-09-04 05:43:17 -0700892 "../api:array_view",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100893 "../api:scoped_refptr",
ossueb1fde42017-05-02 06:46:30 -0700894 "../api/audio_codecs:audio_codecs_api",
mbonadei3edccb92017-06-01 04:47:20 -0700895 "../api/audio_codecs:builtin_audio_decoder_factory",
Niels Möllera0f44302018-11-30 10:45:12 +0100896 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700897 "../rtc_base:rtc_base_approved",
Niels Möllera0f44302018-11-30 10:45:12 +0100898 "//third_party/abseil-cpp/absl/memory",
kwiberg37e99fd2017-04-10 05:15:48 -0700899 ]
900}
sakald7fdb802017-05-26 01:51:53 -0700901
Artem Titov66a29b92019-01-15 14:43:20 +0100902rtc_source_set("copy_to_file_audio_capturer") {
903 testonly = true
904 sources = [
905 "testsupport/copy_to_file_audio_capturer.cc",
906 "testsupport/copy_to_file_audio_capturer.h",
907 ]
908 deps = [
909 "../api:array_view",
Artem Titov94b57c02019-03-21 13:35:10 +0100910 "../common_audio",
Artem Titov66a29b92019-01-15 14:43:20 +0100911 "../modules/audio_device:audio_device_impl",
912 "../rtc_base:rtc_base_approved",
913 "//third_party/abseil-cpp/absl/memory",
914 "//third_party/abseil-cpp/absl/types:optional",
915 ]
916}
917
918rtc_source_set("copy_to_file_audio_capturer_unittest") {
919 testonly = true
920 sources = [
921 "testsupport/copy_to_file_audio_capturer_unittest.cc",
922 ]
923 deps = [
924 ":copy_to_file_audio_capturer",
925 ":fileutils",
926 ":test_support",
927 "../modules/audio_device:audio_device_impl",
928 "//third_party/abseil-cpp/absl/memory",
929 ]
930}
931
sakald7fdb802017-05-26 01:51:53 -0700932if (!build_with_chromium && is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000933 rtc_android_library("native_test_java") {
sakald7fdb802017-05-26 01:51:53 -0700934 testonly = true
935 java_files = [
936 "android/org/webrtc/native_test/RTCNativeUnitTest.java",
937 "android/org/webrtc/native_test/RTCNativeUnitTestActivity.java",
938 ]
939 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700940 "../rtc_base:base_java",
sakald7fdb802017-05-26 01:51:53 -0700941 "//testing/android/native_test:native_test_java",
sakald7fdb802017-05-26 01:51:53 -0700942 ]
943 }
944}
Benjamin Wright8efafdf2019-01-11 10:48:42 -0800945
946rtc_source_set("call_config_utils") {
Mirko Bonadei2c9d5e42019-07-15 13:17:48 +0200947 # TODO(bugs.webrtc.org/10814): Remove rtc_json_suppressions as soon as it
948 # gets removed upstream.
949 public_configs = [ "../rtc_base:rtc_json_suppressions" ]
Benjamin Wright8efafdf2019-01-11 10:48:42 -0800950 sources = [
951 "call_config_utils.cc",
952 "call_config_utils.h",
953 ]
954 deps = [
955 "../call:call_interfaces",
956 "../call:video_stream_api",
957 "../rtc_base:rtc_json",
958 ]
959}