blob: a21637fd7cbfbc63e4ff46323ed2a866b5686e25 [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 = [
kjellander0f380d82016-06-01 04:48:26 -070019 ":rtp_test_utils",
20 ":test_common",
21 ":test_renderer",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000022 ":test_support",
kjellander0f380d82016-06-01 04:48:26 -070023 ":video_test_common",
Artem Titov4895b452019-01-14 16:54:04 +010024 "pc/e2e",
Artem Titovb6c62012019-01-08 14:58:23 +010025 "pc/e2e/api:peer_connection_quality_test_fixture_api",
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",
ehmaldonado656610f2017-02-06 02:21:11 -080051 "vcm_capturer.cc",
52 "vcm_capturer.h",
mflodman351424e2017-08-10 02:43:14 -070053 "video_codec_settings.h",
kjellander0f380d82016-06-01 04:48:26 -070054 ]
55
kjellandere40a7ee2016-10-16 23:56:12 -070056 if (!build_with_chromium && is_clang) {
57 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070058 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -070059 }
60
61 deps = [
mbonadei3edccb92017-06-01 04:47:20 -070062 "..:webrtc_common",
Patrik Höglund9e194032018-01-04 15:58:20 +010063 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +020064 "../api/video:video_frame",
Emircan Uysaler0823eec2018-07-13 17:10:00 -070065 "../api/video:video_frame_i010",
Niels Möllerc6ce9c52018-05-11 11:15:30 +020066 "../api/video:video_frame_i420",
mflodman351424e2017-08-10 02:43:14 -070067 "../api/video_codecs:video_codecs_api",
aleloi440b6d92017-08-22 05:43:23 -070068 "../call:video_stream_api",
kjellander0f380d82016-06-01 04:48:26 -070069 "../common_video",
sprangc5d62e22017-04-02 23:53:04 -070070 "../media:rtc_media_base",
ehmaldonado656610f2017-02-06 02:21:11 -080071 "../modules/video_capture:video_capture_module",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010072 "../rtc_base:checks",
Patrik Höglund76df0df2017-12-19 11:50:21 +010073 "../rtc_base:rtc_base",
ehmaldonadof6a861a2017-07-19 10:40:47 -070074 "../rtc_base:rtc_task_queue",
mbonadei3edccb92017-06-01 04:47:20 -070075 "../system_wrappers",
Danil Chapovalovabd42732018-09-10 14:07:45 +020076 "//third_party/abseil-cpp/absl/memory",
Danil Chapovalov431abd92018-06-18 12:54:17 +020077 "//third_party/abseil-cpp/absl/types:optional",
kjellander0f380d82016-06-01 04:48:26 -070078 ]
79}
80
ehmaldonado38a21322016-09-02 04:10:34 -070081rtc_source_set("rtp_test_utils") {
kjellander0f380d82016-06-01 04:48:26 -070082 testonly = true
83 sources = [
84 "rtcp_packet_parser.cc",
85 "rtcp_packet_parser.h",
86 "rtp_file_reader.cc",
87 "rtp_file_reader.h",
88 "rtp_file_writer.cc",
89 "rtp_file_writer.h",
90 ]
91
kjellandere40a7ee2016-10-16 23:56:12 -070092 if (!build_with_chromium && is_clang) {
93 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070094 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -070095 }
96
97 deps = [
98 "..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -070099 "../api:array_view",
kjellander0f380d82016-06-01 04:48:26 -0700100 "../modules/rtp_rtcp",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100101 "../modules/rtp_rtcp:rtp_rtcp_format",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100102 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700103 "../rtc_base:rtc_base_approved",
Niels Möllera12c42a2018-07-25 16:05:48 +0200104 "../rtc_base/system:arch",
kjellander0f380d82016-06-01 04:48:26 -0700105 "//testing/gtest",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000106 ]
107}
108
ehmaldonado38a21322016-09-02 04:10:34 -0700109rtc_source_set("field_trial") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000110 visibility = [ "*" ]
kjellander0f380d82016-06-01 04:48:26 -0700111 testonly = true
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000112 sources = [
113 "field_trial.cc",
114 "field_trial.h",
115 ]
116
117 deps = [
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000118 "..:webrtc_common",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200119 "../system_wrappers:field_trial",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000120 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000121}
122
Edward Lemure66572b2018-01-05 15:34:09 +0100123rtc_source_set("perf_test") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000124 visibility = [ "*" ]
Edward Lemure66572b2018-01-05 15:34:09 +0100125 sources = [
126 "testsupport/perf_test.cc",
127 "testsupport/perf_test.h",
128 ]
129 deps = [
130 "..:webrtc_common",
131 "../api:array_view",
Oleh Prypind136b282018-10-03 13:53:44 +0200132 "../rtc_base:checks",
Edward Lemure66572b2018-01-05 15:34:09 +0100133 "../rtc_base:rtc_base_approved",
134 ]
135}
136
mbonadeicd95a4e2017-08-23 23:55:54 -0700137if (is_ios) {
138 rtc_source_set("test_support_objc") {
139 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700140 visibility = [ ":test_support" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700141 sources = [
Artem Titarenko34fc3462018-11-06 12:29:29 +0100142 "ios/coverage_util_ios.h",
143 "ios/coverage_util_ios.mm",
mbonadeicd95a4e2017-08-23 23:55:54 -0700144 "ios/test_support.h",
145 "ios/test_support.mm",
146 ]
denicijad207a392017-09-11 06:43:28 -0700147 deps = [
Edward Lemure66572b2018-01-05 15:34:09 +0100148 ":perf_test",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200149 "../sdk:helpers_objc",
denicijad207a392017-09-11 06:43:28 -0700150 ]
Artem Titarenko34fc3462018-11-06 12:29:29 +0100151 configs += [ ":test_support_objc_config" ]
152 }
153
154 config("test_support_objc_config") {
155 defines = []
156
157 if (use_clang_coverage) {
158 defines += [ "WEBRTC_IOS_ENABLE_COVERAGE" ]
159 }
mbonadeicd95a4e2017-08-23 23:55:54 -0700160 }
161}
162
Patrik Höglund34924c22018-01-19 09:11:07 +0100163config("suppress_warning_4373") {
164 if (is_win) {
165 cflags = [
166 # MSVC has a bug which generates this warning when using mocks; see the
167 # section on warning 4373 in he googlemock FAQ. This warning isn't the
168 # least relevant for us, anyway.
169 "/wd4373",
170 ]
171 }
172}
173
Sebastian Jansson2afd2812018-08-23 14:44:05 +0200174config("test_main_direct_config") {
175 visibility = [ ":*" ]
176 defines = [ "UNIT_TEST" ]
177}
mbonadei148d5a22017-04-28 05:24:50 -0700178rtc_source_set("test_support") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000179 visibility = [ "*" ]
mbonadei148d5a22017-04-28 05:24:50 -0700180 testonly = true
kjellander32c4a202016-08-30 02:53:49 -0700181
Mirko Bonadei65ce3112018-01-26 11:57:47 +0100182 all_dependent_configs = [
183 ":suppress_warning_4373",
184 "//third_party/googletest:gmock_config",
185 "//third_party/googletest:gtest_config",
186 ]
Patrik Höglund34924c22018-01-19 09:11:07 +0100187
mbonadei148d5a22017-04-28 05:24:50 -0700188 sources = [
189 "gmock.h",
190 "gtest.h",
mbonadei148d5a22017-04-28 05:24:50 -0700191 ]
192
Patrik Höglund7696bef2018-03-15 15:05:39 +0100193 public_deps = []
Kári Tristan Helgasone2baffb2017-06-09 10:31:58 +0200194 if (is_ios) {
mbonadeicd95a4e2017-08-23 23:55:54 -0700195 public_deps += [ ":test_support_objc" ]
Kári Tristan Helgasone2baffb2017-06-09 10:31:58 +0200196 }
197
Sebastian Jansson2afd2812018-08-23 14:44:05 +0200198 public_configs = [ ":test_main_direct_config" ]
mbonadei148d5a22017-04-28 05:24:50 -0700199 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700200 "../rtc_base:rtc_base_approved",
mbonadei148d5a22017-04-28 05:24:50 -0700201 "//testing/gmock",
202 "//testing/gtest",
203 ]
204
mbonadei148d5a22017-04-28 05:24:50 -0700205 if (!build_with_chromium && is_clang) {
206 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
207 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
208 }
kjellander32c4a202016-08-30 02:53:49 -0700209}
210
oprypinfbbba3f2017-09-25 08:34:41 -0700211if (rtc_include_tests) {
Artem Titov40a7a352018-10-15 15:25:34 +0200212 rtc_source_set("test_main_lib") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000213 visibility = [ "*" ]
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200214 testonly = true
Oleh Prypin5ab68542017-09-25 09:18:00 +0000215 sources = [
Artem Titov40a7a352018-10-15 15:25:34 +0200216 "test_main_lib.cc",
217 "test_main_lib.h",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000218 ]
219
Oleh Prypin5ab68542017-09-25 09:18:00 +0000220 deps = [
221 ":field_trial",
Edward Lemure66572b2018-01-05 15:34:09 +0100222 ":perf_test",
Artem Titov40a7a352018-10-15 15:25:34 +0200223 ":test_support",
Yves Gerey3e707812018-11-28 16:47:49 +0100224 "../rtc_base:checks",
Niels Möller8909a632018-09-06 08:42:44 +0200225 "../rtc_base:rtc_base",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200226 "../system_wrappers:field_trial",
227 "../system_wrappers:metrics",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000228 "//testing/gtest",
Yves Gerey3e707812018-11-28 16:47:49 +0100229 "//third_party/abseil-cpp/absl/memory",
Patrik Höglund77301932018-10-09 15:09:51 +0200230
231 # TODO(bugs.webrtc.org/9792): This is needed for downstream projects on
232 # Android, where it's replaced by an internal version of fileutils that
233 # has a certain flag. Remove this once the internal fileutils has been
234 # eliminated.
235 "../test:fileutils",
mbonadei9452c622017-04-27 12:29:29 -0700236 ]
237 }
mbonadei9452c622017-04-27 12:29:29 -0700238
Artem Titov40a7a352018-10-15 15:25:34 +0200239 rtc_source_set("test_main") {
240 visibility = [ "*" ]
241 testonly = true
242 sources = [
243 "test_main.cc",
244 ]
245
246 deps = [
247 ":test_main_lib",
248 ]
249 }
250
Oleh Prypin5ab68542017-09-25 09:18:00 +0000251 rtc_source_set("video_test_support") {
252 testonly = true
253
254 sources = [
255 "testsupport/frame_reader.h",
256 "testsupport/frame_writer.h",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000257 "testsupport/mock/mock_frame_reader.h",
Artem Titov645df9e2019-01-14 14:21:59 +0100258 "testsupport/y4m_frame_reader.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000259 "testsupport/y4m_frame_writer.cc",
260 "testsupport/yuv_frame_reader.cc",
261 "testsupport/yuv_frame_writer.cc",
262 ]
263
264 deps = [
Patrik Höglund7696bef2018-03-15 15:05:39 +0100265 ":fileutils",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000266 ":test_support",
267 ":video_test_common",
268 "..:webrtc_common",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200269 "../api/video:video_frame",
270 "../api/video:video_frame_i420",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000271 "../common_video",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100272 "../rtc_base:checks",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000273 "../rtc_base:rtc_base_approved",
274 "../system_wrappers",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000275 "//testing/gtest",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100276 "//third_party/libyuv",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000277 ]
278
279 if (!is_ios) {
280 deps += [ "//third_party:jpeg" ]
281 sources += [ "testsupport/jpeg_frame_writer.cc" ]
282 } else {
283 sources += [ "testsupport/jpeg_frame_writer_ios.cc" ]
284 }
285
Oleh Prypin5ab68542017-09-25 09:18:00 +0000286 if (!build_with_chromium && is_clang) {
287 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
288 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
289 }
290
291 if (is_android) {
292 deps += [ "//base:base" ]
293 }
Oleh Prypin5ab68542017-09-25 09:18:00 +0000294 }
295
Edward Lemuraf8659a2017-09-27 14:46:24 +0200296 rtc_source_set("test_support_test_artifacts") {
Oleh Prypin5ab68542017-09-25 09:18:00 +0000297 testonly = true
298 sources = [
Edward Lemuraf8659a2017-09-27 14:46:24 +0200299 "testsupport/test_artifacts.cc",
300 "testsupport/test_artifacts.h",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000301 ]
302 deps = [
303 ":fileutils",
304 "../rtc_base:rtc_base_approved",
305 ]
306 }
307
308 test_support_unittests_resources = [
309 "../resources/foreman_cif_short.yuv",
310 "../resources/video_coding/frame-ethernet-ii.pcap",
311 "../resources/video_coding/frame-loopback.pcap",
312 "../resources/video_coding/pltype103.rtp",
313 "../resources/video_coding/pltype103_header_only.rtp",
314 "../resources/video_coding/ssrcs-2.pcap",
315 "../resources/video_coding/ssrcs-3.pcap",
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200316 ]
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200317
318 if (is_ios) {
Oleh Prypin5ab68542017-09-25 09:18:00 +0000319 bundle_data("test_support_unittests_bundle_data") {
320 testonly = true
321 sources = test_support_unittests_resources
322 outputs = [
323 "{{bundle_resources_dir}}/{{source_file_part}}",
324 ]
325 }
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200326 }
327
Oleh Prypin5ab68542017-09-25 09:18:00 +0000328 rtc_test("test_support_unittests") {
329 deps = [
Benjamin Wright9db8b882019-01-14 15:30:20 -0800330 ":call_config_utils",
Sebastian Jansson09408112018-04-24 14:41:22 +0200331 ":direct_transport",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200332 ":fake_video_codecs",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100333 ":fileutils",
Mirko Bonadei46399992018-08-22 15:32:38 +0200334 ":fileutils_unittests",
Edward Lemure66572b2018-01-05 15:34:09 +0100335 ":perf_test",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000336 ":rtp_test_utils",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200337 ":test_common",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200338 ":test_main",
339 ":test_support",
340 ":test_support_test_artifacts",
341 ":video_test_common",
342 ":video_test_support",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200343 "../api:create_simulcast_test_fixture_api",
344 "../api:simulcast_test_fixture_api",
Danil Chapovalov99b71df2018-10-26 15:57:48 +0200345 "../api/test/video:function_video_factory",
Jiawei Ouc2ebe212018-11-08 10:02:56 -0800346 "../api/video:builtin_video_bitrate_allocator_factory",
Yves Gerey3e707812018-11-28 16:47:49 +0100347 "../api/video:video_frame",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200348 "../api/video:video_frame_i420",
Benjamin Wright9db8b882019-01-14 15:30:20 -0800349 "../call:video_stream_api",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200350 "../modules/rtp_rtcp:rtp_rtcp",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200351 "../modules/video_capture",
352 "../modules/video_coding:simulcast_test_fixture_impl",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000353 "../rtc_base:rtc_base_approved",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200354 "../test:single_threaded_task_queue",
Artem Titov4895b452019-01-14 16:54:04 +0100355 "pc/e2e:e2e_unittests",
Sebastian Jansson98b07e92018-09-27 13:47:01 +0200356 "scenario:scenario_unittests",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200357 "//testing/gmock",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200358 "//testing/gtest",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200359 "//third_party/abseil-cpp/absl/memory",
Artem Titov645df9e2019-01-14 14:21:59 +0100360 "//third_party/abseil-cpp/absl/strings",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000361 ]
362 sources = [
Benjamin Wright9db8b882019-01-14 15:30:20 -0800363 "call_config_utils_unittest.cc",
Sebastian Jansson09408112018-04-24 14:41:22 +0200364 "direct_transport_unittest.cc",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200365 "fake_vp8_encoder_unittest.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000366 "frame_generator_unittest.cc",
367 "rtp_file_reader_unittest.cc",
368 "rtp_file_writer_unittest.cc",
369 "single_threaded_task_queue_unittest.cc",
370 "testsupport/always_passing_unittest.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000371 "testsupport/perf_test_unittest.cc",
Edward Lemuraf8659a2017-09-27 14:46:24 +0200372 "testsupport/test_artifacts_unittest.cc",
Artem Titov645df9e2019-01-14 14:21:59 +0100373 "testsupport/y4m_frame_reader_unittest.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000374 "testsupport/y4m_frame_writer_unittest.cc",
375 "testsupport/yuv_frame_reader_unittest.cc",
376 "testsupport/yuv_frame_writer_unittest.cc",
377 ]
378
Oleh Prypin5ab68542017-09-25 09:18:00 +0000379 if (!build_with_chromium && is_clang) {
380 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
381 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
382 }
383
384 data = test_support_unittests_resources
385 if (is_android) {
386 deps += [ "//testing/android/native_test:native_test_support" ]
387 shard_timeout = 900
388 }
389
390 if (is_ios) {
391 deps += [ ":test_support_unittests_bundle_data" ]
392 }
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200393
Mirko Bonadei9098b302018-04-06 10:48:10 +0200394 if (!is_android && !build_with_chromium) {
395 # This is needed in order to avoid:
396 # undefined symbol: webrtc::videocapturemodule::VideoCaptureImpl::Create
397 deps += [ "../modules/video_capture:video_capture_internal_impl" ]
398 }
Oleh Prypin5ab68542017-09-25 09:18:00 +0000399 }
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200400}
401
mbonadeicd95a4e2017-08-23 23:55:54 -0700402if (is_ios) {
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200403 rtc_source_set("fileutils_ios_objc") {
Artem Titov8f726be2018-10-23 15:50:10 +0200404 visibility = [
405 ":fileutils",
406 ":fileutils_override_impl",
407 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700408 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800409 "testsupport/ios_file_utils.h",
410 "testsupport/ios_file_utils.mm",
Steve Antonaec15aa2019-01-11 09:13:07 -0800411 "testsupport/iosfileutils.h",
mbonadeicd95a4e2017-08-23 23:55:54 -0700412 ]
413 deps = [
414 "..:webrtc_common",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100415 "../rtc_base:checks",
mbonadeicd95a4e2017-08-23 23:55:54 -0700416 "../rtc_base:rtc_base_approved",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200417 "../sdk:helpers_objc",
mbonadeicd95a4e2017-08-23 23:55:54 -0700418 ]
419 }
420}
421
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200422if (is_mac) {
423 rtc_source_set("fileutils_mac_objc") {
Artem Titov8f726be2018-10-23 15:50:10 +0200424 visibility = [
425 ":fileutils",
426 ":fileutils_override_impl",
427 ]
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200428 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800429 "testsupport/mac_file_utils.h",
430 "testsupport/mac_file_utils.mm",
Steve Antonaec15aa2019-01-11 09:13:07 -0800431 "testsupport/macfileutils.h",
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200432 ]
433 deps = [
434 "../rtc_base:checks",
435 ]
436 }
437}
438
mbonadei9452c622017-04-27 12:29:29 -0700439rtc_source_set("fileutils") {
440 testonly = true
Patrik Höglund7696bef2018-03-15 15:05:39 +0100441 visibility = [ "*" ]
mbonadei9452c622017-04-27 12:29:29 -0700442 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800443 "testsupport/file_utils.cc",
444 "testsupport/file_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800445 "testsupport/fileutils.h",
mbonadei9452c622017-04-27 12:29:29 -0700446 ]
mbonadei3edccb92017-06-01 04:47:20 -0700447 deps = [
Artem Titov8f726be2018-10-23 15:50:10 +0200448 ":fileutils_override_api",
449 ":fileutils_override_impl",
450 "..:webrtc_common",
451 "../rtc_base:checks",
452 "../rtc_base:rtc_base_approved",
453 "../rtc_base/system:arch",
454 "//third_party/abseil-cpp/absl/types:optional",
455 ]
456 if (is_ios) {
457 deps += [ ":fileutils_ios_objc" ]
458 }
459 if (is_mac) {
460 deps += [ ":fileutils_mac_objc" ]
461 }
462 if (is_win) {
463 deps += [ "../rtc_base:rtc_base" ]
464 }
465}
466
467# We separate header into own target to make it possible for downstream
468# projects to override implementation.
469rtc_source_set("fileutils_override_api") {
470 testonly = true
471 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800472 "testsupport/file_utils_override.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800473 "testsupport/fileutils_override.h",
Artem Titov8f726be2018-10-23 15:50:10 +0200474 ]
475}
476
477rtc_source_set("fileutils_override_impl") {
478 testonly = true
479 visibility = [ ":fileutils" ]
480 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800481 "testsupport/file_utils_override.cc",
Artem Titov8f726be2018-10-23 15:50:10 +0200482 ]
483 deps = [
484 ":fileutils_override_api",
mbonadei3edccb92017-06-01 04:47:20 -0700485 "..:webrtc_common",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100486 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700487 "../rtc_base:rtc_base_approved",
Niels Möllera12c42a2018-07-25 16:05:48 +0200488 "../rtc_base/system:arch",
Danil Chapovalov431abd92018-06-18 12:54:17 +0200489 "//third_party/abseil-cpp/absl/types:optional",
mbonadei3edccb92017-06-01 04:47:20 -0700490 ]
mbonadei9452c622017-04-27 12:29:29 -0700491 if (is_ios) {
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200492 deps += [ ":fileutils_ios_objc" ]
493 }
494 if (is_mac) {
495 deps += [ ":fileutils_mac_objc" ]
mbonadei3edccb92017-06-01 04:47:20 -0700496 }
497 if (is_win) {
ehmaldonadof6a861a2017-07-19 10:40:47 -0700498 deps += [ "../rtc_base:rtc_base" ]
mbonadei9452c622017-04-27 12:29:29 -0700499 }
mbonadei9452c622017-04-27 12:29:29 -0700500}
501
502rtc_source_set("run_test") {
503 testonly = true
mbonadeicd95a4e2017-08-23 23:55:54 -0700504 if (is_mac) {
505 public_deps = [
506 ":run_test_objc",
507 ]
508 } else {
509 public_deps = [
510 ":run_test_generic",
511 ]
512 }
513}
514
515rtc_source_set("run_test_interface") {
mbonadei9452c622017-04-27 12:29:29 -0700516 sources = [
517 "run_test.h",
518 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700519}
520
521if (is_mac) {
522 rtc_source_set("run_test_objc") {
523 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700524 visibility = [ ":run_test" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700525 sources = [
526 "mac/run_test.mm",
527 ]
mbonadei9c296b32017-09-05 05:11:41 -0700528 deps = [
mbonadeicd95a4e2017-08-23 23:55:54 -0700529 ":run_test_interface",
530 ]
mbonadei9452c622017-04-27 12:29:29 -0700531 }
532}
533
mbonadeicd95a4e2017-08-23 23:55:54 -0700534rtc_source_set("run_test_generic") {
535 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700536 visibility = [ ":run_test" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700537 sources = [
538 "run_test.cc",
539 ]
mbonadei9c296b32017-09-05 05:11:41 -0700540 deps = [
mbonadeicd95a4e2017-08-23 23:55:54 -0700541 ":run_test_interface",
542 ]
543}
544
ehmaldonado37535bf2016-12-05 06:42:45 -0800545rtc_source_set("fileutils_unittests") {
546 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700547 visibility = [ ":*" ] # Only targets in this file can depend on this.
ehmaldonado37535bf2016-12-05 06:42:45 -0800548 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800549 "testsupport/file_utils_unittest.cc",
ehmaldonado37535bf2016-12-05 06:42:45 -0800550 ]
551 deps = [
552 ":fileutils",
mbonadei3edccb92017-06-01 04:47:20 -0700553 ":test_support",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100554 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700555 "../rtc_base:rtc_base_approved",
ehmaldonado37535bf2016-12-05 06:42:45 -0800556 "//testing/gtest",
Danil Chapovalov431abd92018-06-18 12:54:17 +0200557 "//third_party/abseil-cpp/absl/types:optional",
ehmaldonado37535bf2016-12-05 06:42:45 -0800558 ]
559}
kjellander0f380d82016-06-01 04:48:26 -0700560
perkj488c5dc2017-02-08 05:55:51 -0800561rtc_source_set("direct_transport") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000562 visibility = [ "*" ]
perkj488c5dc2017-02-08 05:55:51 -0800563 testonly = true
564 sources = [
565 "direct_transport.cc",
566 "direct_transport.h",
perkj488c5dc2017-02-08 05:55:51 -0800567 ]
568 if (!build_with_chromium && is_clang) {
569 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
570 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
571 }
572 deps = [
mbonadei3edccb92017-06-01 04:47:20 -0700573 "..:webrtc_common",
Artem Titov46c4e602018-08-17 14:26:54 +0200574 "../api:simulated_network_api",
perkj488c5dc2017-02-08 05:55:51 -0800575 "../api:transport_api",
Mirko Bonadeia0e1a552017-12-04 10:50:51 +0100576 "../call:call_interfaces",
Artem Titov46c4e602018-08-17 14:26:54 +0200577 "../call:simulated_packet_receiver",
mbonadei3edccb92017-06-01 04:47:20 -0700578 "../modules/rtp_rtcp",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700579 "../rtc_base:rtc_base_approved",
eladalon413ee9a2017-08-22 04:02:52 -0700580 "../rtc_base:sequenced_task_checker",
mbonadei3edccb92017-06-01 04:47:20 -0700581 "../system_wrappers",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200582 "//third_party/abseil-cpp/absl/memory",
perkj488c5dc2017-02-08 05:55:51 -0800583 ]
eladalon413ee9a2017-08-22 04:02:52 -0700584 public_deps = [
585 ":single_threaded_task_queue",
Erik Språng09708512018-03-14 15:16:50 +0100586 "../call:fake_network",
eladalon413ee9a2017-08-22 04:02:52 -0700587 ]
588}
589
590rtc_source_set("single_threaded_task_queue") {
591 testonly = true
592 sources = [
593 "single_threaded_task_queue.cc",
594 "single_threaded_task_queue.h",
595 ]
596 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100597 "../rtc_base:checks",
eladalon413ee9a2017-08-22 04:02:52 -0700598 "../rtc_base:rtc_base_approved",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200599 "//third_party/abseil-cpp/absl/memory",
eladalon413ee9a2017-08-22 04:02:52 -0700600 ]
perkj488c5dc2017-02-08 05:55:51 -0800601}
602
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200603rtc_source_set("fake_video_codecs") {
Oskar Sundbom8984cd62019-01-10 11:48:52 +0000604 testonly = true
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200605 visibility = [ "*" ]
606 sources = [
607 "configurable_frame_size_encoder.cc",
608 "configurable_frame_size_encoder.h",
609 "fake_decoder.cc",
610 "fake_decoder.h",
611 "fake_encoder.cc",
612 "fake_encoder.h",
Per Kjellander841c9122018-10-04 18:40:28 +0200613 "fake_vp8_decoder.cc",
614 "fake_vp8_decoder.h",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200615 "fake_vp8_encoder.cc",
616 "fake_vp8_encoder.h",
617 ]
618 if (!build_with_chromium && is_clang) {
619 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
620 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
621 }
622 deps = [
623 "..:webrtc_common",
Niels Möller4dc66c52018-10-05 14:17:58 +0200624 "../api/video:encoded_image",
Yves Gerey3e707812018-11-28 16:47:49 +0100625 "../api/video:video_bitrate_allocation",
626 "../api/video:video_frame",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200627 "../api/video:video_frame_i420",
Erik Språng4529fbc2018-10-12 10:30:31 +0200628 "../api/video_codecs:create_vp8_temporal_layers",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200629 "../api/video_codecs:video_codecs_api",
630 "../common_video:common_video",
Yves Gerey3e707812018-11-28 16:47:49 +0100631 "../modules:module_api",
632 "../modules/video_coding:codec_globals_headers",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200633 "../modules/video_coding:video_codec_interface",
634 "../modules/video_coding:video_coding_utility",
635 "../modules/video_coding:webrtc_h264",
636 "../modules/video_coding:webrtc_vp8",
637 "../modules/video_coding:webrtc_vp9",
638 "../rtc_base:checks",
639 "../rtc_base:rtc_base_approved",
640 "../rtc_base:rtc_task_queue",
641 "../rtc_base:sequenced_task_checker",
642 "../system_wrappers",
Yves Gerey3e707812018-11-28 16:47:49 +0100643 "//third_party/abseil-cpp/absl/types:optional",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200644 ]
645}
646
ehmaldonado38a21322016-09-02 04:10:34 -0700647rtc_source_set("test_common") {
kjellander0f380d82016-06-01 04:48:26 -0700648 testonly = true
649 sources = [
650 "call_test.cc",
651 "call_test.h",
kjellander0f380d82016-06-01 04:48:26 -0700652 "constants.cc",
653 "constants.h",
kjellander0f380d82016-06-01 04:48:26 -0700654 "drifting_clock.cc",
655 "drifting_clock.h",
656 "encoder_settings.cc",
657 "encoder_settings.h",
sakal55d932b2016-09-30 06:19:08 -0700658 "fake_videorenderer.h",
kjellander0f380d82016-06-01 04:48:26 -0700659 "layer_filtering_transport.cc",
660 "layer_filtering_transport.h",
Danil Chapovalovdd7e2842018-03-09 15:37:03 +0000661 "mock_transport.cc",
kjellander0f380d82016-06-01 04:48:26 -0700662 "mock_transport.h",
kjellander0f380d82016-06-01 04:48:26 -0700663 "null_transport.cc",
664 "null_transport.h",
665 "rtp_rtcp_observer.h",
666 "statistics.cc",
667 "statistics.h",
Niels Möllercbcbc222018-09-28 09:07:24 +0200668 "video_decoder_proxy_factory.h",
669 "video_encoder_proxy_factory.h",
kjellander0f380d82016-06-01 04:48:26 -0700670 ]
Robin Raymondce1b1402018-11-22 20:10:11 -0500671 if (current_os != "winuwp") {
672 # The filtering of *_win.cc is not done for WinUWP (intentionally) as
673 # most _win.cc files are compatible with WinUWP. However, the
674 # peek/dispatch Win32 runloops are entirely WinUWP incompatible thus
675 # WinUWP uses the generic runloop as defined for non-Windows targets.
676 sources += [ "win/run_loop_win.cc" ]
677 }
678 if (!is_win || current_os == "winuwp") {
kjellander0f380d82016-06-01 04:48:26 -0700679 sources += [
680 "run_loop.cc",
681 "run_loop.h",
682 ]
683 }
684
kjellandere40a7ee2016-10-16 23:56:12 -0700685 if (!build_with_chromium && is_clang) {
686 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700687 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -0700688 }
689
690 deps = [
perkj488c5dc2017-02-08 05:55:51 -0800691 ":direct_transport",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200692 ":fake_video_codecs",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100693 ":fileutils",
kjellander0f380d82016-06-01 04:48:26 -0700694 ":rtp_test_utils",
695 ":test_support",
perkjc5726c12017-03-01 03:37:08 -0800696 ":video_test_common",
Yves Gerey3e707812018-11-28 16:47:49 +0100697 "../:webrtc_common",
Patrik Höglundbe214a22018-01-04 12:14:35 +0100698 "../api:libjingle_peerconnection_api",
Artem Titov46c4e602018-08-17 14:26:54 +0200699 "../api:simulated_network_api",
mbonadei3edccb92017-06-01 04:47:20 -0700700 "../api:transport_api",
mbonadei3edccb92017-06-01 04:47:20 -0700701 "../api/audio_codecs:builtin_audio_decoder_factory",
ossueb1fde42017-05-02 06:46:30 -0700702 "../api/audio_codecs:builtin_audio_encoder_factory",
Danil Chapovalovddc84e92018-10-24 17:01:58 +0200703 "../api/test/video:function_video_factory",
Jiawei Ouc2ebe212018-11-08 10:02:56 -0800704 "../api/video:builtin_video_bitrate_allocator_factory",
705 "../api/video:video_bitrate_allocator_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200706 "../api/video:video_frame",
ilnikd60d06a2017-04-05 03:02:20 -0700707 "../api/video_codecs:video_codecs_api",
kjellander94cee312016-06-10 01:56:57 -0700708 "../audio",
kjellander94cee312016-06-10 01:56:57 -0700709 "../call",
Mirko Bonadeia0e1a552017-12-04 10:50:51 +0100710 "../call:call_interfaces",
Artem Titov4e199e92018-08-20 13:30:39 +0200711 "../call:fake_network",
Yves Gerey3e707812018-11-28 16:47:49 +0100712 "../call:rtp_interfaces",
sprangdb2a9fc2017-08-09 06:42:32 -0700713 "../call:rtp_sender",
Artem Titov4e199e92018-08-20 13:30:39 +0200714 "../call:simulated_network",
Artem Titov46c4e602018-08-17 14:26:54 +0200715 "../call:simulated_packet_receiver",
aleloi440b6d92017-08-22 05:43:23 -0700716 "../call:video_stream_api",
mbonadei3edccb92017-06-01 04:47:20 -0700717 "../logging:rtc_event_log_api",
Qingsi Wang970b0882018-02-01 11:04:46 -0800718 "../logging:rtc_event_log_impl_base",
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800719 "../media:rtc_internal_video_codecs",
Mirko Bonadeiad627922017-11-30 17:16:21 +0100720 "../media:rtc_media_base",
Artem Titov3faa8322018-03-07 14:44:00 +0100721 "../modules/audio_device",
Paulina Hensman7bd79a02018-03-15 12:44:12 +0100722 "../modules/audio_device:audio_device_impl",
mbonadei3edccb92017-06-01 04:47:20 -0700723 "../modules/audio_device:mock_audio_device",
aleloi10111bc2016-11-17 06:48:48 -0800724 "../modules/audio_mixer:audio_mixer_impl",
aleloidd310712016-11-17 06:28:59 -0800725 "../modules/audio_processing",
mbonadei3edccb92017-06-01 04:47:20 -0700726 "../modules/rtp_rtcp",
727 "../modules/rtp_rtcp:mock_rtp_rtcp",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100728 "../modules/rtp_rtcp:rtp_rtcp_format",
Yves Gerey3e707812018-11-28 16:47:49 +0100729 "../modules/rtp_rtcp:rtp_video_header",
730 "../modules/video_coding:codec_globals_headers",
charujaincb728ea2017-09-18 03:08:08 -0700731 "../modules/video_coding:video_coding_utility",
mbonadei3edccb92017-06-01 04:47:20 -0700732 "../modules/video_coding:webrtc_h264",
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800733 "../modules/video_coding:webrtc_multiplex",
Sergio Garcia Murillo43800f92018-06-21 16:16:38 +0200734 "../modules/video_coding:webrtc_vp8",
mbonadei3edccb92017-06-01 04:47:20 -0700735 "../modules/video_coding:webrtc_vp9",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100736 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700737 "../rtc_base:rtc_base_approved",
mbonadei3edccb92017-06-01 04:47:20 -0700738 "../system_wrappers",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200739 "../system_wrappers:field_trial",
kjellander94cee312016-06-10 01:56:57 -0700740 "../video",
kjellander0f380d82016-06-01 04:48:26 -0700741 "//testing/gtest",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200742 "//third_party/abseil-cpp/absl/memory",
kjellander0f380d82016-06-01 04:48:26 -0700743 ]
mbonadei148d5a22017-04-28 05:24:50 -0700744 if (!is_android && !build_with_chromium) {
oprypin92220ff2017-03-23 03:40:03 -0700745 deps += [ "../modules/video_capture:video_capture_internal_impl" ]
746 }
kjellander0f380d82016-06-01 04:48:26 -0700747}
748
ehmaldonado38a21322016-09-02 04:10:34 -0700749rtc_source_set("test_renderer") {
mbonadei9c296b32017-09-05 05:11:41 -0700750 public_deps = [
751 ":test_renderer_generic",
752 ]
kjellander0f380d82016-06-01 04:48:26 -0700753 testonly = true
mbonadeicd95a4e2017-08-23 23:55:54 -0700754 if (is_mac) {
mbonadei9c296b32017-09-05 05:11:41 -0700755 public_deps += [ ":test_renderer_objc" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700756 }
757}
758
759if (is_mac) {
760 rtc_source_set("test_renderer_objc") {
761 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700762 visibility = [ ":test_renderer" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700763 sources = [
764 "mac/video_renderer_mac.h",
765 "mac/video_renderer_mac.mm",
766 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700767 deps = [
mbonadei9c296b32017-09-05 05:11:41 -0700768 ":test_renderer_generic",
mbonadeicd95a4e2017-08-23 23:55:54 -0700769 "../rtc_base:rtc_base_approved",
770 ]
771 libs = [
772 "Cocoa.framework",
773 "OpenGL.framework",
774 "CoreVideo.framework",
775 ]
776 if (!build_with_chromium && is_clang) {
777 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
778 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
779 }
780 }
781}
782
783rtc_source_set("test_renderer_generic") {
784 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700785 visibility = [
786 ":test_renderer",
787 ":test_renderer_objc",
788 ]
kjellander0f380d82016-06-01 04:48:26 -0700789 libs = []
790 sources = [
kjellander0f380d82016-06-01 04:48:26 -0700791 "video_renderer.cc",
792 "video_renderer.h",
793 "win/d3d_renderer.cc",
794 "win/d3d_renderer.h",
795 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700796 deps = [
797 ":test_support",
798 "..:webrtc_common",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200799 "../api/video:video_frame",
mbonadeicd95a4e2017-08-23 23:55:54 -0700800 "../common_video",
Mirko Bonadeiad627922017-11-30 17:16:21 +0100801 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100802 "../rtc_base:checks",
mbonadeicd95a4e2017-08-23 23:55:54 -0700803 "../rtc_base:rtc_base_approved",
804 "//testing/gtest",
805 ]
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100806 if (!(is_linux && rtc_use_x11) && !is_mac && !is_win) {
kjellander0f380d82016-06-01 04:48:26 -0700807 sources += [ "null_platform_renderer.cc" ]
808 }
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100809 if ((is_linux && rtc_use_x11) || is_mac) {
kjellander0f380d82016-06-01 04:48:26 -0700810 sources += [
811 "gl/gl_renderer.cc",
812 "gl/gl_renderer.h",
813 ]
814 }
815
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100816 if (is_linux && rtc_use_x11) {
Edward Lemur84a87c42017-11-07 19:07:31 +0100817 sources += [
818 "linux/glx_renderer.cc",
819 "linux/glx_renderer.h",
820 "linux/video_renderer_linux.cc",
821 ]
kjellander0f380d82016-06-01 04:48:26 -0700822 libs += [
823 "Xext",
824 "X11",
825 "GL",
826 ]
827 }
828 if (is_android) {
829 libs += [
830 "GLESv2",
831 "log",
832 ]
833 }
kjellander0f380d82016-06-01 04:48:26 -0700834
kjellandere40a7ee2016-10-16 23:56:12 -0700835 if (!build_with_chromium && is_clang) {
836 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700837 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -0700838 }
kjellander0f380d82016-06-01 04:48:26 -0700839}
kwiberg37e99fd2017-04-10 05:15:48 -0700840
841rtc_source_set("audio_codec_mocks") {
842 testonly = true
843 sources = [
Niels Möller3f651d82018-12-19 15:06:17 +0100844 # TODO(nisse): Move these factories to their own target, to avoid
845 # unnecessary dependencies on gmock and gtest.
Niels Möllerb7180c02018-12-06 13:07:11 +0100846 "audio_decoder_proxy_factory.h",
Niels Möllera0f44302018-11-30 10:45:12 +0100847 "function_audio_decoder_factory.h",
kwiberg2b3aa142017-06-14 03:31:17 -0700848 "mock_audio_decoder.cc",
kwiberg37e99fd2017-04-10 05:15:48 -0700849 "mock_audio_decoder.h",
850 "mock_audio_decoder_factory.h",
ossueb1fde42017-05-02 06:46:30 -0700851 "mock_audio_encoder.cc",
852 "mock_audio_encoder.h",
853 "mock_audio_encoder_factory.h",
854 ]
855
856 deps = [
mbonadei3edccb92017-06-01 04:47:20 -0700857 ":test_support",
kwiberg529662a2017-09-04 05:43:17 -0700858 "../api:array_view",
ossueb1fde42017-05-02 06:46:30 -0700859 "../api/audio_codecs:audio_codecs_api",
mbonadei3edccb92017-06-01 04:47:20 -0700860 "../api/audio_codecs:builtin_audio_decoder_factory",
Niels Möllera0f44302018-11-30 10:45:12 +0100861 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700862 "../rtc_base:rtc_base_approved",
Niels Möllera0f44302018-11-30 10:45:12 +0100863 "//third_party/abseil-cpp/absl/memory",
kwiberg37e99fd2017-04-10 05:15:48 -0700864 ]
865}
sakald7fdb802017-05-26 01:51:53 -0700866
867if (!build_with_chromium && is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000868 rtc_android_library("native_test_java") {
sakald7fdb802017-05-26 01:51:53 -0700869 testonly = true
870 java_files = [
871 "android/org/webrtc/native_test/RTCNativeUnitTest.java",
872 "android/org/webrtc/native_test/RTCNativeUnitTestActivity.java",
873 ]
874 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700875 "../rtc_base:base_java",
sakald7fdb802017-05-26 01:51:53 -0700876 "//testing/android/native_test:native_test_java",
sakald7fdb802017-05-26 01:51:53 -0700877 ]
878 }
879}
Benjamin Wright8efafdf2019-01-11 10:48:42 -0800880
881rtc_source_set("call_config_utils") {
882 sources = [
883 "call_config_utils.cc",
884 "call_config_utils.h",
885 ]
886 deps = [
887 "../call:call_interfaces",
888 "../call:video_stream_api",
889 "../rtc_base:rtc_json",
890 ]
891}