blob: 0833e52a3f72e2c0da3227bad78aa857a68aa74c [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",
Mirko Bonadei245660a2017-10-10 14:38:11 +020061 "../call:bitrate_allocator",
mbonadei9087d492017-04-25 00:35:35 -070062 "../call:call_interfaces",
nissed76b7b22017-06-01 04:02:35 -070063 "../call:rtp_interfaces",
aleloi440b6d92017-08-22 05:43:23 -070064 "../call:video_stream_api",
nisseca5706d2017-09-11 02:32:16 -070065
66 # For RtxReceiveStream.
67 "../call:rtp_receiver",
Peter Boström2ee24392015-06-22 07:57:16 +020068 "../common_video",
skvladcc91d282016-10-03 18:31:22 -070069 "../logging:rtc_event_log_api",
philipel022b54e2016-12-20 04:15:59 -080070 "../media:rtc_media_base",
mbonadei1140f972017-04-26 03:38:35 -070071 "../modules:module_api",
Peter Boström2ee24392015-06-22 07:57:16 +020072 "../modules/bitrate_controller",
kjellander@webrtc.org7ffeab52016-02-26 22:46:09 +010073 "../modules/congestion_controller",
sprangebbf8a82015-09-21 15:11:14 -070074 "../modules/pacing",
kjellander@webrtc.org7ffeab52016-02-26 22:46:09 +010075 "../modules/remote_bitrate_estimator",
Peter Boström2ee24392015-06-22 07:57:16 +020076 "../modules/rtp_rtcp",
77 "../modules/utility",
Peter Boström2ee24392015-06-22 07:57:16 +020078 "../modules/video_coding",
mbonadei9087d492017-04-25 00:35:35 -070079 "../modules/video_coding:video_coding_utility",
80 "../modules/video_coding:webrtc_vp8",
Peter Boström2ee24392015-06-22 07:57:16 +020081 "../modules/video_processing",
ehmaldonadof6a861a2017-07-19 10:40:47 -070082 "../rtc_base:rtc_base_approved",
83 "../rtc_base:rtc_numerics",
84 "../rtc_base:rtc_task_queue",
85 "../rtc_base:sequenced_task_checker",
86 "../rtc_base:weak_ptr",
kjellander8237abf2015-12-08 07:12:06 -080087 "../system_wrappers",
Peter Boström7623ce42015-12-09 12:13:30 +010088 "../voice_engine",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000089 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000090}
Peter Boström02083222016-06-14 12:52:54 +020091
92if (rtc_include_tests) {
kjellandera3cac052016-10-24 01:52:39 -070093 rtc_source_set("video_quality_test") {
94 testonly = true
kjellandere0629c02017-04-25 04:04:50 -070095 visibility = [ ":*" ] # Only targets in this file can depend on this.
kjellandera3cac052016-10-24 01:52:39 -070096 sources = [
97 "video_quality_test.cc",
98 "video_quality_test.h",
99 ]
100 deps = [
kwiberg84f6a3f2017-09-05 08:43:13 -0700101 "../api:optional",
mbonadei9087d492017-04-25 00:35:35 -0700102 "../call:call_interfaces",
103 "../common_video",
104 "../logging:rtc_event_log_api",
sprang67561a62017-06-15 06:34:42 -0700105 "../media:rtc_media",
magjedceecea42016-11-28 07:20:21 -0800106 "../media:rtc_media_base",
mbonadei9087d492017-04-25 00:35:35 -0700107 "../modules/audio_mixer:audio_mixer_impl",
108 "../modules/rtp_rtcp",
109 "../modules/video_coding:webrtc_h264",
110 "../modules/video_coding:webrtc_vp8",
111 "../modules/video_coding:webrtc_vp9",
mbonadei95c8f652017-08-27 23:40:10 -0700112 "../rtc_base:rtc_base_approved",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700113 "../rtc_base:rtc_base_tests_utils",
114 "../rtc_base:rtc_task_queue",
kjellandera3cac052016-10-24 01:52:39 -0700115 "../system_wrappers",
Jianjun Zhu037f3e42017-08-15 21:48:37 +0800116 "../test:rtp_test_utils",
mbonadei9087d492017-04-25 00:35:35 -0700117 "../test:test_common",
jianjun.zhuc0247402017-07-11 06:20:45 -0700118 "../test:test_renderer",
Jianjun Zhu037f3e42017-08-15 21:48:37 +0800119 "../test:test_renderer",
mbonadei9087d492017-04-25 00:35:35 -0700120 "../test:test_support",
Edward Lemuraf8659a2017-09-27 14:46:24 +0200121 "../test:test_support_test_artifacts",
jianjun.zhuc0247402017-07-11 06:20:45 -0700122 "../test:video_test_common",
Jianjun Zhu037f3e42017-08-15 21:48:37 +0800123 "../test:video_test_common",
ilnik59cac992017-07-25 05:45:03 -0700124 "../test:video_test_support",
mbonadei9087d492017-04-25 00:35:35 -0700125 "../voice_engine",
kjellandera3cac052016-10-24 01:52:39 -0700126 "//testing/gtest",
127 ]
kjellandera3cac052016-10-24 01:52:39 -0700128 if (!build_with_chromium && is_clang) {
129 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
130 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
131 }
132 }
133
ehmaldonado021eef32017-01-05 07:09:50 -0800134 rtc_source_set("video_full_stack_tests") {
135 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700136
137 # Skip restricting visibility on mobile platforms since the tests on those
138 # gets additional generated targets which would require many lines here to
139 # cover (which would be confusing to read and hard to maintain).
140 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700141 visibility = [ "..:webrtc_perf_tests" ]
kjellandere0629c02017-04-25 04:04:50 -0700142 }
ehmaldonado021eef32017-01-05 07:09:50 -0800143 sources = [
144 "full_stack_tests.cc",
145 ]
146 deps = [
147 ":video_quality_test",
sprang89c4a7e2017-06-30 13:27:40 -0700148 "../modules/pacing:pacing",
mbonadei9087d492017-04-25 00:35:35 -0700149 "../test:field_trial",
jianjun.zhuc0247402017-07-11 06:20:45 -0700150 "../test:test_common",
mbonadei9087d492017-04-25 00:35:35 -0700151 "../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800152 "//testing/gtest",
ehmaldonado021eef32017-01-05 07:09:50 -0800153 ]
154 if (!build_with_chromium && is_clang) {
155 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
156 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
157 }
158 if (rtc_use_h264) {
159 defines = [ "WEBRTC_USE_H264" ]
160 }
161 }
162
kjellandera3cac052016-10-24 01:52:39 -0700163 rtc_executable("video_loopback") {
164 testonly = true
165 sources = [
166 "video_loopback.cc",
167 ]
168 deps = [
169 ":video_quality_test",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700170 "../rtc_base:rtc_base_approved",
kjellandera3cac052016-10-24 01:52:39 -0700171 "../system_wrappers:metrics_default",
172 "../test:field_trial",
173 "../test:run_test",
mbonadei9c296b32017-09-05 05:11:41 -0700174 "../test:run_test_interface",
kjellandera3cac052016-10-24 01:52:39 -0700175 "../test:test_common",
176 "../test:test_renderer",
mbonadei9087d492017-04-25 00:35:35 -0700177 "../test:test_support",
kjellandera3cac052016-10-24 01:52:39 -0700178 "//testing/gmock",
179 "//testing/gtest",
kjellandera3cac052016-10-24 01:52:39 -0700180 ]
181 if (!build_with_chromium && is_clang) {
182 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
183 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
184 }
185 }
186
187 rtc_executable("screenshare_loopback") {
188 testonly = true
189 sources = [
190 "screenshare_loopback.cc",
191 ]
192
193 deps = [
194 ":video_quality_test",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700195 "../rtc_base:rtc_base_approved",
kjellandera3cac052016-10-24 01:52:39 -0700196 "../system_wrappers:metrics_default",
197 "../test:field_trial",
198 "../test:run_test",
mbonadei9c296b32017-09-05 05:11:41 -0700199 "../test:run_test_interface",
kjellandera3cac052016-10-24 01:52:39 -0700200 "../test:test_common",
201 "../test:test_renderer",
mbonadei9087d492017-04-25 00:35:35 -0700202 "../test:test_support",
kjellandera3cac052016-10-24 01:52:39 -0700203 ]
204 if (!build_with_chromium && is_clang) {
205 # Suppress warnings from Chrome's Clang plugins.
206 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
207 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
208 }
209 }
210
stefan64427e52016-12-20 07:26:58 -0800211 rtc_executable("video_replay") {
212 testonly = true
213 sources = [
214 "replay.cc",
215 ]
216 deps = [
mbonadei9087d492017-04-25 00:35:35 -0700217 "..:webrtc_common",
ilnikd60d06a2017-04-05 03:02:20 -0700218 "../api/video_codecs:video_codecs_api",
mbonadei9087d492017-04-25 00:35:35 -0700219 "../call:call_interfaces",
220 "../common_video",
221 "../logging:rtc_event_log_api",
222 "../modules/rtp_rtcp",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700223 "../rtc_base:rtc_base_approved",
mbonadei9087d492017-04-25 00:35:35 -0700224 "../system_wrappers",
stefan64427e52016-12-20 07:26:58 -0800225 "../system_wrappers:metrics_default",
226 "../test:field_trial",
mbonadei9087d492017-04-25 00:35:35 -0700227 "../test:rtp_test_utils",
stefan64427e52016-12-20 07:26:58 -0800228 "../test:run_test",
mbonadei9c296b32017-09-05 05:11:41 -0700229 "../test:run_test_interface",
stefan64427e52016-12-20 07:26:58 -0800230 "../test:test_common",
231 "../test:test_renderer",
mbonadei9087d492017-04-25 00:35:35 -0700232 "../test:test_support",
233 "../test:video_test_common",
philipel99b63452017-08-25 07:24:21 -0700234 "../test:video_test_support",
stefan64427e52016-12-20 07:26:58 -0800235 ]
stefan64427e52016-12-20 07:26:58 -0800236 if (!build_with_chromium && is_clang) {
237 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
238 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
239 }
240 }
241
Peter Boström02083222016-06-14 12:52:54 +0200242 # TODO(pbos): Rename test suite.
ehmaldonado38a21322016-09-02 04:10:34 -0700243 rtc_source_set("video_tests") {
Peter Boström02083222016-06-14 12:52:54 +0200244 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700245
246 # Skip restricting visibility on mobile platforms since the tests on those
247 # gets additional generated targets which would require many lines here to
248 # cover (which would be confusing to read and hard to maintain).
249 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700250 visibility = [ "..:video_engine_tests" ]
kjellandere0629c02017-04-25 04:04:50 -0700251 }
hta9aa96882016-12-06 05:36:03 -0800252 defines = []
Peter Boström02083222016-06-14 12:52:54 +0200253 sources = [
254 "call_stats_unittest.cc",
mflodman15d83572016-10-06 08:35:11 -0700255 "encoder_rtcp_feedback_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +0200256 "end_to_end_tests.cc",
257 "overuse_frame_detector_unittest.cc",
258 "payload_router_unittest.cc",
Sebastian Janssone92f93f2017-06-22 14:44:04 +0200259 "picture_id_tests.cc",
palmkvist349092b2016-12-13 02:45:57 -0800260 "quality_threshold_unittest.cc",
sakale5ba44e2016-10-26 07:09:24 -0700261 "receive_statistics_proxy_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +0200262 "report_block_stats_unittest.cc",
nisseb1f2ff92017-06-09 04:01:55 -0700263 "rtp_video_stream_receiver_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +0200264 "send_delay_stats_unittest.cc",
265 "send_statistics_proxy_unittest.cc",
266 "stats_counter_unittest.cc",
267 "stream_synchronization_unittest.cc",
johanf2183ff2017-02-28 01:33:09 -0800268 "video_receive_stream_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +0200269 "video_send_stream_tests.cc",
mflodmancc3d4422017-08-03 08:27:51 -0700270 "video_stream_encoder_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +0200271 ]
272 deps = [
273 ":video",
kwiberg84f6a3f2017-09-05 08:43:13 -0700274 "../api:optional",
mbonadei9087d492017-04-25 00:35:35 -0700275 "../api:video_frame_api",
276 "../api/video_codecs:video_codecs_api",
mbonadei9087d492017-04-25 00:35:35 -0700277 "../call:call_interfaces",
eladalone2173d92017-07-28 10:05:45 -0700278 "../call:mock_rtp_interfaces",
nisse0f15f922017-06-21 01:05:22 -0700279 "../call:rtp_receiver",
sprangdb2a9fc2017-08-09 06:42:32 -0700280 "../call:rtp_sender",
aleloi440b6d92017-08-22 05:43:23 -0700281 "../call:video_stream_api",
mbonadei9087d492017-04-25 00:35:35 -0700282 "../common_video",
283 "../logging:rtc_event_log_api",
brandtr5e171752017-05-23 03:32:16 -0700284 "../media:rtc_media",
magjedceecea42016-11-28 07:20:21 -0800285 "../media:rtc_media_base",
mbonadei9087d492017-04-25 00:35:35 -0700286 "../media:rtc_media_tests_utils",
mbonadei1140f972017-04-26 03:38:35 -0700287 "../modules:module_api",
mbonadei9087d492017-04-25 00:35:35 -0700288 "../modules/pacing",
289 "../modules/rtp_rtcp",
kjellandere0629c02017-04-25 04:04:50 -0700290 "../modules/rtp_rtcp:mock_rtp_rtcp",
mbonadei9087d492017-04-25 00:35:35 -0700291 "../modules/utility",
292 "../modules/video_coding",
293 "../modules/video_coding:video_coding_utility",
294 "../modules/video_coding:webrtc_h264",
295 "../modules/video_coding:webrtc_vp8",
296 "../modules/video_coding:webrtc_vp9",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700297 "../rtc_base:rtc_base_approved",
298 "../rtc_base:rtc_base_tests_utils",
mbonadei9087d492017-04-25 00:35:35 -0700299 "../system_wrappers",
300 "../system_wrappers:field_trial_default",
301 "../system_wrappers:metrics_api",
302 "../system_wrappers:metrics_default",
303 "../test:direct_transport",
304 "../test:field_trial",
305 "../test:rtp_test_utils",
306 "../test:test_common",
307 "../test:test_support",
308 "../test:video_test_common",
Peter Boström02083222016-06-14 12:52:54 +0200309 "//testing/gmock",
310 "//testing/gtest",
311 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700312 if (!build_with_chromium && is_clang) {
313 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700314 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Peter Boström02083222016-06-14 12:52:54 +0200315 }
brandtr445fb8f2016-11-14 04:11:23 -0800316 if (rtc_use_h264) {
hta9aa96882016-12-06 05:36:03 -0800317 defines += [ "WEBRTC_USE_H264" ]
brandtr445fb8f2016-11-14 04:11:23 -0800318 }
Peter Boström02083222016-06-14 12:52:54 +0200319 }
320}