blob: 25bd5394194cfc994be0f5aa290fc279dd8e89e7 [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 Titov645df9e2019-01-14 14:21:59 +0100259 "testsupport/y4m_frame_reader.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000260 "testsupport/y4m_frame_writer.cc",
261 "testsupport/yuv_frame_reader.cc",
262 "testsupport/yuv_frame_writer.cc",
263 ]
264
265 deps = [
Patrik Höglund7696bef2018-03-15 15:05:39 +0100266 ":fileutils",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000267 ":test_support",
268 ":video_test_common",
269 "..:webrtc_common",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200270 "../api/video:video_frame",
271 "../api/video:video_frame_i420",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000272 "../common_video",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100273 "../rtc_base:checks",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000274 "../rtc_base:rtc_base_approved",
275 "../system_wrappers",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000276 "//testing/gtest",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100277 "//third_party/libyuv",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000278 ]
279
280 if (!is_ios) {
281 deps += [ "//third_party:jpeg" ]
282 sources += [ "testsupport/jpeg_frame_writer.cc" ]
283 } else {
284 sources += [ "testsupport/jpeg_frame_writer_ios.cc" ]
285 }
286
Oleh Prypin5ab68542017-09-25 09:18:00 +0000287 if (!build_with_chromium && is_clang) {
288 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
289 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
290 }
291
292 if (is_android) {
293 deps += [ "//base:base" ]
294 }
Oleh Prypin5ab68542017-09-25 09:18:00 +0000295 }
296
Edward Lemuraf8659a2017-09-27 14:46:24 +0200297 rtc_source_set("test_support_test_artifacts") {
Oleh Prypin5ab68542017-09-25 09:18:00 +0000298 testonly = true
299 sources = [
Edward Lemuraf8659a2017-09-27 14:46:24 +0200300 "testsupport/test_artifacts.cc",
301 "testsupport/test_artifacts.h",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000302 ]
303 deps = [
304 ":fileutils",
305 "../rtc_base:rtc_base_approved",
306 ]
307 }
308
309 test_support_unittests_resources = [
310 "../resources/foreman_cif_short.yuv",
311 "../resources/video_coding/frame-ethernet-ii.pcap",
312 "../resources/video_coding/frame-loopback.pcap",
313 "../resources/video_coding/pltype103.rtp",
314 "../resources/video_coding/pltype103_header_only.rtp",
315 "../resources/video_coding/ssrcs-2.pcap",
316 "../resources/video_coding/ssrcs-3.pcap",
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200317 ]
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200318
319 if (is_ios) {
Oleh Prypin5ab68542017-09-25 09:18:00 +0000320 bundle_data("test_support_unittests_bundle_data") {
321 testonly = true
322 sources = test_support_unittests_resources
323 outputs = [
324 "{{bundle_resources_dir}}/{{source_file_part}}",
325 ]
326 }
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200327 }
328
Oleh Prypin5ab68542017-09-25 09:18:00 +0000329 rtc_test("test_support_unittests") {
330 deps = [
Benjamin Wright9db8b882019-01-14 15:30:20 -0800331 ":call_config_utils",
Artem Titov66a29b92019-01-15 14:43:20 +0100332 ":copy_to_file_audio_capturer_unittest",
Sebastian Jansson09408112018-04-24 14:41:22 +0200333 ":direct_transport",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200334 ":fake_video_codecs",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100335 ":fileutils",
Mirko Bonadei46399992018-08-22 15:32:38 +0200336 ":fileutils_unittests",
Edward Lemure66572b2018-01-05 15:34:09 +0100337 ":perf_test",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000338 ":rtp_test_utils",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200339 ":test_common",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200340 ":test_main",
341 ":test_support",
342 ":test_support_test_artifacts",
343 ":video_test_common",
344 ":video_test_support",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200345 "../api:create_simulcast_test_fixture_api",
346 "../api:simulcast_test_fixture_api",
Danil Chapovalov99b71df2018-10-26 15:57:48 +0200347 "../api/test/video:function_video_factory",
Jiawei Ouc2ebe212018-11-08 10:02:56 -0800348 "../api/video:builtin_video_bitrate_allocator_factory",
Yves Gerey3e707812018-11-28 16:47:49 +0100349 "../api/video:video_frame",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200350 "../api/video:video_frame_i420",
Benjamin Wright9db8b882019-01-14 15:30:20 -0800351 "../call:video_stream_api",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200352 "../modules/rtp_rtcp:rtp_rtcp",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200353 "../modules/video_capture",
354 "../modules/video_coding:simulcast_test_fixture_impl",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000355 "../rtc_base:rtc_base_approved",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200356 "../test:single_threaded_task_queue",
Artem Titov4895b452019-01-14 16:54:04 +0100357 "pc/e2e:e2e_unittests",
Sebastian Jansson98b07e92018-09-27 13:47:01 +0200358 "scenario:scenario_unittests",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200359 "//testing/gmock",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200360 "//testing/gtest",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200361 "//third_party/abseil-cpp/absl/memory",
Artem Titov645df9e2019-01-14 14:21:59 +0100362 "//third_party/abseil-cpp/absl/strings",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000363 ]
364 sources = [
Benjamin Wright9db8b882019-01-14 15:30:20 -0800365 "call_config_utils_unittest.cc",
Sebastian Jansson09408112018-04-24 14:41:22 +0200366 "direct_transport_unittest.cc",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200367 "fake_vp8_encoder_unittest.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000368 "frame_generator_unittest.cc",
369 "rtp_file_reader_unittest.cc",
370 "rtp_file_writer_unittest.cc",
371 "single_threaded_task_queue_unittest.cc",
372 "testsupport/always_passing_unittest.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000373 "testsupport/perf_test_unittest.cc",
Edward Lemuraf8659a2017-09-27 14:46:24 +0200374 "testsupport/test_artifacts_unittest.cc",
Artem Titov645df9e2019-01-14 14:21:59 +0100375 "testsupport/y4m_frame_reader_unittest.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000376 "testsupport/y4m_frame_writer_unittest.cc",
377 "testsupport/yuv_frame_reader_unittest.cc",
378 "testsupport/yuv_frame_writer_unittest.cc",
379 ]
380
Oleh Prypin5ab68542017-09-25 09:18:00 +0000381 if (!build_with_chromium && is_clang) {
382 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
383 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
384 }
385
386 data = test_support_unittests_resources
387 if (is_android) {
388 deps += [ "//testing/android/native_test:native_test_support" ]
389 shard_timeout = 900
390 }
391
392 if (is_ios) {
393 deps += [ ":test_support_unittests_bundle_data" ]
394 }
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200395
Mirko Bonadei9098b302018-04-06 10:48:10 +0200396 if (!is_android && !build_with_chromium) {
397 # This is needed in order to avoid:
398 # undefined symbol: webrtc::videocapturemodule::VideoCaptureImpl::Create
399 deps += [ "../modules/video_capture:video_capture_internal_impl" ]
400 }
Oleh Prypin5ab68542017-09-25 09:18:00 +0000401 }
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200402}
403
mbonadeicd95a4e2017-08-23 23:55:54 -0700404if (is_ios) {
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200405 rtc_source_set("fileutils_ios_objc") {
Artem Titov8f726be2018-10-23 15:50:10 +0200406 visibility = [
407 ":fileutils",
408 ":fileutils_override_impl",
409 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700410 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800411 "testsupport/ios_file_utils.h",
412 "testsupport/ios_file_utils.mm",
Steve Antonaec15aa2019-01-11 09:13:07 -0800413 "testsupport/iosfileutils.h",
mbonadeicd95a4e2017-08-23 23:55:54 -0700414 ]
415 deps = [
416 "..:webrtc_common",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100417 "../rtc_base:checks",
mbonadeicd95a4e2017-08-23 23:55:54 -0700418 "../rtc_base:rtc_base_approved",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200419 "../sdk:helpers_objc",
mbonadeicd95a4e2017-08-23 23:55:54 -0700420 ]
421 }
422}
423
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200424if (is_mac) {
425 rtc_source_set("fileutils_mac_objc") {
Artem Titov8f726be2018-10-23 15:50:10 +0200426 visibility = [
427 ":fileutils",
428 ":fileutils_override_impl",
429 ]
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200430 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800431 "testsupport/mac_file_utils.h",
432 "testsupport/mac_file_utils.mm",
Steve Antonaec15aa2019-01-11 09:13:07 -0800433 "testsupport/macfileutils.h",
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200434 ]
435 deps = [
436 "../rtc_base:checks",
437 ]
438 }
439}
440
mbonadei9452c622017-04-27 12:29:29 -0700441rtc_source_set("fileutils") {
442 testonly = true
Patrik Höglund7696bef2018-03-15 15:05:39 +0100443 visibility = [ "*" ]
mbonadei9452c622017-04-27 12:29:29 -0700444 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800445 "testsupport/file_utils.cc",
446 "testsupport/file_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800447 "testsupport/fileutils.h",
mbonadei9452c622017-04-27 12:29:29 -0700448 ]
mbonadei3edccb92017-06-01 04:47:20 -0700449 deps = [
Artem Titov8f726be2018-10-23 15:50:10 +0200450 ":fileutils_override_api",
451 ":fileutils_override_impl",
452 "..:webrtc_common",
453 "../rtc_base:checks",
454 "../rtc_base:rtc_base_approved",
455 "../rtc_base/system:arch",
456 "//third_party/abseil-cpp/absl/types:optional",
457 ]
458 if (is_ios) {
459 deps += [ ":fileutils_ios_objc" ]
460 }
461 if (is_mac) {
462 deps += [ ":fileutils_mac_objc" ]
463 }
464 if (is_win) {
465 deps += [ "../rtc_base:rtc_base" ]
466 }
467}
468
469# We separate header into own target to make it possible for downstream
470# projects to override implementation.
471rtc_source_set("fileutils_override_api") {
472 testonly = true
473 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800474 "testsupport/file_utils_override.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800475 "testsupport/fileutils_override.h",
Artem Titov8f726be2018-10-23 15:50:10 +0200476 ]
477}
478
479rtc_source_set("fileutils_override_impl") {
480 testonly = true
481 visibility = [ ":fileutils" ]
482 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800483 "testsupport/file_utils_override.cc",
Artem Titov8f726be2018-10-23 15:50:10 +0200484 ]
485 deps = [
486 ":fileutils_override_api",
mbonadei3edccb92017-06-01 04:47:20 -0700487 "..:webrtc_common",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100488 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700489 "../rtc_base:rtc_base_approved",
Niels Möllera12c42a2018-07-25 16:05:48 +0200490 "../rtc_base/system:arch",
Danil Chapovalov431abd92018-06-18 12:54:17 +0200491 "//third_party/abseil-cpp/absl/types:optional",
mbonadei3edccb92017-06-01 04:47:20 -0700492 ]
mbonadei9452c622017-04-27 12:29:29 -0700493 if (is_ios) {
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200494 deps += [ ":fileutils_ios_objc" ]
495 }
496 if (is_mac) {
497 deps += [ ":fileutils_mac_objc" ]
mbonadei3edccb92017-06-01 04:47:20 -0700498 }
499 if (is_win) {
ehmaldonadof6a861a2017-07-19 10:40:47 -0700500 deps += [ "../rtc_base:rtc_base" ]
mbonadei9452c622017-04-27 12:29:29 -0700501 }
mbonadei9452c622017-04-27 12:29:29 -0700502}
503
504rtc_source_set("run_test") {
505 testonly = true
mbonadeicd95a4e2017-08-23 23:55:54 -0700506 if (is_mac) {
507 public_deps = [
508 ":run_test_objc",
509 ]
510 } else {
511 public_deps = [
512 ":run_test_generic",
513 ]
514 }
515}
516
517rtc_source_set("run_test_interface") {
mbonadei9452c622017-04-27 12:29:29 -0700518 sources = [
519 "run_test.h",
520 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700521}
522
523if (is_mac) {
524 rtc_source_set("run_test_objc") {
525 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700526 visibility = [ ":run_test" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700527 sources = [
528 "mac/run_test.mm",
529 ]
mbonadei9c296b32017-09-05 05:11:41 -0700530 deps = [
mbonadeicd95a4e2017-08-23 23:55:54 -0700531 ":run_test_interface",
532 ]
mbonadei9452c622017-04-27 12:29:29 -0700533 }
534}
535
mbonadeicd95a4e2017-08-23 23:55:54 -0700536rtc_source_set("run_test_generic") {
537 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700538 visibility = [ ":run_test" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700539 sources = [
540 "run_test.cc",
541 ]
mbonadei9c296b32017-09-05 05:11:41 -0700542 deps = [
mbonadeicd95a4e2017-08-23 23:55:54 -0700543 ":run_test_interface",
544 ]
545}
546
ehmaldonado37535bf2016-12-05 06:42:45 -0800547rtc_source_set("fileutils_unittests") {
548 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700549 visibility = [ ":*" ] # Only targets in this file can depend on this.
ehmaldonado37535bf2016-12-05 06:42:45 -0800550 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800551 "testsupport/file_utils_unittest.cc",
ehmaldonado37535bf2016-12-05 06:42:45 -0800552 ]
553 deps = [
554 ":fileutils",
mbonadei3edccb92017-06-01 04:47:20 -0700555 ":test_support",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100556 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700557 "../rtc_base:rtc_base_approved",
ehmaldonado37535bf2016-12-05 06:42:45 -0800558 "//testing/gtest",
Danil Chapovalov431abd92018-06-18 12:54:17 +0200559 "//third_party/abseil-cpp/absl/types:optional",
ehmaldonado37535bf2016-12-05 06:42:45 -0800560 ]
561}
kjellander0f380d82016-06-01 04:48:26 -0700562
perkj488c5dc2017-02-08 05:55:51 -0800563rtc_source_set("direct_transport") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000564 visibility = [ "*" ]
perkj488c5dc2017-02-08 05:55:51 -0800565 testonly = true
566 sources = [
567 "direct_transport.cc",
568 "direct_transport.h",
perkj488c5dc2017-02-08 05:55:51 -0800569 ]
570 if (!build_with_chromium && is_clang) {
571 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
572 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
573 }
574 deps = [
mbonadei3edccb92017-06-01 04:47:20 -0700575 "..:webrtc_common",
Artem Titov46c4e602018-08-17 14:26:54 +0200576 "../api:simulated_network_api",
perkj488c5dc2017-02-08 05:55:51 -0800577 "../api:transport_api",
Mirko Bonadeia0e1a552017-12-04 10:50:51 +0100578 "../call:call_interfaces",
Artem Titov46c4e602018-08-17 14:26:54 +0200579 "../call:simulated_packet_receiver",
mbonadei3edccb92017-06-01 04:47:20 -0700580 "../modules/rtp_rtcp",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700581 "../rtc_base:rtc_base_approved",
eladalon413ee9a2017-08-22 04:02:52 -0700582 "../rtc_base:sequenced_task_checker",
mbonadei3edccb92017-06-01 04:47:20 -0700583 "../system_wrappers",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200584 "//third_party/abseil-cpp/absl/memory",
perkj488c5dc2017-02-08 05:55:51 -0800585 ]
eladalon413ee9a2017-08-22 04:02:52 -0700586 public_deps = [
587 ":single_threaded_task_queue",
Erik Språng09708512018-03-14 15:16:50 +0100588 "../call:fake_network",
eladalon413ee9a2017-08-22 04:02:52 -0700589 ]
590}
591
592rtc_source_set("single_threaded_task_queue") {
593 testonly = true
594 sources = [
595 "single_threaded_task_queue.cc",
596 "single_threaded_task_queue.h",
597 ]
598 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100599 "../rtc_base:checks",
eladalon413ee9a2017-08-22 04:02:52 -0700600 "../rtc_base:rtc_base_approved",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200601 "//third_party/abseil-cpp/absl/memory",
eladalon413ee9a2017-08-22 04:02:52 -0700602 ]
perkj488c5dc2017-02-08 05:55:51 -0800603}
604
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200605rtc_source_set("fake_video_codecs") {
Oskar Sundbom8984cd62019-01-10 11:48:52 +0000606 testonly = true
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200607 visibility = [ "*" ]
608 sources = [
609 "configurable_frame_size_encoder.cc",
610 "configurable_frame_size_encoder.h",
611 "fake_decoder.cc",
612 "fake_decoder.h",
613 "fake_encoder.cc",
614 "fake_encoder.h",
Per Kjellander841c9122018-10-04 18:40:28 +0200615 "fake_vp8_decoder.cc",
616 "fake_vp8_decoder.h",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200617 "fake_vp8_encoder.cc",
618 "fake_vp8_encoder.h",
619 ]
620 if (!build_with_chromium && is_clang) {
621 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
622 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
623 }
624 deps = [
625 "..:webrtc_common",
Niels Möller4dc66c52018-10-05 14:17:58 +0200626 "../api/video:encoded_image",
Yves Gerey3e707812018-11-28 16:47:49 +0100627 "../api/video:video_bitrate_allocation",
628 "../api/video:video_frame",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200629 "../api/video:video_frame_i420",
Erik Språng4529fbc2018-10-12 10:30:31 +0200630 "../api/video_codecs:create_vp8_temporal_layers",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200631 "../api/video_codecs:video_codecs_api",
632 "../common_video:common_video",
Yves Gerey3e707812018-11-28 16:47:49 +0100633 "../modules:module_api",
634 "../modules/video_coding:codec_globals_headers",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200635 "../modules/video_coding:video_codec_interface",
636 "../modules/video_coding:video_coding_utility",
637 "../modules/video_coding:webrtc_h264",
638 "../modules/video_coding:webrtc_vp8",
639 "../modules/video_coding:webrtc_vp9",
640 "../rtc_base:checks",
641 "../rtc_base:rtc_base_approved",
642 "../rtc_base:rtc_task_queue",
643 "../rtc_base:sequenced_task_checker",
644 "../system_wrappers",
Yves Gerey3e707812018-11-28 16:47:49 +0100645 "//third_party/abseil-cpp/absl/types:optional",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200646 ]
647}
648
ehmaldonado38a21322016-09-02 04:10:34 -0700649rtc_source_set("test_common") {
kjellander0f380d82016-06-01 04:48:26 -0700650 testonly = true
651 sources = [
652 "call_test.cc",
653 "call_test.h",
kjellander0f380d82016-06-01 04:48:26 -0700654 "constants.cc",
655 "constants.h",
kjellander0f380d82016-06-01 04:48:26 -0700656 "drifting_clock.cc",
657 "drifting_clock.h",
658 "encoder_settings.cc",
659 "encoder_settings.h",
sakal55d932b2016-09-30 06:19:08 -0700660 "fake_videorenderer.h",
kjellander0f380d82016-06-01 04:48:26 -0700661 "layer_filtering_transport.cc",
662 "layer_filtering_transport.h",
Danil Chapovalovdd7e2842018-03-09 15:37:03 +0000663 "mock_transport.cc",
kjellander0f380d82016-06-01 04:48:26 -0700664 "mock_transport.h",
kjellander0f380d82016-06-01 04:48:26 -0700665 "null_transport.cc",
666 "null_transport.h",
667 "rtp_rtcp_observer.h",
668 "statistics.cc",
669 "statistics.h",
Niels Möllercbcbc222018-09-28 09:07:24 +0200670 "video_decoder_proxy_factory.h",
671 "video_encoder_proxy_factory.h",
kjellander0f380d82016-06-01 04:48:26 -0700672 ]
Robin Raymondce1b1402018-11-22 20:10:11 -0500673 if (current_os != "winuwp") {
674 # The filtering of *_win.cc is not done for WinUWP (intentionally) as
675 # most _win.cc files are compatible with WinUWP. However, the
676 # peek/dispatch Win32 runloops are entirely WinUWP incompatible thus
677 # WinUWP uses the generic runloop as defined for non-Windows targets.
678 sources += [ "win/run_loop_win.cc" ]
679 }
680 if (!is_win || current_os == "winuwp") {
kjellander0f380d82016-06-01 04:48:26 -0700681 sources += [
682 "run_loop.cc",
683 "run_loop.h",
684 ]
685 }
686
kjellandere40a7ee2016-10-16 23:56:12 -0700687 if (!build_with_chromium && is_clang) {
688 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700689 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -0700690 }
691
692 deps = [
perkj488c5dc2017-02-08 05:55:51 -0800693 ":direct_transport",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200694 ":fake_video_codecs",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100695 ":fileutils",
kjellander0f380d82016-06-01 04:48:26 -0700696 ":rtp_test_utils",
697 ":test_support",
perkjc5726c12017-03-01 03:37:08 -0800698 ":video_test_common",
Yves Gerey3e707812018-11-28 16:47:49 +0100699 "../:webrtc_common",
Patrik Höglundbe214a22018-01-04 12:14:35 +0100700 "../api:libjingle_peerconnection_api",
Artem Titov46c4e602018-08-17 14:26:54 +0200701 "../api:simulated_network_api",
mbonadei3edccb92017-06-01 04:47:20 -0700702 "../api:transport_api",
mbonadei3edccb92017-06-01 04:47:20 -0700703 "../api/audio_codecs:builtin_audio_decoder_factory",
ossueb1fde42017-05-02 06:46:30 -0700704 "../api/audio_codecs:builtin_audio_encoder_factory",
Danil Chapovalovddc84e92018-10-24 17:01:58 +0200705 "../api/test/video:function_video_factory",
Jiawei Ouc2ebe212018-11-08 10:02:56 -0800706 "../api/video:builtin_video_bitrate_allocator_factory",
707 "../api/video:video_bitrate_allocator_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200708 "../api/video:video_frame",
ilnikd60d06a2017-04-05 03:02:20 -0700709 "../api/video_codecs:video_codecs_api",
kjellander94cee312016-06-10 01:56:57 -0700710 "../audio",
kjellander94cee312016-06-10 01:56:57 -0700711 "../call",
Mirko Bonadeia0e1a552017-12-04 10:50:51 +0100712 "../call:call_interfaces",
Artem Titov4e199e92018-08-20 13:30:39 +0200713 "../call:fake_network",
Yves Gerey3e707812018-11-28 16:47:49 +0100714 "../call:rtp_interfaces",
sprangdb2a9fc2017-08-09 06:42:32 -0700715 "../call:rtp_sender",
Artem Titov4e199e92018-08-20 13:30:39 +0200716 "../call:simulated_network",
Artem Titov46c4e602018-08-17 14:26:54 +0200717 "../call:simulated_packet_receiver",
aleloi440b6d92017-08-22 05:43:23 -0700718 "../call:video_stream_api",
mbonadei3edccb92017-06-01 04:47:20 -0700719 "../logging:rtc_event_log_api",
Qingsi Wang970b0882018-02-01 11:04:46 -0800720 "../logging:rtc_event_log_impl_base",
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800721 "../media:rtc_internal_video_codecs",
Mirko Bonadeiad627922017-11-30 17:16:21 +0100722 "../media:rtc_media_base",
Artem Titov3faa8322018-03-07 14:44:00 +0100723 "../modules/audio_device",
Paulina Hensman7bd79a02018-03-15 12:44:12 +0100724 "../modules/audio_device:audio_device_impl",
mbonadei3edccb92017-06-01 04:47:20 -0700725 "../modules/audio_device:mock_audio_device",
aleloi10111bc2016-11-17 06:48:48 -0800726 "../modules/audio_mixer:audio_mixer_impl",
aleloidd310712016-11-17 06:28:59 -0800727 "../modules/audio_processing",
mbonadei3edccb92017-06-01 04:47:20 -0700728 "../modules/rtp_rtcp",
729 "../modules/rtp_rtcp:mock_rtp_rtcp",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100730 "../modules/rtp_rtcp:rtp_rtcp_format",
Yves Gerey3e707812018-11-28 16:47:49 +0100731 "../modules/rtp_rtcp:rtp_video_header",
732 "../modules/video_coding:codec_globals_headers",
charujaincb728ea2017-09-18 03:08:08 -0700733 "../modules/video_coding:video_coding_utility",
mbonadei3edccb92017-06-01 04:47:20 -0700734 "../modules/video_coding:webrtc_h264",
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800735 "../modules/video_coding:webrtc_multiplex",
Sergio Garcia Murillo43800f92018-06-21 16:16:38 +0200736 "../modules/video_coding:webrtc_vp8",
mbonadei3edccb92017-06-01 04:47:20 -0700737 "../modules/video_coding:webrtc_vp9",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100738 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700739 "../rtc_base:rtc_base_approved",
mbonadei3edccb92017-06-01 04:47:20 -0700740 "../system_wrappers",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200741 "../system_wrappers:field_trial",
kjellander94cee312016-06-10 01:56:57 -0700742 "../video",
kjellander0f380d82016-06-01 04:48:26 -0700743 "//testing/gtest",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200744 "//third_party/abseil-cpp/absl/memory",
kjellander0f380d82016-06-01 04:48:26 -0700745 ]
mbonadei148d5a22017-04-28 05:24:50 -0700746 if (!is_android && !build_with_chromium) {
oprypin92220ff2017-03-23 03:40:03 -0700747 deps += [ "../modules/video_capture:video_capture_internal_impl" ]
748 }
kjellander0f380d82016-06-01 04:48:26 -0700749}
750
ehmaldonado38a21322016-09-02 04:10:34 -0700751rtc_source_set("test_renderer") {
mbonadei9c296b32017-09-05 05:11:41 -0700752 public_deps = [
753 ":test_renderer_generic",
754 ]
kjellander0f380d82016-06-01 04:48:26 -0700755 testonly = true
mbonadeicd95a4e2017-08-23 23:55:54 -0700756 if (is_mac) {
mbonadei9c296b32017-09-05 05:11:41 -0700757 public_deps += [ ":test_renderer_objc" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700758 }
759}
760
761if (is_mac) {
762 rtc_source_set("test_renderer_objc") {
763 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700764 visibility = [ ":test_renderer" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700765 sources = [
766 "mac/video_renderer_mac.h",
767 "mac/video_renderer_mac.mm",
768 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700769 deps = [
mbonadei9c296b32017-09-05 05:11:41 -0700770 ":test_renderer_generic",
mbonadeicd95a4e2017-08-23 23:55:54 -0700771 "../rtc_base:rtc_base_approved",
772 ]
773 libs = [
774 "Cocoa.framework",
775 "OpenGL.framework",
776 "CoreVideo.framework",
777 ]
778 if (!build_with_chromium && is_clang) {
779 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
780 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
781 }
782 }
783}
784
785rtc_source_set("test_renderer_generic") {
786 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700787 visibility = [
788 ":test_renderer",
789 ":test_renderer_objc",
790 ]
kjellander0f380d82016-06-01 04:48:26 -0700791 libs = []
792 sources = [
kjellander0f380d82016-06-01 04:48:26 -0700793 "video_renderer.cc",
794 "video_renderer.h",
795 "win/d3d_renderer.cc",
796 "win/d3d_renderer.h",
797 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700798 deps = [
799 ":test_support",
800 "..:webrtc_common",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200801 "../api/video:video_frame",
mbonadeicd95a4e2017-08-23 23:55:54 -0700802 "../common_video",
Mirko Bonadeiad627922017-11-30 17:16:21 +0100803 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100804 "../rtc_base:checks",
mbonadeicd95a4e2017-08-23 23:55:54 -0700805 "../rtc_base:rtc_base_approved",
806 "//testing/gtest",
807 ]
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100808 if (!(is_linux && rtc_use_x11) && !is_mac && !is_win) {
kjellander0f380d82016-06-01 04:48:26 -0700809 sources += [ "null_platform_renderer.cc" ]
810 }
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100811 if ((is_linux && rtc_use_x11) || is_mac) {
kjellander0f380d82016-06-01 04:48:26 -0700812 sources += [
813 "gl/gl_renderer.cc",
814 "gl/gl_renderer.h",
815 ]
816 }
817
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100818 if (is_linux && rtc_use_x11) {
Edward Lemur84a87c42017-11-07 19:07:31 +0100819 sources += [
820 "linux/glx_renderer.cc",
821 "linux/glx_renderer.h",
822 "linux/video_renderer_linux.cc",
823 ]
kjellander0f380d82016-06-01 04:48:26 -0700824 libs += [
825 "Xext",
826 "X11",
827 "GL",
828 ]
829 }
830 if (is_android) {
831 libs += [
832 "GLESv2",
833 "log",
834 ]
835 }
kjellander0f380d82016-06-01 04:48:26 -0700836
kjellandere40a7ee2016-10-16 23:56:12 -0700837 if (!build_with_chromium && is_clang) {
838 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700839 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -0700840 }
kjellander0f380d82016-06-01 04:48:26 -0700841}
kwiberg37e99fd2017-04-10 05:15:48 -0700842
843rtc_source_set("audio_codec_mocks") {
844 testonly = true
845 sources = [
Niels Möller3f651d82018-12-19 15:06:17 +0100846 # TODO(nisse): Move these factories to their own target, to avoid
847 # unnecessary dependencies on gmock and gtest.
Niels Möllerb7180c02018-12-06 13:07:11 +0100848 "audio_decoder_proxy_factory.h",
Niels Möllera0f44302018-11-30 10:45:12 +0100849 "function_audio_decoder_factory.h",
kwiberg2b3aa142017-06-14 03:31:17 -0700850 "mock_audio_decoder.cc",
kwiberg37e99fd2017-04-10 05:15:48 -0700851 "mock_audio_decoder.h",
852 "mock_audio_decoder_factory.h",
ossueb1fde42017-05-02 06:46:30 -0700853 "mock_audio_encoder.cc",
854 "mock_audio_encoder.h",
855 "mock_audio_encoder_factory.h",
856 ]
857
858 deps = [
mbonadei3edccb92017-06-01 04:47:20 -0700859 ":test_support",
kwiberg529662a2017-09-04 05:43:17 -0700860 "../api:array_view",
ossueb1fde42017-05-02 06:46:30 -0700861 "../api/audio_codecs:audio_codecs_api",
mbonadei3edccb92017-06-01 04:47:20 -0700862 "../api/audio_codecs:builtin_audio_decoder_factory",
Niels Möllera0f44302018-11-30 10:45:12 +0100863 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700864 "../rtc_base:rtc_base_approved",
Niels Möllera0f44302018-11-30 10:45:12 +0100865 "//third_party/abseil-cpp/absl/memory",
kwiberg37e99fd2017-04-10 05:15:48 -0700866 ]
867}
sakald7fdb802017-05-26 01:51:53 -0700868
Artem Titov66a29b92019-01-15 14:43:20 +0100869rtc_source_set("copy_to_file_audio_capturer") {
870 testonly = true
871 sources = [
872 "testsupport/copy_to_file_audio_capturer.cc",
873 "testsupport/copy_to_file_audio_capturer.h",
874 ]
875 deps = [
876 "../api:array_view",
877 "../common_audio:common_audio",
878 "../modules/audio_device:audio_device_impl",
879 "../rtc_base:rtc_base_approved",
880 "//third_party/abseil-cpp/absl/memory",
881 "//third_party/abseil-cpp/absl/types:optional",
882 ]
883}
884
885rtc_source_set("copy_to_file_audio_capturer_unittest") {
886 testonly = true
887 sources = [
888 "testsupport/copy_to_file_audio_capturer_unittest.cc",
889 ]
890 deps = [
891 ":copy_to_file_audio_capturer",
892 ":fileutils",
893 ":test_support",
894 "../modules/audio_device:audio_device_impl",
895 "//third_party/abseil-cpp/absl/memory",
896 ]
897}
898
sakald7fdb802017-05-26 01:51:53 -0700899if (!build_with_chromium && is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000900 rtc_android_library("native_test_java") {
sakald7fdb802017-05-26 01:51:53 -0700901 testonly = true
902 java_files = [
903 "android/org/webrtc/native_test/RTCNativeUnitTest.java",
904 "android/org/webrtc/native_test/RTCNativeUnitTestActivity.java",
905 ]
906 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700907 "../rtc_base:base_java",
sakald7fdb802017-05-26 01:51:53 -0700908 "//testing/android/native_test:native_test_java",
sakald7fdb802017-05-26 01:51:53 -0700909 ]
910 }
911}
Benjamin Wright8efafdf2019-01-11 10:48:42 -0800912
913rtc_source_set("call_config_utils") {
914 sources = [
915 "call_config_utils.cc",
916 "call_config_utils.h",
917 ]
918 deps = [
919 "../call:call_interfaces",
920 "../call:video_stream_api",
921 "../rtc_base:rtc_json",
922 ]
923}