blob: e75a446fd4ec3732545857fc3d99107e03cabd08 [file] [log] [blame]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +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
mbonadei9aa3f0a2017-01-24 06:58:22 -08009import("../webrtc.gni")
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000010
kjellanderb62dbbe2016-09-23 00:38:52 -070011rtc_static_library("video") {
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000012 sources = [
Peter Boström7623ce42015-12-09 12:13:30 +010013 "call_stats.cc",
14 "call_stats.h",
mflodman15d83572016-10-06 08:35:11 -070015 "encoder_rtcp_feedback.cc",
16 "encoder_rtcp_feedback.h",
Peter Boström7623ce42015-12-09 12:13:30 +010017 "overuse_frame_detector.cc",
18 "overuse_frame_detector.h",
19 "payload_router.cc",
20 "payload_router.h",
palmkvist349092b2016-12-13 02:45:57 -080021 "quality_threshold.cc",
22 "quality_threshold.h",
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000023 "receive_statistics_proxy.cc",
24 "receive_statistics_proxy.h",
Peter Boström7623ce42015-12-09 12:13:30 +010025 "report_block_stats.cc",
26 "report_block_stats.h",
mflodman4cd27902016-08-05 06:28:45 -070027 "rtp_streams_synchronizer.cc",
28 "rtp_streams_synchronizer.h",
nisseb1f2ff92017-06-09 04:01:55 -070029 "rtp_video_stream_receiver.cc",
30 "rtp_video_stream_receiver.h",
asapersson35151f32016-05-02 23:44:01 -070031 "send_delay_stats.cc",
32 "send_delay_stats.h",
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000033 "send_statistics_proxy.cc",
34 "send_statistics_proxy.h",
asapersson0e9d6d92016-05-23 06:07:55 -070035 "stats_counter.cc",
36 "stats_counter.h",
Peter Boström7623ce42015-12-09 12:13:30 +010037 "stream_synchronization.cc",
38 "stream_synchronization.h",
charujainbf6a45b2016-11-03 04:21:42 -070039 "transport_adapter.cc",
40 "transport_adapter.h",
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000041 "video_receive_stream.cc",
42 "video_receive_stream.h",
43 "video_send_stream.cc",
44 "video_send_stream.h",
mflodmancfc8e3b2016-05-03 21:22:04 -070045 "video_stream_decoder.cc",
46 "video_stream_decoder.h",
mflodmancc3d4422017-08-03 08:27:51 -070047 "video_stream_encoder.cc",
48 "video_stream_encoder.h",
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000049 ]
50
kjellandere40a7ee2016-10-16 23:56:12 -070051 if (!build_with_chromium && is_clang) {
52 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070053 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000054 }
55
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000056 deps = [
57 "..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -070058 "../api:optional",
aleloia8eb7562016-11-28 07:02:13 -080059 "../api:transport_api",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +010060 "../api:video_frame_api_i420",
ilnikd60d06a2017-04-05 03:02:20 -070061 "../api/video_codecs:video_codecs_api",
Mirko Bonadei245660a2017-10-10 14:38:11 +020062 "../call:bitrate_allocator",
mbonadei9087d492017-04-25 00:35:35 -070063 "../call:call_interfaces",
nissed76b7b22017-06-01 04:02:35 -070064 "../call:rtp_interfaces",
aleloi440b6d92017-08-22 05:43:23 -070065 "../call:video_stream_api",
nisseca5706d2017-09-11 02:32:16 -070066
67 # For RtxReceiveStream.
68 "../call:rtp_receiver",
Peter Boström2ee24392015-06-22 07:57:16 +020069 "../common_video",
skvladcc91d282016-10-03 18:31:22 -070070 "../logging:rtc_event_log_api",
philipel022b54e2016-12-20 04:15:59 -080071 "../media:rtc_media_base",
mbonadei1140f972017-04-26 03:38:35 -070072 "../modules:module_api",
Peter Boström2ee24392015-06-22 07:57:16 +020073 "../modules/bitrate_controller",
kjellander@webrtc.org7ffeab52016-02-26 22:46:09 +010074 "../modules/congestion_controller",
sprangebbf8a82015-09-21 15:11:14 -070075 "../modules/pacing",
kjellander@webrtc.org7ffeab52016-02-26 22:46:09 +010076 "../modules/remote_bitrate_estimator",
Peter Boström2ee24392015-06-22 07:57:16 +020077 "../modules/rtp_rtcp",
78 "../modules/utility",
Peter Boström2ee24392015-06-22 07:57:16 +020079 "../modules/video_coding",
mbonadei9087d492017-04-25 00:35:35 -070080 "../modules/video_coding:video_coding_utility",
81 "../modules/video_coding:webrtc_vp8",
Peter Boström2ee24392015-06-22 07:57:16 +020082 "../modules/video_processing",
ehmaldonadof6a861a2017-07-19 10:40:47 -070083 "../rtc_base:rtc_base_approved",
84 "../rtc_base:rtc_numerics",
85 "../rtc_base:rtc_task_queue",
86 "../rtc_base:sequenced_task_checker",
87 "../rtc_base:weak_ptr",
kjellander8237abf2015-12-08 07:12:06 -080088 "../system_wrappers",
Peter Boström7623ce42015-12-09 12:13:30 +010089 "../voice_engine",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000090 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000091}
Peter Boström02083222016-06-14 12:52:54 +020092
93if (rtc_include_tests) {
kjellandera3cac052016-10-24 01:52:39 -070094 rtc_source_set("video_quality_test") {
95 testonly = true
kjellandere0629c02017-04-25 04:04:50 -070096 visibility = [ ":*" ] # Only targets in this file can depend on this.
kjellandera3cac052016-10-24 01:52:39 -070097 sources = [
98 "video_quality_test.cc",
99 "video_quality_test.h",
100 ]
101 deps = [
kwiberg84f6a3f2017-09-05 08:43:13 -0700102 "../api:optional",
mbonadei9087d492017-04-25 00:35:35 -0700103 "../call:call_interfaces",
104 "../common_video",
105 "../logging:rtc_event_log_api",
sprang67561a62017-06-15 06:34:42 -0700106 "../media:rtc_media",
magjedceecea42016-11-28 07:20:21 -0800107 "../media:rtc_media_base",
mbonadei9087d492017-04-25 00:35:35 -0700108 "../modules/audio_mixer:audio_mixer_impl",
109 "../modules/rtp_rtcp",
110 "../modules/video_coding:webrtc_h264",
111 "../modules/video_coding:webrtc_vp8",
112 "../modules/video_coding:webrtc_vp9",
mbonadei95c8f652017-08-27 23:40:10 -0700113 "../rtc_base:rtc_base_approved",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700114 "../rtc_base:rtc_base_tests_utils",
115 "../rtc_base:rtc_task_queue",
kjellandera3cac052016-10-24 01:52:39 -0700116 "../system_wrappers",
Jianjun Zhu037f3e42017-08-15 21:48:37 +0800117 "../test:rtp_test_utils",
mbonadei9087d492017-04-25 00:35:35 -0700118 "../test:test_common",
jianjun.zhuc0247402017-07-11 06:20:45 -0700119 "../test:test_renderer",
Jianjun Zhu037f3e42017-08-15 21:48:37 +0800120 "../test:test_renderer",
mbonadei9087d492017-04-25 00:35:35 -0700121 "../test:test_support",
Edward Lemuraf8659a2017-09-27 14:46:24 +0200122 "../test:test_support_test_artifacts",
jianjun.zhuc0247402017-07-11 06:20:45 -0700123 "../test:video_test_common",
Jianjun Zhu037f3e42017-08-15 21:48:37 +0800124 "../test:video_test_common",
ilnik59cac992017-07-25 05:45:03 -0700125 "../test:video_test_support",
mbonadei9087d492017-04-25 00:35:35 -0700126 "../voice_engine",
kjellandera3cac052016-10-24 01:52:39 -0700127 "//testing/gtest",
128 ]
kjellandera3cac052016-10-24 01:52:39 -0700129 if (!build_with_chromium && is_clang) {
130 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
131 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
132 }
133 }
134
ehmaldonado021eef32017-01-05 07:09:50 -0800135 rtc_source_set("video_full_stack_tests") {
136 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700137
138 # Skip restricting visibility on mobile platforms since the tests on those
139 # gets additional generated targets which would require many lines here to
140 # cover (which would be confusing to read and hard to maintain).
141 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700142 visibility = [ "..:webrtc_perf_tests" ]
kjellandere0629c02017-04-25 04:04:50 -0700143 }
ehmaldonado021eef32017-01-05 07:09:50 -0800144 sources = [
145 "full_stack_tests.cc",
146 ]
147 deps = [
148 ":video_quality_test",
sprang89c4a7e2017-06-30 13:27:40 -0700149 "../modules/pacing:pacing",
mbonadei9087d492017-04-25 00:35:35 -0700150 "../test:field_trial",
jianjun.zhuc0247402017-07-11 06:20:45 -0700151 "../test:test_common",
mbonadei9087d492017-04-25 00:35:35 -0700152 "../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800153 "//testing/gtest",
ehmaldonado021eef32017-01-05 07:09:50 -0800154 ]
155 if (!build_with_chromium && is_clang) {
156 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
157 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
158 }
159 if (rtc_use_h264) {
160 defines = [ "WEBRTC_USE_H264" ]
161 }
162 }
163
kjellandera3cac052016-10-24 01:52:39 -0700164 rtc_executable("video_loopback") {
165 testonly = true
166 sources = [
167 "video_loopback.cc",
168 ]
169 deps = [
170 ":video_quality_test",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700171 "../rtc_base:rtc_base_approved",
kjellandera3cac052016-10-24 01:52:39 -0700172 "../system_wrappers:metrics_default",
173 "../test:field_trial",
174 "../test:run_test",
mbonadei9c296b32017-09-05 05:11:41 -0700175 "../test:run_test_interface",
kjellandera3cac052016-10-24 01:52:39 -0700176 "../test:test_common",
177 "../test:test_renderer",
mbonadei9087d492017-04-25 00:35:35 -0700178 "../test:test_support",
kjellandera3cac052016-10-24 01:52:39 -0700179 "//testing/gmock",
180 "//testing/gtest",
kjellandera3cac052016-10-24 01:52:39 -0700181 ]
182 if (!build_with_chromium && is_clang) {
183 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
184 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
185 }
186 }
187
188 rtc_executable("screenshare_loopback") {
189 testonly = true
190 sources = [
191 "screenshare_loopback.cc",
192 ]
193
194 deps = [
195 ":video_quality_test",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700196 "../rtc_base:rtc_base_approved",
kjellandera3cac052016-10-24 01:52:39 -0700197 "../system_wrappers:metrics_default",
198 "../test:field_trial",
199 "../test:run_test",
mbonadei9c296b32017-09-05 05:11:41 -0700200 "../test:run_test_interface",
kjellandera3cac052016-10-24 01:52:39 -0700201 "../test:test_common",
202 "../test:test_renderer",
mbonadei9087d492017-04-25 00:35:35 -0700203 "../test:test_support",
kjellandera3cac052016-10-24 01:52:39 -0700204 ]
205 if (!build_with_chromium && is_clang) {
206 # Suppress warnings from Chrome's Clang plugins.
207 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
208 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
209 }
210 }
211
stefan64427e52016-12-20 07:26:58 -0800212 rtc_executable("video_replay") {
213 testonly = true
214 sources = [
215 "replay.cc",
216 ]
217 deps = [
mbonadei9087d492017-04-25 00:35:35 -0700218 "..:webrtc_common",
ilnikd60d06a2017-04-05 03:02:20 -0700219 "../api/video_codecs:video_codecs_api",
mbonadei9087d492017-04-25 00:35:35 -0700220 "../call:call_interfaces",
221 "../common_video",
222 "../logging:rtc_event_log_api",
223 "../modules/rtp_rtcp",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700224 "../rtc_base:rtc_base_approved",
mbonadei9087d492017-04-25 00:35:35 -0700225 "../system_wrappers",
stefan64427e52016-12-20 07:26:58 -0800226 "../system_wrappers:metrics_default",
227 "../test:field_trial",
mbonadei9087d492017-04-25 00:35:35 -0700228 "../test:rtp_test_utils",
stefan64427e52016-12-20 07:26:58 -0800229 "../test:run_test",
mbonadei9c296b32017-09-05 05:11:41 -0700230 "../test:run_test_interface",
stefan64427e52016-12-20 07:26:58 -0800231 "../test:test_common",
232 "../test:test_renderer",
mbonadei9087d492017-04-25 00:35:35 -0700233 "../test:test_support",
234 "../test:video_test_common",
philipel99b63452017-08-25 07:24:21 -0700235 "../test:video_test_support",
stefan64427e52016-12-20 07:26:58 -0800236 ]
stefan64427e52016-12-20 07:26:58 -0800237 if (!build_with_chromium && is_clang) {
238 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
239 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
240 }
241 }
242
Peter Boström02083222016-06-14 12:52:54 +0200243 # TODO(pbos): Rename test suite.
ehmaldonado38a21322016-09-02 04:10:34 -0700244 rtc_source_set("video_tests") {
Peter Boström02083222016-06-14 12:52:54 +0200245 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700246
247 # Skip restricting visibility on mobile platforms since the tests on those
248 # gets additional generated targets which would require many lines here to
249 # cover (which would be confusing to read and hard to maintain).
250 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700251 visibility = [ "..:video_engine_tests" ]
kjellandere0629c02017-04-25 04:04:50 -0700252 }
hta9aa96882016-12-06 05:36:03 -0800253 defines = []
Peter Boström02083222016-06-14 12:52:54 +0200254 sources = [
255 "call_stats_unittest.cc",
mflodman15d83572016-10-06 08:35:11 -0700256 "encoder_rtcp_feedback_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +0200257 "end_to_end_tests.cc",
258 "overuse_frame_detector_unittest.cc",
259 "payload_router_unittest.cc",
Sebastian Janssone92f93f2017-06-22 14:44:04 +0200260 "picture_id_tests.cc",
palmkvist349092b2016-12-13 02:45:57 -0800261 "quality_threshold_unittest.cc",
sakale5ba44e2016-10-26 07:09:24 -0700262 "receive_statistics_proxy_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +0200263 "report_block_stats_unittest.cc",
nisseb1f2ff92017-06-09 04:01:55 -0700264 "rtp_video_stream_receiver_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +0200265 "send_delay_stats_unittest.cc",
266 "send_statistics_proxy_unittest.cc",
267 "stats_counter_unittest.cc",
268 "stream_synchronization_unittest.cc",
johanf2183ff2017-02-28 01:33:09 -0800269 "video_receive_stream_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +0200270 "video_send_stream_tests.cc",
mflodmancc3d4422017-08-03 08:27:51 -0700271 "video_stream_encoder_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +0200272 ]
273 deps = [
274 ":video",
kwiberg84f6a3f2017-09-05 08:43:13 -0700275 "../api:optional",
mbonadei9087d492017-04-25 00:35:35 -0700276 "../api:video_frame_api",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100277 "../api:video_frame_api_i420",
mbonadei9087d492017-04-25 00:35:35 -0700278 "../api/video_codecs:video_codecs_api",
mbonadei9087d492017-04-25 00:35:35 -0700279 "../call:call_interfaces",
eladalone2173d92017-07-28 10:05:45 -0700280 "../call:mock_rtp_interfaces",
nisse0f15f922017-06-21 01:05:22 -0700281 "../call:rtp_receiver",
sprangdb2a9fc2017-08-09 06:42:32 -0700282 "../call:rtp_sender",
aleloi440b6d92017-08-22 05:43:23 -0700283 "../call:video_stream_api",
mbonadei9087d492017-04-25 00:35:35 -0700284 "../common_video",
285 "../logging:rtc_event_log_api",
brandtr5e171752017-05-23 03:32:16 -0700286 "../media:rtc_media",
magjedceecea42016-11-28 07:20:21 -0800287 "../media:rtc_media_base",
mbonadei9087d492017-04-25 00:35:35 -0700288 "../media:rtc_media_tests_utils",
mbonadei1140f972017-04-26 03:38:35 -0700289 "../modules:module_api",
mbonadei9087d492017-04-25 00:35:35 -0700290 "../modules/pacing",
291 "../modules/rtp_rtcp",
kjellandere0629c02017-04-25 04:04:50 -0700292 "../modules/rtp_rtcp:mock_rtp_rtcp",
mbonadei9087d492017-04-25 00:35:35 -0700293 "../modules/utility",
294 "../modules/video_coding",
295 "../modules/video_coding:video_coding_utility",
296 "../modules/video_coding:webrtc_h264",
297 "../modules/video_coding:webrtc_vp8",
298 "../modules/video_coding:webrtc_vp9",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700299 "../rtc_base:rtc_base_approved",
300 "../rtc_base:rtc_base_tests_utils",
Bjorn Tereliusa194e582017-10-25 13:07:09 +0200301 "../rtc_base:rtc_numerics",
mbonadei9087d492017-04-25 00:35:35 -0700302 "../system_wrappers",
303 "../system_wrappers:field_trial_default",
304 "../system_wrappers:metrics_api",
305 "../system_wrappers:metrics_default",
306 "../test:direct_transport",
307 "../test:field_trial",
308 "../test:rtp_test_utils",
309 "../test:test_common",
310 "../test:test_support",
311 "../test:video_test_common",
Peter Boström02083222016-06-14 12:52:54 +0200312 "//testing/gmock",
313 "//testing/gtest",
314 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700315 if (!build_with_chromium && is_clang) {
316 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700317 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Peter Boström02083222016-06-14 12:52:54 +0200318 }
brandtr445fb8f2016-11-14 04:11:23 -0800319 if (rtc_use_h264) {
hta9aa96882016-12-06 05:36:03 -0800320 defines += [ "WEBRTC_USE_H264" ]
brandtr445fb8f2016-11-14 04:11:23 -0800321 }
Peter Boström02083222016-06-14 12:52:54 +0200322 }
323}