blob: 70e554f9c671f6a0b5fbd00218d2bd19e6407b2e [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",
Artem Titovb6c62012019-01-08 14:58:23 +010026 "pc/e2e/api:peer_connection_quality_test_fixture_api",
kjellander0f380d82016-06-01 04:48:26 -070027 ]
mbonadei148d5a22017-04-28 05:24:50 -070028
oprypinfbbba3f2017-09-25 08:34:41 -070029 if (rtc_include_tests) {
mbonadei148d5a22017-04-28 05:24:50 -070030 deps += [
31 ":test_main",
32 ":test_support_unittests",
Sebastian Jansson98b07e92018-09-27 13:47:01 +020033 "scenario/scenario_tests",
mbonadei148d5a22017-04-28 05:24:50 -070034 ]
35 }
kjellander0f380d82016-06-01 04:48:26 -070036}
37
ehmaldonado38a21322016-09-02 04:10:34 -070038rtc_source_set("video_test_common") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000039 visibility = [ "*" ]
kjellander0f380d82016-06-01 04:48:26 -070040 testonly = true
41 sources = [
42 "fake_texture_frame.cc",
43 "fake_texture_frame.h",
44 "frame_generator.cc",
45 "frame_generator.h",
ehmaldonado656610f2017-02-06 02:21:11 -080046 "frame_generator_capturer.cc",
47 "frame_generator_capturer.h",
kjellander0f380d82016-06-01 04:48:26 -070048 "frame_utils.cc",
49 "frame_utils.h",
Sebastian Janssonf1f363f2018-08-13 14:24:58 +020050 "test_video_capturer.cc",
51 "test_video_capturer.h",
ehmaldonado656610f2017-02-06 02:21:11 -080052 "vcm_capturer.cc",
53 "vcm_capturer.h",
mflodman351424e2017-08-10 02:43:14 -070054 "video_codec_settings.h",
kjellander0f380d82016-06-01 04:48:26 -070055 ]
56
kjellandere40a7ee2016-10-16 23:56:12 -070057 if (!build_with_chromium && is_clang) {
58 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070059 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -070060 }
61
62 deps = [
mbonadei3edccb92017-06-01 04:47:20 -070063 "..:webrtc_common",
Patrik Höglund9e194032018-01-04 15:58:20 +010064 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +020065 "../api/video:video_frame",
Emircan Uysaler0823eec2018-07-13 17:10:00 -070066 "../api/video:video_frame_i010",
Niels Möllerc6ce9c52018-05-11 11:15:30 +020067 "../api/video:video_frame_i420",
mflodman351424e2017-08-10 02:43:14 -070068 "../api/video_codecs:video_codecs_api",
aleloi440b6d92017-08-22 05:43:23 -070069 "../call:video_stream_api",
kjellander0f380d82016-06-01 04:48:26 -070070 "../common_video",
sprangc5d62e22017-04-02 23:53:04 -070071 "../media:rtc_media_base",
ehmaldonado656610f2017-02-06 02:21:11 -080072 "../modules/video_capture:video_capture_module",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010073 "../rtc_base:checks",
Patrik Höglund76df0df2017-12-19 11:50:21 +010074 "../rtc_base:rtc_base",
ehmaldonadof6a861a2017-07-19 10:40:47 -070075 "../rtc_base:rtc_task_queue",
mbonadei3edccb92017-06-01 04:47:20 -070076 "../system_wrappers",
Danil Chapovalovabd42732018-09-10 14:07:45 +020077 "//third_party/abseil-cpp/absl/memory",
Danil Chapovalov431abd92018-06-18 12:54:17 +020078 "//third_party/abseil-cpp/absl/types:optional",
kjellander0f380d82016-06-01 04:48:26 -070079 ]
80}
81
ehmaldonado38a21322016-09-02 04:10:34 -070082rtc_source_set("rtp_test_utils") {
kjellander0f380d82016-06-01 04:48:26 -070083 testonly = true
84 sources = [
85 "rtcp_packet_parser.cc",
86 "rtcp_packet_parser.h",
87 "rtp_file_reader.cc",
88 "rtp_file_reader.h",
89 "rtp_file_writer.cc",
90 "rtp_file_writer.h",
91 ]
92
kjellandere40a7ee2016-10-16 23:56:12 -070093 if (!build_with_chromium && is_clang) {
94 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070095 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -070096 }
97
98 deps = [
99 "..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -0700100 "../api:array_view",
kjellander0f380d82016-06-01 04:48:26 -0700101 "../modules/rtp_rtcp",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100102 "../modules/rtp_rtcp:rtp_rtcp_format",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100103 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700104 "../rtc_base:rtc_base_approved",
Niels Möllera12c42a2018-07-25 16:05:48 +0200105 "../rtc_base/system:arch",
kjellander0f380d82016-06-01 04:48:26 -0700106 "//testing/gtest",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000107 ]
108}
109
ehmaldonado38a21322016-09-02 04:10:34 -0700110rtc_source_set("field_trial") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000111 visibility = [ "*" ]
kjellander0f380d82016-06-01 04:48:26 -0700112 testonly = true
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000113 sources = [
114 "field_trial.cc",
115 "field_trial.h",
116 ]
117
118 deps = [
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000119 "..:webrtc_common",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200120 "../system_wrappers:field_trial",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000121 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000122}
123
Edward Lemure66572b2018-01-05 15:34:09 +0100124rtc_source_set("perf_test") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000125 visibility = [ "*" ]
Edward Lemure66572b2018-01-05 15:34:09 +0100126 sources = [
127 "testsupport/perf_test.cc",
128 "testsupport/perf_test.h",
129 ]
130 deps = [
131 "..:webrtc_common",
132 "../api:array_view",
Oleh Prypind136b282018-10-03 13:53:44 +0200133 "../rtc_base:checks",
Edward Lemure66572b2018-01-05 15:34:09 +0100134 "../rtc_base:rtc_base_approved",
135 ]
136}
137
mbonadeicd95a4e2017-08-23 23:55:54 -0700138if (is_ios) {
139 rtc_source_set("test_support_objc") {
140 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700141 visibility = [ ":test_support" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700142 sources = [
Artem Titarenko34fc3462018-11-06 12:29:29 +0100143 "ios/coverage_util_ios.h",
144 "ios/coverage_util_ios.mm",
mbonadeicd95a4e2017-08-23 23:55:54 -0700145 "ios/test_support.h",
146 "ios/test_support.mm",
147 ]
denicijad207a392017-09-11 06:43:28 -0700148 deps = [
Edward Lemure66572b2018-01-05 15:34:09 +0100149 ":perf_test",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200150 "../sdk:helpers_objc",
denicijad207a392017-09-11 06:43:28 -0700151 ]
Artem Titarenko34fc3462018-11-06 12:29:29 +0100152 configs += [ ":test_support_objc_config" ]
153 }
154
155 config("test_support_objc_config") {
156 defines = []
157
158 if (use_clang_coverage) {
159 defines += [ "WEBRTC_IOS_ENABLE_COVERAGE" ]
160 }
mbonadeicd95a4e2017-08-23 23:55:54 -0700161 }
162}
163
Patrik Höglund34924c22018-01-19 09:11:07 +0100164config("suppress_warning_4373") {
165 if (is_win) {
166 cflags = [
167 # MSVC has a bug which generates this warning when using mocks; see the
168 # section on warning 4373 in he googlemock FAQ. This warning isn't the
169 # least relevant for us, anyway.
170 "/wd4373",
171 ]
172 }
173}
174
Sebastian Jansson2afd2812018-08-23 14:44:05 +0200175config("test_main_direct_config") {
176 visibility = [ ":*" ]
177 defines = [ "UNIT_TEST" ]
178}
mbonadei148d5a22017-04-28 05:24:50 -0700179rtc_source_set("test_support") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000180 visibility = [ "*" ]
mbonadei148d5a22017-04-28 05:24:50 -0700181 testonly = true
kjellander32c4a202016-08-30 02:53:49 -0700182
Mirko Bonadei65ce3112018-01-26 11:57:47 +0100183 all_dependent_configs = [
184 ":suppress_warning_4373",
185 "//third_party/googletest:gmock_config",
186 "//third_party/googletest:gtest_config",
187 ]
Patrik Höglund34924c22018-01-19 09:11:07 +0100188
mbonadei148d5a22017-04-28 05:24:50 -0700189 sources = [
190 "gmock.h",
191 "gtest.h",
mbonadei148d5a22017-04-28 05:24:50 -0700192 ]
193
Patrik Höglund7696bef2018-03-15 15:05:39 +0100194 public_deps = []
Kári Tristan Helgasone2baffb2017-06-09 10:31:58 +0200195 if (is_ios) {
mbonadeicd95a4e2017-08-23 23:55:54 -0700196 public_deps += [ ":test_support_objc" ]
Kári Tristan Helgasone2baffb2017-06-09 10:31:58 +0200197 }
198
Sebastian Jansson2afd2812018-08-23 14:44:05 +0200199 public_configs = [ ":test_main_direct_config" ]
mbonadei148d5a22017-04-28 05:24:50 -0700200 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700201 "../rtc_base:rtc_base_approved",
mbonadei148d5a22017-04-28 05:24:50 -0700202 "//testing/gmock",
203 "//testing/gtest",
204 ]
205
mbonadei148d5a22017-04-28 05:24:50 -0700206 if (!build_with_chromium && is_clang) {
207 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
208 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
209 }
kjellander32c4a202016-08-30 02:53:49 -0700210}
211
oprypinfbbba3f2017-09-25 08:34:41 -0700212if (rtc_include_tests) {
Artem Titov40a7a352018-10-15 15:25:34 +0200213 rtc_source_set("test_main_lib") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000214 visibility = [ "*" ]
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200215 testonly = true
Oleh Prypin5ab68542017-09-25 09:18:00 +0000216 sources = [
Artem Titov40a7a352018-10-15 15:25:34 +0200217 "test_main_lib.cc",
218 "test_main_lib.h",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000219 ]
220
Oleh Prypin5ab68542017-09-25 09:18:00 +0000221 deps = [
222 ":field_trial",
Edward Lemure66572b2018-01-05 15:34:09 +0100223 ":perf_test",
Artem Titov40a7a352018-10-15 15:25:34 +0200224 ":test_support",
Yves Gerey3e707812018-11-28 16:47:49 +0100225 "../rtc_base:checks",
Niels Möller8909a632018-09-06 08:42:44 +0200226 "../rtc_base:rtc_base",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200227 "../system_wrappers:field_trial",
228 "../system_wrappers:metrics",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000229 "//testing/gtest",
Yves Gerey3e707812018-11-28 16:47:49 +0100230 "//third_party/abseil-cpp/absl/memory",
Patrik Höglund77301932018-10-09 15:09:51 +0200231
232 # TODO(bugs.webrtc.org/9792): This is needed for downstream projects on
233 # Android, where it's replaced by an internal version of fileutils that
234 # has a certain flag. Remove this once the internal fileutils has been
235 # eliminated.
236 "../test:fileutils",
mbonadei9452c622017-04-27 12:29:29 -0700237 ]
238 }
mbonadei9452c622017-04-27 12:29:29 -0700239
Artem Titov40a7a352018-10-15 15:25:34 +0200240 rtc_source_set("test_main") {
241 visibility = [ "*" ]
242 testonly = true
243 sources = [
244 "test_main.cc",
245 ]
246
247 deps = [
248 ":test_main_lib",
249 ]
250 }
251
Oleh Prypin5ab68542017-09-25 09:18:00 +0000252 rtc_source_set("video_test_support") {
253 testonly = true
254
255 sources = [
256 "testsupport/frame_reader.h",
257 "testsupport/frame_writer.h",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000258 "testsupport/mock/mock_frame_reader.h",
Artem Titov08a9b612019-01-17 21:37:19 +0100259 "testsupport/video_frame_writer.cc",
260 "testsupport/video_frame_writer.h",
Artem Titov645df9e2019-01-14 14:21:59 +0100261 "testsupport/y4m_frame_reader.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000262 "testsupport/y4m_frame_writer.cc",
263 "testsupport/yuv_frame_reader.cc",
264 "testsupport/yuv_frame_writer.cc",
265 ]
266
267 deps = [
Patrik Höglund7696bef2018-03-15 15:05:39 +0100268 ":fileutils",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000269 ":test_support",
270 ":video_test_common",
271 "..:webrtc_common",
Artem Titov08a9b612019-01-17 21:37:19 +0100272 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200273 "../api/video:video_frame",
274 "../api/video:video_frame_i420",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000275 "../common_video",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100276 "../rtc_base:checks",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000277 "../rtc_base:rtc_base_approved",
278 "../system_wrappers",
Artem Titov08a9b612019-01-17 21:37:19 +0100279 "//third_party/abseil-cpp/absl/memory:memory",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100280 "//third_party/libyuv",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000281 ]
282
283 if (!is_ios) {
284 deps += [ "//third_party:jpeg" ]
285 sources += [ "testsupport/jpeg_frame_writer.cc" ]
286 } else {
287 sources += [ "testsupport/jpeg_frame_writer_ios.cc" ]
288 }
289
Oleh Prypin5ab68542017-09-25 09:18:00 +0000290 if (!build_with_chromium && is_clang) {
291 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
292 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
293 }
294
295 if (is_android) {
296 deps += [ "//base:base" ]
297 }
Oleh Prypin5ab68542017-09-25 09:18:00 +0000298 }
299
Edward Lemuraf8659a2017-09-27 14:46:24 +0200300 rtc_source_set("test_support_test_artifacts") {
Oleh Prypin5ab68542017-09-25 09:18:00 +0000301 testonly = true
302 sources = [
Edward Lemuraf8659a2017-09-27 14:46:24 +0200303 "testsupport/test_artifacts.cc",
304 "testsupport/test_artifacts.h",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000305 ]
306 deps = [
307 ":fileutils",
308 "../rtc_base:rtc_base_approved",
309 ]
310 }
311
312 test_support_unittests_resources = [
313 "../resources/foreman_cif_short.yuv",
314 "../resources/video_coding/frame-ethernet-ii.pcap",
315 "../resources/video_coding/frame-loopback.pcap",
316 "../resources/video_coding/pltype103.rtp",
317 "../resources/video_coding/pltype103_header_only.rtp",
318 "../resources/video_coding/ssrcs-2.pcap",
319 "../resources/video_coding/ssrcs-3.pcap",
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200320 ]
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200321
322 if (is_ios) {
Oleh Prypin5ab68542017-09-25 09:18:00 +0000323 bundle_data("test_support_unittests_bundle_data") {
324 testonly = true
325 sources = test_support_unittests_resources
326 outputs = [
327 "{{bundle_resources_dir}}/{{source_file_part}}",
328 ]
329 }
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200330 }
331
Oleh Prypin5ab68542017-09-25 09:18:00 +0000332 rtc_test("test_support_unittests") {
333 deps = [
Benjamin Wright9db8b882019-01-14 15:30:20 -0800334 ":call_config_utils",
Artem Titov66a29b92019-01-15 14:43:20 +0100335 ":copy_to_file_audio_capturer_unittest",
Sebastian Jansson09408112018-04-24 14:41:22 +0200336 ":direct_transport",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200337 ":fake_video_codecs",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100338 ":fileutils",
Mirko Bonadei46399992018-08-22 15:32:38 +0200339 ":fileutils_unittests",
Edward Lemure66572b2018-01-05 15:34:09 +0100340 ":perf_test",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000341 ":rtp_test_utils",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200342 ":test_common",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200343 ":test_main",
344 ":test_support",
345 ":test_support_test_artifacts",
346 ":video_test_common",
347 ":video_test_support",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200348 "../api:create_simulcast_test_fixture_api",
349 "../api:simulcast_test_fixture_api",
Danil Chapovalov99b71df2018-10-26 15:57:48 +0200350 "../api/test/video:function_video_factory",
Jiawei Ouc2ebe212018-11-08 10:02:56 -0800351 "../api/video:builtin_video_bitrate_allocator_factory",
Yves Gerey3e707812018-11-28 16:47:49 +0100352 "../api/video:video_frame",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200353 "../api/video:video_frame_i420",
Benjamin Wright9db8b882019-01-14 15:30:20 -0800354 "../call:video_stream_api",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200355 "../modules/rtp_rtcp:rtp_rtcp",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200356 "../modules/video_capture",
357 "../modules/video_coding:simulcast_test_fixture_impl",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000358 "../rtc_base:rtc_base_approved",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200359 "../test:single_threaded_task_queue",
Artem Titov4895b452019-01-14 16:54:04 +0100360 "pc/e2e:e2e_unittests",
Sebastian Jansson98b07e92018-09-27 13:47:01 +0200361 "scenario:scenario_unittests",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200362 "//testing/gmock",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200363 "//testing/gtest",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200364 "//third_party/abseil-cpp/absl/memory",
Artem Titov645df9e2019-01-14 14:21:59 +0100365 "//third_party/abseil-cpp/absl/strings",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000366 ]
367 sources = [
Benjamin Wright9db8b882019-01-14 15:30:20 -0800368 "call_config_utils_unittest.cc",
Sebastian Jansson09408112018-04-24 14:41:22 +0200369 "direct_transport_unittest.cc",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200370 "fake_vp8_encoder_unittest.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000371 "frame_generator_unittest.cc",
372 "rtp_file_reader_unittest.cc",
373 "rtp_file_writer_unittest.cc",
374 "single_threaded_task_queue_unittest.cc",
375 "testsupport/always_passing_unittest.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000376 "testsupport/perf_test_unittest.cc",
Edward Lemuraf8659a2017-09-27 14:46:24 +0200377 "testsupport/test_artifacts_unittest.cc",
Artem Titov08a9b612019-01-17 21:37:19 +0100378 "testsupport/video_frame_writer_unittest.cc",
Artem Titov645df9e2019-01-14 14:21:59 +0100379 "testsupport/y4m_frame_reader_unittest.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000380 "testsupport/y4m_frame_writer_unittest.cc",
381 "testsupport/yuv_frame_reader_unittest.cc",
382 "testsupport/yuv_frame_writer_unittest.cc",
383 ]
384
Oleh Prypin5ab68542017-09-25 09:18:00 +0000385 if (!build_with_chromium && is_clang) {
386 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
387 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
388 }
389
390 data = test_support_unittests_resources
391 if (is_android) {
392 deps += [ "//testing/android/native_test:native_test_support" ]
393 shard_timeout = 900
394 }
395
396 if (is_ios) {
397 deps += [ ":test_support_unittests_bundle_data" ]
398 }
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200399
Mirko Bonadei9098b302018-04-06 10:48:10 +0200400 if (!is_android && !build_with_chromium) {
401 # This is needed in order to avoid:
402 # undefined symbol: webrtc::videocapturemodule::VideoCaptureImpl::Create
403 deps += [ "../modules/video_capture:video_capture_internal_impl" ]
404 }
Oleh Prypin5ab68542017-09-25 09:18:00 +0000405 }
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200406}
407
mbonadeicd95a4e2017-08-23 23:55:54 -0700408if (is_ios) {
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200409 rtc_source_set("fileutils_ios_objc") {
Artem Titov8f726be2018-10-23 15:50:10 +0200410 visibility = [
411 ":fileutils",
412 ":fileutils_override_impl",
413 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700414 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800415 "testsupport/ios_file_utils.h",
416 "testsupport/ios_file_utils.mm",
Steve Antonaec15aa2019-01-11 09:13:07 -0800417 "testsupport/iosfileutils.h",
mbonadeicd95a4e2017-08-23 23:55:54 -0700418 ]
419 deps = [
420 "..:webrtc_common",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100421 "../rtc_base:checks",
mbonadeicd95a4e2017-08-23 23:55:54 -0700422 "../rtc_base:rtc_base_approved",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200423 "../sdk:helpers_objc",
mbonadeicd95a4e2017-08-23 23:55:54 -0700424 ]
425 }
426}
427
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200428if (is_mac) {
429 rtc_source_set("fileutils_mac_objc") {
Artem Titov8f726be2018-10-23 15:50:10 +0200430 visibility = [
431 ":fileutils",
432 ":fileutils_override_impl",
433 ]
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200434 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800435 "testsupport/mac_file_utils.h",
436 "testsupport/mac_file_utils.mm",
Steve Antonaec15aa2019-01-11 09:13:07 -0800437 "testsupport/macfileutils.h",
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200438 ]
439 deps = [
440 "../rtc_base:checks",
441 ]
442 }
443}
444
mbonadei9452c622017-04-27 12:29:29 -0700445rtc_source_set("fileutils") {
446 testonly = true
Patrik Höglund7696bef2018-03-15 15:05:39 +0100447 visibility = [ "*" ]
mbonadei9452c622017-04-27 12:29:29 -0700448 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800449 "testsupport/file_utils.cc",
450 "testsupport/file_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800451 "testsupport/fileutils.h",
mbonadei9452c622017-04-27 12:29:29 -0700452 ]
mbonadei3edccb92017-06-01 04:47:20 -0700453 deps = [
Artem Titov8f726be2018-10-23 15:50:10 +0200454 ":fileutils_override_api",
455 ":fileutils_override_impl",
456 "..:webrtc_common",
457 "../rtc_base:checks",
458 "../rtc_base:rtc_base_approved",
459 "../rtc_base/system:arch",
460 "//third_party/abseil-cpp/absl/types:optional",
461 ]
462 if (is_ios) {
463 deps += [ ":fileutils_ios_objc" ]
464 }
465 if (is_mac) {
466 deps += [ ":fileutils_mac_objc" ]
467 }
468 if (is_win) {
469 deps += [ "../rtc_base:rtc_base" ]
470 }
471}
472
473# We separate header into own target to make it possible for downstream
474# projects to override implementation.
475rtc_source_set("fileutils_override_api") {
476 testonly = true
477 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800478 "testsupport/file_utils_override.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800479 "testsupport/fileutils_override.h",
Artem Titov8f726be2018-10-23 15:50:10 +0200480 ]
481}
482
483rtc_source_set("fileutils_override_impl") {
484 testonly = true
485 visibility = [ ":fileutils" ]
486 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800487 "testsupport/file_utils_override.cc",
Artem Titov8f726be2018-10-23 15:50:10 +0200488 ]
489 deps = [
490 ":fileutils_override_api",
mbonadei3edccb92017-06-01 04:47:20 -0700491 "..:webrtc_common",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100492 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700493 "../rtc_base:rtc_base_approved",
Niels Möllera12c42a2018-07-25 16:05:48 +0200494 "../rtc_base/system:arch",
Danil Chapovalov431abd92018-06-18 12:54:17 +0200495 "//third_party/abseil-cpp/absl/types:optional",
mbonadei3edccb92017-06-01 04:47:20 -0700496 ]
mbonadei9452c622017-04-27 12:29:29 -0700497 if (is_ios) {
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200498 deps += [ ":fileutils_ios_objc" ]
499 }
500 if (is_mac) {
501 deps += [ ":fileutils_mac_objc" ]
mbonadei3edccb92017-06-01 04:47:20 -0700502 }
503 if (is_win) {
ehmaldonadof6a861a2017-07-19 10:40:47 -0700504 deps += [ "../rtc_base:rtc_base" ]
mbonadei9452c622017-04-27 12:29:29 -0700505 }
mbonadei9452c622017-04-27 12:29:29 -0700506}
507
508rtc_source_set("run_test") {
509 testonly = true
mbonadeicd95a4e2017-08-23 23:55:54 -0700510 if (is_mac) {
511 public_deps = [
512 ":run_test_objc",
513 ]
514 } else {
515 public_deps = [
516 ":run_test_generic",
517 ]
518 }
519}
520
521rtc_source_set("run_test_interface") {
mbonadei9452c622017-04-27 12:29:29 -0700522 sources = [
523 "run_test.h",
524 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700525}
526
527if (is_mac) {
528 rtc_source_set("run_test_objc") {
529 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700530 visibility = [ ":run_test" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700531 sources = [
532 "mac/run_test.mm",
533 ]
mbonadei9c296b32017-09-05 05:11:41 -0700534 deps = [
mbonadeicd95a4e2017-08-23 23:55:54 -0700535 ":run_test_interface",
536 ]
mbonadei9452c622017-04-27 12:29:29 -0700537 }
538}
539
mbonadeicd95a4e2017-08-23 23:55:54 -0700540rtc_source_set("run_test_generic") {
541 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700542 visibility = [ ":run_test" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700543 sources = [
544 "run_test.cc",
545 ]
mbonadei9c296b32017-09-05 05:11:41 -0700546 deps = [
mbonadeicd95a4e2017-08-23 23:55:54 -0700547 ":run_test_interface",
548 ]
549}
550
ehmaldonado37535bf2016-12-05 06:42:45 -0800551rtc_source_set("fileutils_unittests") {
552 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700553 visibility = [ ":*" ] # Only targets in this file can depend on this.
ehmaldonado37535bf2016-12-05 06:42:45 -0800554 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800555 "testsupport/file_utils_unittest.cc",
ehmaldonado37535bf2016-12-05 06:42:45 -0800556 ]
557 deps = [
558 ":fileutils",
mbonadei3edccb92017-06-01 04:47:20 -0700559 ":test_support",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100560 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700561 "../rtc_base:rtc_base_approved",
ehmaldonado37535bf2016-12-05 06:42:45 -0800562 "//testing/gtest",
Danil Chapovalov431abd92018-06-18 12:54:17 +0200563 "//third_party/abseil-cpp/absl/types:optional",
ehmaldonado37535bf2016-12-05 06:42:45 -0800564 ]
565}
kjellander0f380d82016-06-01 04:48:26 -0700566
perkj488c5dc2017-02-08 05:55:51 -0800567rtc_source_set("direct_transport") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000568 visibility = [ "*" ]
perkj488c5dc2017-02-08 05:55:51 -0800569 testonly = true
570 sources = [
571 "direct_transport.cc",
572 "direct_transport.h",
perkj488c5dc2017-02-08 05:55:51 -0800573 ]
574 if (!build_with_chromium && is_clang) {
575 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
576 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
577 }
578 deps = [
mbonadei3edccb92017-06-01 04:47:20 -0700579 "..:webrtc_common",
Artem Titov46c4e602018-08-17 14:26:54 +0200580 "../api:simulated_network_api",
perkj488c5dc2017-02-08 05:55:51 -0800581 "../api:transport_api",
Mirko Bonadeia0e1a552017-12-04 10:50:51 +0100582 "../call:call_interfaces",
Artem Titov46c4e602018-08-17 14:26:54 +0200583 "../call:simulated_packet_receiver",
mbonadei3edccb92017-06-01 04:47:20 -0700584 "../modules/rtp_rtcp",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700585 "../rtc_base:rtc_base_approved",
eladalon413ee9a2017-08-22 04:02:52 -0700586 "../rtc_base:sequenced_task_checker",
mbonadei3edccb92017-06-01 04:47:20 -0700587 "../system_wrappers",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200588 "//third_party/abseil-cpp/absl/memory",
perkj488c5dc2017-02-08 05:55:51 -0800589 ]
eladalon413ee9a2017-08-22 04:02:52 -0700590 public_deps = [
591 ":single_threaded_task_queue",
Erik Språng09708512018-03-14 15:16:50 +0100592 "../call:fake_network",
eladalon413ee9a2017-08-22 04:02:52 -0700593 ]
594}
595
596rtc_source_set("single_threaded_task_queue") {
597 testonly = true
598 sources = [
599 "single_threaded_task_queue.cc",
600 "single_threaded_task_queue.h",
601 ]
602 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100603 "../rtc_base:checks",
eladalon413ee9a2017-08-22 04:02:52 -0700604 "../rtc_base:rtc_base_approved",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200605 "//third_party/abseil-cpp/absl/memory",
eladalon413ee9a2017-08-22 04:02:52 -0700606 ]
perkj488c5dc2017-02-08 05:55:51 -0800607}
608
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200609rtc_source_set("fake_video_codecs") {
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -0500610 allow_poison = [ "software_video_codecs" ]
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200611 visibility = [ "*" ]
612 sources = [
613 "configurable_frame_size_encoder.cc",
614 "configurable_frame_size_encoder.h",
615 "fake_decoder.cc",
616 "fake_decoder.h",
617 "fake_encoder.cc",
618 "fake_encoder.h",
Per Kjellander841c9122018-10-04 18:40:28 +0200619 "fake_vp8_decoder.cc",
620 "fake_vp8_decoder.h",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200621 "fake_vp8_encoder.cc",
622 "fake_vp8_encoder.h",
623 ]
624 if (!build_with_chromium && is_clang) {
625 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
626 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
627 }
628 deps = [
629 "..:webrtc_common",
Niels Möller4dc66c52018-10-05 14:17:58 +0200630 "../api/video:encoded_image",
Yves Gerey3e707812018-11-28 16:47:49 +0100631 "../api/video:video_bitrate_allocation",
632 "../api/video:video_frame",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200633 "../api/video:video_frame_i420",
Erik Språng4529fbc2018-10-12 10:30:31 +0200634 "../api/video_codecs:create_vp8_temporal_layers",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200635 "../api/video_codecs:video_codecs_api",
636 "../common_video:common_video",
Yves Gerey3e707812018-11-28 16:47:49 +0100637 "../modules:module_api",
638 "../modules/video_coding:codec_globals_headers",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200639 "../modules/video_coding:video_codec_interface",
640 "../modules/video_coding:video_coding_utility",
641 "../modules/video_coding:webrtc_h264",
642 "../modules/video_coding:webrtc_vp8",
643 "../modules/video_coding:webrtc_vp9",
644 "../rtc_base:checks",
645 "../rtc_base:rtc_base_approved",
646 "../rtc_base:rtc_task_queue",
647 "../rtc_base:sequenced_task_checker",
648 "../system_wrappers",
Yves Gerey3e707812018-11-28 16:47:49 +0100649 "//third_party/abseil-cpp/absl/types:optional",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200650 ]
651}
652
ehmaldonado38a21322016-09-02 04:10:34 -0700653rtc_source_set("test_common") {
kjellander0f380d82016-06-01 04:48:26 -0700654 testonly = true
655 sources = [
656 "call_test.cc",
657 "call_test.h",
kjellander0f380d82016-06-01 04:48:26 -0700658 "constants.cc",
659 "constants.h",
kjellander0f380d82016-06-01 04:48:26 -0700660 "drifting_clock.cc",
661 "drifting_clock.h",
662 "encoder_settings.cc",
663 "encoder_settings.h",
sakal55d932b2016-09-30 06:19:08 -0700664 "fake_videorenderer.h",
kjellander0f380d82016-06-01 04:48:26 -0700665 "layer_filtering_transport.cc",
666 "layer_filtering_transport.h",
Danil Chapovalovdd7e2842018-03-09 15:37:03 +0000667 "mock_transport.cc",
kjellander0f380d82016-06-01 04:48:26 -0700668 "mock_transport.h",
kjellander0f380d82016-06-01 04:48:26 -0700669 "null_transport.cc",
670 "null_transport.h",
671 "rtp_rtcp_observer.h",
672 "statistics.cc",
673 "statistics.h",
Niels Möllercbcbc222018-09-28 09:07:24 +0200674 "video_decoder_proxy_factory.h",
675 "video_encoder_proxy_factory.h",
kjellander0f380d82016-06-01 04:48:26 -0700676 ]
Robin Raymondce1b1402018-11-22 20:10:11 -0500677 if (current_os != "winuwp") {
678 # The filtering of *_win.cc is not done for WinUWP (intentionally) as
679 # most _win.cc files are compatible with WinUWP. However, the
680 # peek/dispatch Win32 runloops are entirely WinUWP incompatible thus
681 # WinUWP uses the generic runloop as defined for non-Windows targets.
682 sources += [ "win/run_loop_win.cc" ]
683 }
684 if (!is_win || current_os == "winuwp") {
kjellander0f380d82016-06-01 04:48:26 -0700685 sources += [
686 "run_loop.cc",
687 "run_loop.h",
688 ]
689 }
690
kjellandere40a7ee2016-10-16 23:56:12 -0700691 if (!build_with_chromium && is_clang) {
692 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700693 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -0700694 }
695
696 deps = [
perkj488c5dc2017-02-08 05:55:51 -0800697 ":direct_transport",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200698 ":fake_video_codecs",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100699 ":fileutils",
kjellander0f380d82016-06-01 04:48:26 -0700700 ":rtp_test_utils",
701 ":test_support",
perkjc5726c12017-03-01 03:37:08 -0800702 ":video_test_common",
Yves Gerey3e707812018-11-28 16:47:49 +0100703 "../:webrtc_common",
Patrik Höglundbe214a22018-01-04 12:14:35 +0100704 "../api:libjingle_peerconnection_api",
Artem Titov46c4e602018-08-17 14:26:54 +0200705 "../api:simulated_network_api",
mbonadei3edccb92017-06-01 04:47:20 -0700706 "../api:transport_api",
mbonadei3edccb92017-06-01 04:47:20 -0700707 "../api/audio_codecs:builtin_audio_decoder_factory",
ossueb1fde42017-05-02 06:46:30 -0700708 "../api/audio_codecs:builtin_audio_encoder_factory",
Danil Chapovalovddc84e92018-10-24 17:01:58 +0200709 "../api/test/video:function_video_factory",
Jiawei Ouc2ebe212018-11-08 10:02:56 -0800710 "../api/video:builtin_video_bitrate_allocator_factory",
711 "../api/video:video_bitrate_allocator_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200712 "../api/video:video_frame",
ilnikd60d06a2017-04-05 03:02:20 -0700713 "../api/video_codecs:video_codecs_api",
kjellander94cee312016-06-10 01:56:57 -0700714 "../audio",
kjellander94cee312016-06-10 01:56:57 -0700715 "../call",
Mirko Bonadeia0e1a552017-12-04 10:50:51 +0100716 "../call:call_interfaces",
Artem Titov4e199e92018-08-20 13:30:39 +0200717 "../call:fake_network",
Yves Gerey3e707812018-11-28 16:47:49 +0100718 "../call:rtp_interfaces",
sprangdb2a9fc2017-08-09 06:42:32 -0700719 "../call:rtp_sender",
Artem Titov4e199e92018-08-20 13:30:39 +0200720 "../call:simulated_network",
Artem Titov46c4e602018-08-17 14:26:54 +0200721 "../call:simulated_packet_receiver",
aleloi440b6d92017-08-22 05:43:23 -0700722 "../call:video_stream_api",
mbonadei3edccb92017-06-01 04:47:20 -0700723 "../logging:rtc_event_log_api",
Qingsi Wang970b0882018-02-01 11:04:46 -0800724 "../logging:rtc_event_log_impl_base",
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800725 "../media:rtc_internal_video_codecs",
Mirko Bonadeiad627922017-11-30 17:16:21 +0100726 "../media:rtc_media_base",
Artem Titov3faa8322018-03-07 14:44:00 +0100727 "../modules/audio_device",
Paulina Hensman7bd79a02018-03-15 12:44:12 +0100728 "../modules/audio_device:audio_device_impl",
mbonadei3edccb92017-06-01 04:47:20 -0700729 "../modules/audio_device:mock_audio_device",
aleloi10111bc2016-11-17 06:48:48 -0800730 "../modules/audio_mixer:audio_mixer_impl",
aleloidd310712016-11-17 06:28:59 -0800731 "../modules/audio_processing",
mbonadei3edccb92017-06-01 04:47:20 -0700732 "../modules/rtp_rtcp",
733 "../modules/rtp_rtcp:mock_rtp_rtcp",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100734 "../modules/rtp_rtcp:rtp_rtcp_format",
Yves Gerey3e707812018-11-28 16:47:49 +0100735 "../modules/rtp_rtcp:rtp_video_header",
736 "../modules/video_coding:codec_globals_headers",
charujaincb728ea2017-09-18 03:08:08 -0700737 "../modules/video_coding:video_coding_utility",
mbonadei3edccb92017-06-01 04:47:20 -0700738 "../modules/video_coding:webrtc_h264",
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800739 "../modules/video_coding:webrtc_multiplex",
Sergio Garcia Murillo43800f92018-06-21 16:16:38 +0200740 "../modules/video_coding:webrtc_vp8",
mbonadei3edccb92017-06-01 04:47:20 -0700741 "../modules/video_coding:webrtc_vp9",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100742 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700743 "../rtc_base:rtc_base_approved",
mbonadei3edccb92017-06-01 04:47:20 -0700744 "../system_wrappers",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200745 "../system_wrappers:field_trial",
kjellander94cee312016-06-10 01:56:57 -0700746 "../video",
kjellander0f380d82016-06-01 04:48:26 -0700747 "//testing/gtest",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200748 "//third_party/abseil-cpp/absl/memory",
kjellander0f380d82016-06-01 04:48:26 -0700749 ]
mbonadei148d5a22017-04-28 05:24:50 -0700750 if (!is_android && !build_with_chromium) {
oprypin92220ff2017-03-23 03:40:03 -0700751 deps += [ "../modules/video_capture:video_capture_internal_impl" ]
752 }
kjellander0f380d82016-06-01 04:48:26 -0700753}
754
ehmaldonado38a21322016-09-02 04:10:34 -0700755rtc_source_set("test_renderer") {
mbonadei9c296b32017-09-05 05:11:41 -0700756 public_deps = [
757 ":test_renderer_generic",
758 ]
kjellander0f380d82016-06-01 04:48:26 -0700759 testonly = true
mbonadeicd95a4e2017-08-23 23:55:54 -0700760 if (is_mac) {
mbonadei9c296b32017-09-05 05:11:41 -0700761 public_deps += [ ":test_renderer_objc" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700762 }
763}
764
765if (is_mac) {
766 rtc_source_set("test_renderer_objc") {
767 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700768 visibility = [ ":test_renderer" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700769 sources = [
770 "mac/video_renderer_mac.h",
771 "mac/video_renderer_mac.mm",
772 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700773 deps = [
mbonadei9c296b32017-09-05 05:11:41 -0700774 ":test_renderer_generic",
mbonadeicd95a4e2017-08-23 23:55:54 -0700775 "../rtc_base:rtc_base_approved",
776 ]
777 libs = [
778 "Cocoa.framework",
779 "OpenGL.framework",
780 "CoreVideo.framework",
781 ]
782 if (!build_with_chromium && is_clang) {
783 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
784 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
785 }
786 }
787}
788
789rtc_source_set("test_renderer_generic") {
790 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700791 visibility = [
792 ":test_renderer",
793 ":test_renderer_objc",
794 ]
kjellander0f380d82016-06-01 04:48:26 -0700795 libs = []
796 sources = [
kjellander0f380d82016-06-01 04:48:26 -0700797 "video_renderer.cc",
798 "video_renderer.h",
799 "win/d3d_renderer.cc",
800 "win/d3d_renderer.h",
801 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700802 deps = [
803 ":test_support",
804 "..:webrtc_common",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200805 "../api/video:video_frame",
mbonadeicd95a4e2017-08-23 23:55:54 -0700806 "../common_video",
Mirko Bonadeiad627922017-11-30 17:16:21 +0100807 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100808 "../rtc_base:checks",
mbonadeicd95a4e2017-08-23 23:55:54 -0700809 "../rtc_base:rtc_base_approved",
810 "//testing/gtest",
811 ]
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100812 if (!(is_linux && rtc_use_x11) && !is_mac && !is_win) {
kjellander0f380d82016-06-01 04:48:26 -0700813 sources += [ "null_platform_renderer.cc" ]
814 }
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100815 if ((is_linux && rtc_use_x11) || is_mac) {
kjellander0f380d82016-06-01 04:48:26 -0700816 sources += [
817 "gl/gl_renderer.cc",
818 "gl/gl_renderer.h",
819 ]
820 }
821
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100822 if (is_linux && rtc_use_x11) {
Edward Lemur84a87c42017-11-07 19:07:31 +0100823 sources += [
824 "linux/glx_renderer.cc",
825 "linux/glx_renderer.h",
826 "linux/video_renderer_linux.cc",
827 ]
kjellander0f380d82016-06-01 04:48:26 -0700828 libs += [
829 "Xext",
830 "X11",
831 "GL",
832 ]
833 }
834 if (is_android) {
835 libs += [
836 "GLESv2",
837 "log",
838 ]
839 }
kjellander0f380d82016-06-01 04:48:26 -0700840
kjellandere40a7ee2016-10-16 23:56:12 -0700841 if (!build_with_chromium && is_clang) {
842 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700843 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -0700844 }
kjellander0f380d82016-06-01 04:48:26 -0700845}
kwiberg37e99fd2017-04-10 05:15:48 -0700846
847rtc_source_set("audio_codec_mocks") {
848 testonly = true
849 sources = [
Niels Möller3f651d82018-12-19 15:06:17 +0100850 # TODO(nisse): Move these factories to their own target, to avoid
851 # unnecessary dependencies on gmock and gtest.
Niels Möllerb7180c02018-12-06 13:07:11 +0100852 "audio_decoder_proxy_factory.h",
Niels Möllera0f44302018-11-30 10:45:12 +0100853 "function_audio_decoder_factory.h",
kwiberg2b3aa142017-06-14 03:31:17 -0700854 "mock_audio_decoder.cc",
kwiberg37e99fd2017-04-10 05:15:48 -0700855 "mock_audio_decoder.h",
856 "mock_audio_decoder_factory.h",
ossueb1fde42017-05-02 06:46:30 -0700857 "mock_audio_encoder.cc",
858 "mock_audio_encoder.h",
859 "mock_audio_encoder_factory.h",
860 ]
861
862 deps = [
mbonadei3edccb92017-06-01 04:47:20 -0700863 ":test_support",
kwiberg529662a2017-09-04 05:43:17 -0700864 "../api:array_view",
ossueb1fde42017-05-02 06:46:30 -0700865 "../api/audio_codecs:audio_codecs_api",
mbonadei3edccb92017-06-01 04:47:20 -0700866 "../api/audio_codecs:builtin_audio_decoder_factory",
Niels Möllera0f44302018-11-30 10:45:12 +0100867 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700868 "../rtc_base:rtc_base_approved",
Niels Möllera0f44302018-11-30 10:45:12 +0100869 "//third_party/abseil-cpp/absl/memory",
kwiberg37e99fd2017-04-10 05:15:48 -0700870 ]
871}
sakald7fdb802017-05-26 01:51:53 -0700872
Artem Titov66a29b92019-01-15 14:43:20 +0100873rtc_source_set("copy_to_file_audio_capturer") {
874 testonly = true
875 sources = [
876 "testsupport/copy_to_file_audio_capturer.cc",
877 "testsupport/copy_to_file_audio_capturer.h",
878 ]
879 deps = [
880 "../api:array_view",
881 "../common_audio:common_audio",
882 "../modules/audio_device:audio_device_impl",
883 "../rtc_base:rtc_base_approved",
884 "//third_party/abseil-cpp/absl/memory",
885 "//third_party/abseil-cpp/absl/types:optional",
886 ]
887}
888
889rtc_source_set("copy_to_file_audio_capturer_unittest") {
890 testonly = true
891 sources = [
892 "testsupport/copy_to_file_audio_capturer_unittest.cc",
893 ]
894 deps = [
895 ":copy_to_file_audio_capturer",
896 ":fileutils",
897 ":test_support",
898 "../modules/audio_device:audio_device_impl",
899 "//third_party/abseil-cpp/absl/memory",
900 ]
901}
902
sakald7fdb802017-05-26 01:51:53 -0700903if (!build_with_chromium && is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000904 rtc_android_library("native_test_java") {
sakald7fdb802017-05-26 01:51:53 -0700905 testonly = true
906 java_files = [
907 "android/org/webrtc/native_test/RTCNativeUnitTest.java",
908 "android/org/webrtc/native_test/RTCNativeUnitTestActivity.java",
909 ]
910 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700911 "../rtc_base:base_java",
sakald7fdb802017-05-26 01:51:53 -0700912 "//testing/android/native_test:native_test_java",
sakald7fdb802017-05-26 01:51:53 -0700913 ]
914 }
915}
Benjamin Wright8efafdf2019-01-11 10:48:42 -0800916
917rtc_source_set("call_config_utils") {
918 sources = [
919 "call_config_utils.cc",
920 "call_config_utils.h",
921 ]
922 deps = [
923 "../call:call_interfaces",
924 "../call:video_stream_api",
925 "../rtc_base:rtc_json",
926 ]
927}