blob: 08abe685dce6f664a6e6d0b0545f7cd22eaa1ae6 [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 = [
mbonadei81c79f52017-04-25 23:42:15 -070057 "..:video_stream_api",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000058 "..:webrtc_common",
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",
Peter Boström2ee24392015-06-22 07:57:16 +020063 "../common_video",
skvladcc91d282016-10-03 18:31:22 -070064 "../logging:rtc_event_log_api",
philipel022b54e2016-12-20 04:15:59 -080065 "../media:rtc_media_base",
mbonadei1140f972017-04-26 03:38:35 -070066 "../modules:module_api",
Peter Boström2ee24392015-06-22 07:57:16 +020067 "../modules/bitrate_controller",
kjellander@webrtc.org7ffeab52016-02-26 22:46:09 +010068 "../modules/congestion_controller",
sprangebbf8a82015-09-21 15:11:14 -070069 "../modules/pacing",
kjellander@webrtc.org7ffeab52016-02-26 22:46:09 +010070 "../modules/remote_bitrate_estimator",
Peter Boström2ee24392015-06-22 07:57:16 +020071 "../modules/rtp_rtcp",
72 "../modules/utility",
Peter Boström2ee24392015-06-22 07:57:16 +020073 "../modules/video_coding",
mbonadei9087d492017-04-25 00:35:35 -070074 "../modules/video_coding:video_coding_utility",
75 "../modules/video_coding:webrtc_vp8",
Peter Boström2ee24392015-06-22 07:57:16 +020076 "../modules/video_processing",
ehmaldonadof6a861a2017-07-19 10:40:47 -070077 "../rtc_base:rtc_base_approved",
78 "../rtc_base:rtc_numerics",
79 "../rtc_base:rtc_task_queue",
80 "../rtc_base:sequenced_task_checker",
81 "../rtc_base:weak_ptr",
kjellander8237abf2015-12-08 07:12:06 -080082 "../system_wrappers",
Peter Boström7623ce42015-12-09 12:13:30 +010083 "../voice_engine",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000084 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000085}
Peter Boström02083222016-06-14 12:52:54 +020086
87if (rtc_include_tests) {
kjellandera3cac052016-10-24 01:52:39 -070088 rtc_source_set("video_quality_test") {
89 testonly = true
kjellandere0629c02017-04-25 04:04:50 -070090 visibility = [ ":*" ] # Only targets in this file can depend on this.
kjellandera3cac052016-10-24 01:52:39 -070091 sources = [
92 "video_quality_test.cc",
93 "video_quality_test.h",
94 ]
95 deps = [
mbonadei9087d492017-04-25 00:35:35 -070096 "../call:call_interfaces",
97 "../common_video",
98 "../logging:rtc_event_log_api",
sprang67561a62017-06-15 06:34:42 -070099 "../media:rtc_media",
magjedceecea42016-11-28 07:20:21 -0800100 "../media:rtc_media_base",
mbonadei9087d492017-04-25 00:35:35 -0700101 "../modules/audio_mixer:audio_mixer_impl",
102 "../modules/rtp_rtcp",
103 "../modules/video_coding:webrtc_h264",
104 "../modules/video_coding:webrtc_vp8",
105 "../modules/video_coding:webrtc_vp9",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700106 "../rtc_base:rtc_base_tests_utils",
107 "../rtc_base:rtc_task_queue",
kjellandera3cac052016-10-24 01:52:39 -0700108 "../system_wrappers",
Jianjun Zhu037f3e42017-08-15 21:48:37 +0800109 "../test:rtp_test_utils",
mbonadei9087d492017-04-25 00:35:35 -0700110 "../test:test_common",
jianjun.zhuc0247402017-07-11 06:20:45 -0700111 "../test:test_renderer",
Jianjun Zhu037f3e42017-08-15 21:48:37 +0800112 "../test:test_renderer",
mbonadei9087d492017-04-25 00:35:35 -0700113 "../test:test_support",
jianjun.zhuc0247402017-07-11 06:20:45 -0700114 "../test:video_test_common",
Jianjun Zhu037f3e42017-08-15 21:48:37 +0800115 "../test:video_test_common",
ilnik59cac992017-07-25 05:45:03 -0700116 "../test:video_test_support",
mbonadei9087d492017-04-25 00:35:35 -0700117 "../voice_engine",
kjellandera3cac052016-10-24 01:52:39 -0700118 "//testing/gtest",
119 ]
kjellandera3cac052016-10-24 01:52:39 -0700120 if (!build_with_chromium && is_clang) {
121 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
122 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
123 }
124 }
125
ehmaldonado021eef32017-01-05 07:09:50 -0800126 rtc_source_set("video_full_stack_tests") {
127 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700128
129 # Skip restricting visibility on mobile platforms since the tests on those
130 # gets additional generated targets which would require many lines here to
131 # cover (which would be confusing to read and hard to maintain).
132 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700133 visibility = [ "..:webrtc_perf_tests" ]
kjellandere0629c02017-04-25 04:04:50 -0700134 }
ehmaldonado021eef32017-01-05 07:09:50 -0800135 sources = [
136 "full_stack_tests.cc",
137 ]
138 deps = [
139 ":video_quality_test",
sprang89c4a7e2017-06-30 13:27:40 -0700140 "../modules/pacing:pacing",
mbonadei9087d492017-04-25 00:35:35 -0700141 "../test:field_trial",
jianjun.zhuc0247402017-07-11 06:20:45 -0700142 "../test:test_common",
mbonadei9087d492017-04-25 00:35:35 -0700143 "../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800144 "//testing/gtest",
ehmaldonado021eef32017-01-05 07:09:50 -0800145 ]
146 if (!build_with_chromium && is_clang) {
147 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
148 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
149 }
150 if (rtc_use_h264) {
151 defines = [ "WEBRTC_USE_H264" ]
152 }
153 }
154
kjellandera3cac052016-10-24 01:52:39 -0700155 rtc_executable("video_loopback") {
156 testonly = true
157 sources = [
158 "video_loopback.cc",
159 ]
160 deps = [
161 ":video_quality_test",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700162 "../rtc_base:rtc_base_approved",
kjellandera3cac052016-10-24 01:52:39 -0700163 "../system_wrappers:metrics_default",
164 "../test:field_trial",
165 "../test:run_test",
166 "../test:test_common",
167 "../test:test_renderer",
mbonadei9087d492017-04-25 00:35:35 -0700168 "../test:test_support",
kjellandera3cac052016-10-24 01:52:39 -0700169 "//testing/gmock",
170 "//testing/gtest",
171 "//third_party/gflags",
172 ]
173 if (!build_with_chromium && is_clang) {
174 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
175 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
176 }
177 }
178
179 rtc_executable("screenshare_loopback") {
180 testonly = true
181 sources = [
182 "screenshare_loopback.cc",
183 ]
184
185 deps = [
186 ":video_quality_test",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700187 "../rtc_base:rtc_base_approved",
kjellandera3cac052016-10-24 01:52:39 -0700188 "../system_wrappers:metrics_default",
189 "../test:field_trial",
190 "../test:run_test",
191 "../test:test_common",
192 "../test:test_renderer",
mbonadei9087d492017-04-25 00:35:35 -0700193 "../test:test_support",
kjellandera3cac052016-10-24 01:52:39 -0700194 ]
195 if (!build_with_chromium && is_clang) {
196 # Suppress warnings from Chrome's Clang plugins.
197 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
198 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
199 }
200 }
201
stefan64427e52016-12-20 07:26:58 -0800202 rtc_executable("video_replay") {
203 testonly = true
204 sources = [
205 "replay.cc",
206 ]
207 deps = [
mbonadei9087d492017-04-25 00:35:35 -0700208 "..:webrtc_common",
ilnikd60d06a2017-04-05 03:02:20 -0700209 "../api/video_codecs:video_codecs_api",
mbonadei9087d492017-04-25 00:35:35 -0700210 "../call:call_interfaces",
211 "../common_video",
212 "../logging:rtc_event_log_api",
213 "../modules/rtp_rtcp",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700214 "../rtc_base:rtc_base_approved",
mbonadei9087d492017-04-25 00:35:35 -0700215 "../system_wrappers",
stefan64427e52016-12-20 07:26:58 -0800216 "../system_wrappers:metrics_default",
217 "../test:field_trial",
mbonadei9087d492017-04-25 00:35:35 -0700218 "../test:rtp_test_utils",
stefan64427e52016-12-20 07:26:58 -0800219 "../test:run_test",
220 "../test:test_common",
221 "../test:test_renderer",
mbonadei9087d492017-04-25 00:35:35 -0700222 "../test:test_support",
223 "../test:video_test_common",
stefan64427e52016-12-20 07:26:58 -0800224 "//third_party/gflags",
225 ]
stefan64427e52016-12-20 07:26:58 -0800226 if (!build_with_chromium && is_clang) {
227 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
228 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
229 }
230 }
231
Peter Boström02083222016-06-14 12:52:54 +0200232 # TODO(pbos): Rename test suite.
ehmaldonado38a21322016-09-02 04:10:34 -0700233 rtc_source_set("video_tests") {
Peter Boström02083222016-06-14 12:52:54 +0200234 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700235
236 # Skip restricting visibility on mobile platforms since the tests on those
237 # gets additional generated targets which would require many lines here to
238 # cover (which would be confusing to read and hard to maintain).
239 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700240 visibility = [ "..:video_engine_tests" ]
kjellandere0629c02017-04-25 04:04:50 -0700241 }
hta9aa96882016-12-06 05:36:03 -0800242 defines = []
Peter Boström02083222016-06-14 12:52:54 +0200243 sources = [
244 "call_stats_unittest.cc",
mflodman15d83572016-10-06 08:35:11 -0700245 "encoder_rtcp_feedback_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +0200246 "end_to_end_tests.cc",
247 "overuse_frame_detector_unittest.cc",
248 "payload_router_unittest.cc",
Sebastian Janssone92f93f2017-06-22 14:44:04 +0200249 "picture_id_tests.cc",
palmkvist349092b2016-12-13 02:45:57 -0800250 "quality_threshold_unittest.cc",
sakale5ba44e2016-10-26 07:09:24 -0700251 "receive_statistics_proxy_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +0200252 "report_block_stats_unittest.cc",
nisseb1f2ff92017-06-09 04:01:55 -0700253 "rtp_video_stream_receiver_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +0200254 "send_delay_stats_unittest.cc",
255 "send_statistics_proxy_unittest.cc",
256 "stats_counter_unittest.cc",
257 "stream_synchronization_unittest.cc",
johanf2183ff2017-02-28 01:33:09 -0800258 "video_receive_stream_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +0200259 "video_send_stream_tests.cc",
mflodmancc3d4422017-08-03 08:27:51 -0700260 "video_stream_encoder_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +0200261 ]
262 deps = [
263 ":video",
mbonadei81c79f52017-04-25 23:42:15 -0700264 "..:video_stream_api",
mbonadei9087d492017-04-25 00:35:35 -0700265 "../api:video_frame_api",
266 "../api/video_codecs:video_codecs_api",
mbonadei9087d492017-04-25 00:35:35 -0700267 "../call:call_interfaces",
eladalone2173d92017-07-28 10:05:45 -0700268 "../call:mock_rtp_interfaces",
nisse0f15f922017-06-21 01:05:22 -0700269 "../call:rtp_receiver",
sprangdb2a9fc2017-08-09 06:42:32 -0700270 "../call:rtp_sender",
mbonadei9087d492017-04-25 00:35:35 -0700271 "../common_video",
272 "../logging:rtc_event_log_api",
brandtr5e171752017-05-23 03:32:16 -0700273 "../media:rtc_media",
magjedceecea42016-11-28 07:20:21 -0800274 "../media:rtc_media_base",
mbonadei9087d492017-04-25 00:35:35 -0700275 "../media:rtc_media_tests_utils",
mbonadei1140f972017-04-26 03:38:35 -0700276 "../modules:module_api",
mbonadei9087d492017-04-25 00:35:35 -0700277 "../modules/pacing",
278 "../modules/rtp_rtcp",
kjellandere0629c02017-04-25 04:04:50 -0700279 "../modules/rtp_rtcp:mock_rtp_rtcp",
mbonadei9087d492017-04-25 00:35:35 -0700280 "../modules/utility",
mbonadei5166e542017-08-03 05:57:11 -0700281 "../modules/utility:mock_process_thread",
mbonadei9087d492017-04-25 00:35:35 -0700282 "../modules/video_coding",
283 "../modules/video_coding:video_coding_utility",
284 "../modules/video_coding:webrtc_h264",
285 "../modules/video_coding:webrtc_vp8",
286 "../modules/video_coding:webrtc_vp9",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700287 "../rtc_base:rtc_base_approved",
288 "../rtc_base:rtc_base_tests_utils",
mbonadei9087d492017-04-25 00:35:35 -0700289 "../system_wrappers",
290 "../system_wrappers:field_trial_default",
291 "../system_wrappers:metrics_api",
292 "../system_wrappers:metrics_default",
293 "../test:direct_transport",
294 "../test:field_trial",
295 "../test:rtp_test_utils",
296 "../test:test_common",
297 "../test:test_support",
298 "../test:video_test_common",
Peter Boström02083222016-06-14 12:52:54 +0200299 "//testing/gmock",
300 "//testing/gtest",
301 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700302 if (!build_with_chromium && is_clang) {
303 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700304 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Peter Boström02083222016-06-14 12:52:54 +0200305 }
brandtr445fb8f2016-11-14 04:11:23 -0800306 if (rtc_use_h264) {
hta9aa96882016-12-06 05:36:03 -0800307 defines += [ "WEBRTC_USE_H264" ]
brandtr445fb8f2016-11-14 04:11:23 -0800308 }
Peter Boström02083222016-06-14 12:52:54 +0200309 }
310}