blob: 202a7066cb49ef98aad415bad1d86fc98778f744 [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",
ilnikd60d06a2017-04-05 03:02:20 -070060 "../api/video_codecs:video_codecs_api",
mbonadei9087d492017-04-25 00:35:35 -070061 "../call:call_interfaces",
nissed76b7b22017-06-01 04:02:35 -070062 "../call:rtp_interfaces",
aleloi440b6d92017-08-22 05:43:23 -070063 "../call:video_stream_api",
nisseca5706d2017-09-11 02:32:16 -070064
65 # For RtxReceiveStream.
66 "../call:rtp_receiver",
Peter Boström2ee24392015-06-22 07:57:16 +020067 "../common_video",
skvladcc91d282016-10-03 18:31:22 -070068 "../logging:rtc_event_log_api",
philipel022b54e2016-12-20 04:15:59 -080069 "../media:rtc_media_base",
mbonadei1140f972017-04-26 03:38:35 -070070 "../modules:module_api",
Peter Boström2ee24392015-06-22 07:57:16 +020071 "../modules/bitrate_controller",
kjellander@webrtc.org7ffeab52016-02-26 22:46:09 +010072 "../modules/congestion_controller",
sprangebbf8a82015-09-21 15:11:14 -070073 "../modules/pacing",
kjellander@webrtc.org7ffeab52016-02-26 22:46:09 +010074 "../modules/remote_bitrate_estimator",
Peter Boström2ee24392015-06-22 07:57:16 +020075 "../modules/rtp_rtcp",
76 "../modules/utility",
Peter Boström2ee24392015-06-22 07:57:16 +020077 "../modules/video_coding",
mbonadei9087d492017-04-25 00:35:35 -070078 "../modules/video_coding:video_coding_utility",
79 "../modules/video_coding:webrtc_vp8",
Peter Boström2ee24392015-06-22 07:57:16 +020080 "../modules/video_processing",
ehmaldonadof6a861a2017-07-19 10:40:47 -070081 "../rtc_base:rtc_base_approved",
82 "../rtc_base:rtc_numerics",
83 "../rtc_base:rtc_task_queue",
84 "../rtc_base:sequenced_task_checker",
85 "../rtc_base:weak_ptr",
kjellander8237abf2015-12-08 07:12:06 -080086 "../system_wrappers",
Peter Boström7623ce42015-12-09 12:13:30 +010087 "../voice_engine",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000088 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000089}
Peter Boström02083222016-06-14 12:52:54 +020090
91if (rtc_include_tests) {
kjellandera3cac052016-10-24 01:52:39 -070092 rtc_source_set("video_quality_test") {
93 testonly = true
kjellandere0629c02017-04-25 04:04:50 -070094 visibility = [ ":*" ] # Only targets in this file can depend on this.
kjellandera3cac052016-10-24 01:52:39 -070095 sources = [
96 "video_quality_test.cc",
97 "video_quality_test.h",
98 ]
99 deps = [
kwiberg84f6a3f2017-09-05 08:43:13 -0700100 "../api:optional",
mbonadei9087d492017-04-25 00:35:35 -0700101 "../call:call_interfaces",
102 "../common_video",
103 "../logging:rtc_event_log_api",
sprang67561a62017-06-15 06:34:42 -0700104 "../media:rtc_media",
magjedceecea42016-11-28 07:20:21 -0800105 "../media:rtc_media_base",
mbonadei9087d492017-04-25 00:35:35 -0700106 "../modules/audio_mixer:audio_mixer_impl",
107 "../modules/rtp_rtcp",
108 "../modules/video_coding:webrtc_h264",
109 "../modules/video_coding:webrtc_vp8",
110 "../modules/video_coding:webrtc_vp9",
mbonadei95c8f652017-08-27 23:40:10 -0700111 "../rtc_base:rtc_base_approved",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700112 "../rtc_base:rtc_base_tests_utils",
113 "../rtc_base:rtc_task_queue",
kjellandera3cac052016-10-24 01:52:39 -0700114 "../system_wrappers",
Jianjun Zhu037f3e42017-08-15 21:48:37 +0800115 "../test:rtp_test_utils",
mbonadei9087d492017-04-25 00:35:35 -0700116 "../test:test_common",
jianjun.zhuc0247402017-07-11 06:20:45 -0700117 "../test:test_renderer",
Jianjun Zhu037f3e42017-08-15 21:48:37 +0800118 "../test:test_renderer",
mbonadei9087d492017-04-25 00:35:35 -0700119 "../test:test_support",
Edward Lemuraf8659a2017-09-27 14:46:24 +0200120 "../test:test_support_test_artifacts",
jianjun.zhuc0247402017-07-11 06:20:45 -0700121 "../test:video_test_common",
Jianjun Zhu037f3e42017-08-15 21:48:37 +0800122 "../test:video_test_common",
ilnik59cac992017-07-25 05:45:03 -0700123 "../test:video_test_support",
mbonadei9087d492017-04-25 00:35:35 -0700124 "../voice_engine",
kjellandera3cac052016-10-24 01:52:39 -0700125 "//testing/gtest",
126 ]
kjellandera3cac052016-10-24 01:52:39 -0700127 if (!build_with_chromium && is_clang) {
128 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
129 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
130 }
131 }
132
ehmaldonado021eef32017-01-05 07:09:50 -0800133 rtc_source_set("video_full_stack_tests") {
134 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700135
136 # Skip restricting visibility on mobile platforms since the tests on those
137 # gets additional generated targets which would require many lines here to
138 # cover (which would be confusing to read and hard to maintain).
139 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700140 visibility = [ "..:webrtc_perf_tests" ]
kjellandere0629c02017-04-25 04:04:50 -0700141 }
ehmaldonado021eef32017-01-05 07:09:50 -0800142 sources = [
143 "full_stack_tests.cc",
144 ]
145 deps = [
146 ":video_quality_test",
sprang89c4a7e2017-06-30 13:27:40 -0700147 "../modules/pacing:pacing",
mbonadei9087d492017-04-25 00:35:35 -0700148 "../test:field_trial",
jianjun.zhuc0247402017-07-11 06:20:45 -0700149 "../test:test_common",
mbonadei9087d492017-04-25 00:35:35 -0700150 "../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800151 "//testing/gtest",
ehmaldonado021eef32017-01-05 07:09:50 -0800152 ]
153 if (!build_with_chromium && is_clang) {
154 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
155 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
156 }
157 if (rtc_use_h264) {
158 defines = [ "WEBRTC_USE_H264" ]
159 }
160 }
161
kjellandera3cac052016-10-24 01:52:39 -0700162 rtc_executable("video_loopback") {
163 testonly = true
164 sources = [
165 "video_loopback.cc",
166 ]
167 deps = [
168 ":video_quality_test",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700169 "../rtc_base:rtc_base_approved",
kjellandera3cac052016-10-24 01:52:39 -0700170 "../system_wrappers:metrics_default",
171 "../test:field_trial",
172 "../test:run_test",
mbonadei9c296b32017-09-05 05:11:41 -0700173 "../test:run_test_interface",
kjellandera3cac052016-10-24 01:52:39 -0700174 "../test:test_common",
175 "../test:test_renderer",
mbonadei9087d492017-04-25 00:35:35 -0700176 "../test:test_support",
kjellandera3cac052016-10-24 01:52:39 -0700177 "//testing/gmock",
178 "//testing/gtest",
kjellandera3cac052016-10-24 01:52:39 -0700179 ]
180 if (!build_with_chromium && is_clang) {
181 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
182 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
183 }
184 }
185
186 rtc_executable("screenshare_loopback") {
187 testonly = true
188 sources = [
189 "screenshare_loopback.cc",
190 ]
191
192 deps = [
193 ":video_quality_test",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700194 "../rtc_base:rtc_base_approved",
kjellandera3cac052016-10-24 01:52:39 -0700195 "../system_wrappers:metrics_default",
196 "../test:field_trial",
197 "../test:run_test",
mbonadei9c296b32017-09-05 05:11:41 -0700198 "../test:run_test_interface",
kjellandera3cac052016-10-24 01:52:39 -0700199 "../test:test_common",
200 "../test:test_renderer",
mbonadei9087d492017-04-25 00:35:35 -0700201 "../test:test_support",
kjellandera3cac052016-10-24 01:52:39 -0700202 ]
203 if (!build_with_chromium && is_clang) {
204 # Suppress warnings from Chrome's Clang plugins.
205 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
206 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
207 }
208 }
209
stefan64427e52016-12-20 07:26:58 -0800210 rtc_executable("video_replay") {
211 testonly = true
212 sources = [
213 "replay.cc",
214 ]
215 deps = [
mbonadei9087d492017-04-25 00:35:35 -0700216 "..:webrtc_common",
ilnikd60d06a2017-04-05 03:02:20 -0700217 "../api/video_codecs:video_codecs_api",
mbonadei9087d492017-04-25 00:35:35 -0700218 "../call:call_interfaces",
219 "../common_video",
220 "../logging:rtc_event_log_api",
221 "../modules/rtp_rtcp",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700222 "../rtc_base:rtc_base_approved",
mbonadei9087d492017-04-25 00:35:35 -0700223 "../system_wrappers",
stefan64427e52016-12-20 07:26:58 -0800224 "../system_wrappers:metrics_default",
225 "../test:field_trial",
mbonadei9087d492017-04-25 00:35:35 -0700226 "../test:rtp_test_utils",
stefan64427e52016-12-20 07:26:58 -0800227 "../test:run_test",
mbonadei9c296b32017-09-05 05:11:41 -0700228 "../test:run_test_interface",
stefan64427e52016-12-20 07:26:58 -0800229 "../test:test_common",
230 "../test:test_renderer",
mbonadei9087d492017-04-25 00:35:35 -0700231 "../test:test_support",
232 "../test:video_test_common",
philipel99b63452017-08-25 07:24:21 -0700233 "../test:video_test_support",
stefan64427e52016-12-20 07:26:58 -0800234 ]
stefan64427e52016-12-20 07:26:58 -0800235 if (!build_with_chromium && is_clang) {
236 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
237 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
238 }
239 }
240
Peter Boström02083222016-06-14 12:52:54 +0200241 # TODO(pbos): Rename test suite.
ehmaldonado38a21322016-09-02 04:10:34 -0700242 rtc_source_set("video_tests") {
Peter Boström02083222016-06-14 12:52:54 +0200243 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700244
245 # Skip restricting visibility on mobile platforms since the tests on those
246 # gets additional generated targets which would require many lines here to
247 # cover (which would be confusing to read and hard to maintain).
248 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700249 visibility = [ "..:video_engine_tests" ]
kjellandere0629c02017-04-25 04:04:50 -0700250 }
hta9aa96882016-12-06 05:36:03 -0800251 defines = []
Peter Boström02083222016-06-14 12:52:54 +0200252 sources = [
253 "call_stats_unittest.cc",
mflodman15d83572016-10-06 08:35:11 -0700254 "encoder_rtcp_feedback_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +0200255 "end_to_end_tests.cc",
256 "overuse_frame_detector_unittest.cc",
257 "payload_router_unittest.cc",
Sebastian Janssone92f93f2017-06-22 14:44:04 +0200258 "picture_id_tests.cc",
palmkvist349092b2016-12-13 02:45:57 -0800259 "quality_threshold_unittest.cc",
sakale5ba44e2016-10-26 07:09:24 -0700260 "receive_statistics_proxy_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +0200261 "report_block_stats_unittest.cc",
nisseb1f2ff92017-06-09 04:01:55 -0700262 "rtp_video_stream_receiver_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +0200263 "send_delay_stats_unittest.cc",
264 "send_statistics_proxy_unittest.cc",
265 "stats_counter_unittest.cc",
266 "stream_synchronization_unittest.cc",
johanf2183ff2017-02-28 01:33:09 -0800267 "video_receive_stream_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +0200268 "video_send_stream_tests.cc",
mflodmancc3d4422017-08-03 08:27:51 -0700269 "video_stream_encoder_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +0200270 ]
271 deps = [
272 ":video",
kwiberg84f6a3f2017-09-05 08:43:13 -0700273 "../api:optional",
mbonadei9087d492017-04-25 00:35:35 -0700274 "../api:video_frame_api",
275 "../api/video_codecs:video_codecs_api",
mbonadei9087d492017-04-25 00:35:35 -0700276 "../call:call_interfaces",
eladalone2173d92017-07-28 10:05:45 -0700277 "../call:mock_rtp_interfaces",
nisse0f15f922017-06-21 01:05:22 -0700278 "../call:rtp_receiver",
sprangdb2a9fc2017-08-09 06:42:32 -0700279 "../call:rtp_sender",
aleloi440b6d92017-08-22 05:43:23 -0700280 "../call:video_stream_api",
mbonadei9087d492017-04-25 00:35:35 -0700281 "../common_video",
282 "../logging:rtc_event_log_api",
brandtr5e171752017-05-23 03:32:16 -0700283 "../media:rtc_media",
magjedceecea42016-11-28 07:20:21 -0800284 "../media:rtc_media_base",
mbonadei9087d492017-04-25 00:35:35 -0700285 "../media:rtc_media_tests_utils",
mbonadei1140f972017-04-26 03:38:35 -0700286 "../modules:module_api",
mbonadei9087d492017-04-25 00:35:35 -0700287 "../modules/pacing",
288 "../modules/rtp_rtcp",
kjellandere0629c02017-04-25 04:04:50 -0700289 "../modules/rtp_rtcp:mock_rtp_rtcp",
mbonadei9087d492017-04-25 00:35:35 -0700290 "../modules/utility",
291 "../modules/video_coding",
292 "../modules/video_coding:video_coding_utility",
293 "../modules/video_coding:webrtc_h264",
294 "../modules/video_coding:webrtc_vp8",
295 "../modules/video_coding:webrtc_vp9",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700296 "../rtc_base:rtc_base_approved",
297 "../rtc_base:rtc_base_tests_utils",
mbonadei9087d492017-04-25 00:35:35 -0700298 "../system_wrappers",
299 "../system_wrappers:field_trial_default",
300 "../system_wrappers:metrics_api",
301 "../system_wrappers:metrics_default",
302 "../test:direct_transport",
303 "../test:field_trial",
304 "../test:rtp_test_utils",
305 "../test:test_common",
306 "../test:test_support",
307 "../test:video_test_common",
Peter Boström02083222016-06-14 12:52:54 +0200308 "//testing/gmock",
309 "//testing/gtest",
310 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700311 if (!build_with_chromium && is_clang) {
312 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700313 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Peter Boström02083222016-06-14 12:52:54 +0200314 }
brandtr445fb8f2016-11-14 04:11:23 -0800315 if (rtc_use_h264) {
hta9aa96882016-12-06 05:36:03 -0800316 defines += [ "WEBRTC_USE_H264" ]
brandtr445fb8f2016-11-14 04:11:23 -0800317 }
Peter Boström02083222016-06-14 12:52:54 +0200318 }
319}