blob: 52d0327bfba55cc3a6c74bfa5db44df817119bb9 [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_coding") {
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000012 sources = [
Henrik Kjellander2557b862015-11-18 22:00:21 +010013 "codec_database.cc",
14 "codec_database.h",
15 "codec_timer.cc",
16 "codec_timer.h",
Henrik Kjellander2557b862015-11-18 22:00:21 +010017 "decoding_state.cc",
18 "decoding_state.h",
19 "encoded_frame.cc",
20 "encoded_frame.h",
brandtr71b1c1f2017-01-12 06:16:24 -080021 "fec_rate_table.h",
Henrik Kjellander2557b862015-11-18 22:00:21 +010022 "frame_buffer.cc",
23 "frame_buffer.h",
philipelbe7a9e52016-05-19 12:19:35 +020024 "frame_buffer2.cc",
25 "frame_buffer2.h",
philipelc707ab72016-04-01 02:01:54 -070026 "frame_object.cc",
27 "frame_object.h",
Henrik Kjellander2557b862015-11-18 22:00:21 +010028 "generic_decoder.cc",
29 "generic_decoder.h",
30 "generic_encoder.cc",
31 "generic_encoder.h",
johanb0a11112016-12-08 03:57:17 -080032 "h264_sprop_parameter_sets.cc",
33 "h264_sprop_parameter_sets.h",
philipel34852cf2016-11-03 04:03:01 -070034 "h264_sps_pps_tracker.cc",
35 "h264_sps_pps_tracker.h",
philipel83f831a2016-03-12 03:30:23 -080036 "histogram.cc",
37 "histogram.h",
Erik Språng08127a92016-11-16 16:41:30 +010038 "include/video_codec_initializer.h",
Henrik Kjellander2557b862015-11-18 22:00:21 +010039 "include/video_coding.h",
40 "include/video_coding_defines.h",
41 "inter_frame_delay.cc",
42 "inter_frame_delay.h",
43 "internal_defines.h",
44 "jitter_buffer.cc",
45 "jitter_buffer.h",
46 "jitter_buffer_common.h",
47 "jitter_estimator.cc",
48 "jitter_estimator.h",
49 "media_opt_util.cc",
50 "media_opt_util.h",
51 "media_optimization.cc",
52 "media_optimization.h",
53 "nack_fec_tables.h",
philipel83f831a2016-03-12 03:30:23 -080054 "nack_module.cc",
55 "nack_module.h",
Henrik Kjellander2557b862015-11-18 22:00:21 +010056 "packet.cc",
57 "packet.h",
philipelc707ab72016-04-01 02:01:54 -070058 "packet_buffer.cc",
59 "packet_buffer.h",
Per69b332d2016-06-02 15:45:42 +020060 "protection_bitrate_calculator.cc",
61 "protection_bitrate_calculator.h",
kjellandera8d8aad2017-03-08 05:42:26 -080062 "qp_parser.cc",
63 "qp_parser.h",
Henrik Kjellander2557b862015-11-18 22:00:21 +010064 "receiver.cc",
65 "receiver.h",
philipel02447bc2016-05-13 06:01:03 -070066 "rtp_frame_reference_finder.cc",
67 "rtp_frame_reference_finder.h",
Henrik Kjellander2557b862015-11-18 22:00:21 +010068 "rtt_filter.cc",
69 "rtt_filter.h",
70 "session_info.cc",
71 "session_info.h",
72 "timestamp_map.cc",
73 "timestamp_map.h",
74 "timing.cc",
75 "timing.h",
Erik Språng08127a92016-11-16 16:41:30 +010076 "video_codec_initializer.cc",
Henrik Kjellander2557b862015-11-18 22:00:21 +010077 "video_coding_impl.cc",
78 "video_coding_impl.h",
79 "video_receiver.cc",
80 "video_sender.cc",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000081 ]
82
kjellander8f4419b2016-06-02 02:09:52 -070083 # TODO(jschuh): Bug 1348: fix this warning.
84 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +000085
kjellandere40a7ee2016-10-16 23:56:12 -070086 if (!build_with_chromium && is_clang) {
87 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070088 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +000089 }
90
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000091 deps = [
92 ":video_coding_utility",
Zeke Chin71f6f442015-06-29 14:34:58 -070093 ":webrtc_h264",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000094 ":webrtc_i420",
95 ":webrtc_vp8",
marpan@webrtc.org5b883172014-11-01 06:10:48 +000096 ":webrtc_vp9",
mbonadei1140f972017-04-26 03:38:35 -070097 "..:module_api",
mbonadei81c79f52017-04-25 23:42:15 -070098 "../..:video_stream_api",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000099 "../..:webrtc_common",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000100 "../../common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700101 "../../rtc_base:rtc_base",
102 "../../rtc_base:rtc_base_approved",
103 "../../rtc_base:rtc_numerics",
104 "../../rtc_base:rtc_task_queue",
105 "../../rtc_base:sequenced_task_checker",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000106 "../../system_wrappers",
ehmaldonado36df2d72016-12-08 09:56:16 -0800107 "../rtp_rtcp:rtp_rtcp",
108 "../utility:utility",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000109 ]
110}
111
kjellanderb62dbbe2016-09-23 00:38:52 -0700112rtc_static_library("video_coding_utility") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000113 sources = [
Erik Språng08127a92016-11-16 16:41:30 +0100114 "utility/default_video_bitrate_allocator.cc",
115 "utility/default_video_bitrate_allocator.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000116 "utility/frame_dropper.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100117 "utility/frame_dropper.h",
sprang3911c262016-04-15 01:24:14 -0700118 "utility/ivf_file_writer.cc",
119 "utility/ivf_file_writer.h",
kthelgason194f40a2016-09-14 02:14:58 -0700120 "utility/moving_average.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100121 "utility/moving_average.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000122 "utility/quality_scaler.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100123 "utility/quality_scaler.h",
jackychen98d8cf52015-05-21 11:12:02 -0700124 "utility/vp8_header_parser.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100125 "utility/vp8_header_parser.h",
jianj20acdf22017-05-24 10:00:16 -0700126 "utility/vp9_uncompressed_header_parser.cc",
127 "utility/vp9_uncompressed_header_parser.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000128 ]
129
kjellandere40a7ee2016-10-16 23:56:12 -0700130 if (!build_with_chromium && is_clang) {
131 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700132 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000133 }
134
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200135 deps = [
mbonadei1140f972017-04-26 03:38:35 -0700136 "..:module_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800137 "../..:webrtc_common",
ilnikd60d06a2017-04-05 03:02:20 -0700138 "../../api/video_codecs:video_codecs_api",
perkj4e417b22016-07-14 23:35:55 -0700139 "../../common_video",
kjellandera8d8aad2017-03-08 05:42:26 -0800140 "../../modules/rtp_rtcp:rtp_rtcp",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700141 "../../rtc_base:rtc_base_approved",
142 "../../rtc_base:rtc_numerics",
143 "../../rtc_base:rtc_task_queue",
144 "../../rtc_base:sequenced_task_checker",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200145 "../../system_wrappers",
146 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000147}
148
ehmaldonado1bf0ff32017-08-15 03:16:50 -0700149# TODO(ehmaldonado): Remove once http://bugs.webrtc.org/8090 is fixed.
150config("webrtc_h264_config") {
151 cflags = [ "-Wno-thread-safety-attributes" ]
152}
153
kjellanderb62dbbe2016-09-23 00:38:52 -0700154rtc_static_library("webrtc_h264") {
Zeke Chin71f6f442015-06-29 14:34:58 -0700155 sources = [
156 "codecs/h264/h264.cc",
157 "codecs/h264/include/h264.h",
158 ]
159
kjellandere40a7ee2016-10-16 23:56:12 -0700160 if (!build_with_chromium && is_clang) {
161 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700162 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Zeke Chin71f6f442015-06-29 14:34:58 -0700163 }
164
hbosbab934b2016-01-27 01:36:03 -0800165 defines = []
Zeke Chin71f6f442015-06-29 14:34:58 -0700166 deps = [
ehmaldonado36df2d72016-12-08 09:56:16 -0800167 ":video_coding_utility",
magjed21d110f2017-02-28 00:28:04 -0800168 "../../media:rtc_media_base",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700169 "../../rtc_base:rtc_base_approved",
Zeke Chin71f6f442015-06-29 14:34:58 -0700170 "../../system_wrappers",
171 ]
hbosa9a1d2a2016-01-11 10:19:02 -0800172
hbos902c03e2016-01-21 03:34:40 -0800173 if (rtc_use_h264) {
ehmaldonado1bf0ff32017-08-15 03:16:50 -0700174 configs += [ ":webrtc_h264_config" ]
hbos9dc59282016-02-03 05:09:37 -0800175 defines += [ "WEBRTC_USE_H264" ]
hbosc5a39c22016-02-02 02:26:05 -0800176 if (rtc_initialize_ffmpeg) {
177 defines += [ "WEBRTC_INITIALIZE_FFMPEG" ]
178 }
hbosbab934b2016-01-27 01:36:03 -0800179 sources += [
180 "codecs/h264/h264_decoder_impl.cc",
181 "codecs/h264/h264_decoder_impl.h",
182 "codecs/h264/h264_encoder_impl.cc",
183 "codecs/h264/h264_encoder_impl.h",
184 ]
hbosa9a1d2a2016-01-11 10:19:02 -0800185 deps += [
kjellanderf6b55092016-02-07 23:04:26 -0800186 "../../common_video",
hta9aa96882016-12-06 05:36:03 -0800187 "../../media:rtc_media_base",
hbosa9a1d2a2016-01-11 10:19:02 -0800188 "//third_party/ffmpeg:ffmpeg",
189 "//third_party/openh264:encoder",
190 ]
191 }
Zeke Chin71f6f442015-06-29 14:34:58 -0700192}
193
kjellanderb62dbbe2016-09-23 00:38:52 -0700194rtc_static_library("webrtc_i420") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000195 sources = [
Henrik Kjellandera74c08d2015-10-22 12:23:11 +0200196 "codecs/i420/i420.cc",
197 "codecs/i420/include/i420.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000198 ]
199
kjellandere40a7ee2016-10-16 23:56:12 -0700200 if (!build_with_chromium && is_clang) {
201 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700202 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000203 }
204
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200205 deps = [
ehmaldonado36df2d72016-12-08 09:56:16 -0800206 "../..:webrtc_common",
ehmaldonado36df2d72016-12-08 09:56:16 -0800207 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700208 "../../rtc_base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200209 "../../system_wrappers",
210 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000211}
212
kjellanderb62dbbe2016-09-23 00:38:52 -0700213rtc_static_library("webrtc_vp8") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000214 sources = [
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000215 "codecs/vp8/default_temporal_layers.cc",
216 "codecs/vp8/default_temporal_layers.h",
pbos@webrtc.org9115cde2014-12-09 10:36:40 +0000217 "codecs/vp8/include/vp8.h",
218 "codecs/vp8/include/vp8_common_types.h",
pbos@webrtc.org9115cde2014-12-09 10:36:40 +0000219 "codecs/vp8/screenshare_layers.cc",
220 "codecs/vp8/screenshare_layers.h",
kjellandera8d8aad2017-03-08 05:42:26 -0800221 "codecs/vp8/simulcast_rate_allocator.cc",
222 "codecs/vp8/simulcast_rate_allocator.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000223 "codecs/vp8/temporal_layers.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000224 "codecs/vp8/vp8_impl.cc",
225 "codecs/vp8/vp8_impl.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000226 ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000227
kjellander8f4419b2016-06-02 02:09:52 -0700228 # TODO(jschuh): Bug 1348: fix this warning.
229 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
230
kjellandere40a7ee2016-10-16 23:56:12 -0700231 if (!build_with_chromium && is_clang) {
232 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700233 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000234 }
235
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000236 deps = [
237 ":video_coding_utility",
mbonadei1140f972017-04-26 03:38:35 -0700238 "..:module_api",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000239 "../..:webrtc_common",
ilnikd60d06a2017-04-05 03:02:20 -0700240 "../../api/video_codecs:video_codecs_api",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000241 "../../common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700242 "../../rtc_base:rtc_base_approved",
asaperssone5d02f92017-08-09 23:37:05 -0700243 "../../rtc_base:rtc_numerics",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700244 "../../rtc_base:sequenced_task_checker",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000245 "../../system_wrappers",
246 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000247 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200248 deps += [ rtc_libvpx_dir ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000249 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000250}
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000251
kjellanderb62dbbe2016-09-23 00:38:52 -0700252rtc_static_library("webrtc_vp9") {
phoglund33603522016-10-05 06:52:22 -0700253 if (rtc_libvpx_build_vp9) {
254 sources = [
255 "codecs/vp9/include/vp9.h",
256 "codecs/vp9/screenshare_layers.cc",
257 "codecs/vp9/screenshare_layers.h",
258 "codecs/vp9/vp9_frame_buffer_pool.cc",
259 "codecs/vp9/vp9_frame_buffer_pool.h",
260 "codecs/vp9/vp9_impl.cc",
261 "codecs/vp9/vp9_impl.h",
262 ]
263 } else {
264 sources = [
265 "codecs/vp9/vp9_noop.cc",
266 ]
267 }
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000268
kjellandere40a7ee2016-10-16 23:56:12 -0700269 if (!build_with_chromium && is_clang) {
270 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700271 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000272 }
273
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000274 deps = [
275 ":video_coding_utility",
mbonadei1140f972017-04-26 03:38:35 -0700276 "..:module_api",
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000277 "../../common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700278 "../../rtc_base:rtc_base_approved",
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000279 "../../system_wrappers",
280 ]
281 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200282 deps += [ rtc_libvpx_dir ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000283 }
284}
kjellanderfb114242016-06-13 00:19:48 -0700285
286if (rtc_include_tests) {
magjed73c0eb52017-08-07 06:55:28 -0700287 if (is_ios || is_mac) {
288 rtc_static_library("objc_codec_test") {
289 sources = [
290 "codecs/test/objc_codec_h264_test.h",
291 "codecs/test/objc_codec_h264_test.mm",
292 ]
293 deps = [
294 "../../api:video_frame_api",
295 "../../api/video_codecs:video_codecs_api",
296 "../../media:rtc_audio_video",
297 "../../modules:module_api",
298 "../../sdk:objc_common",
299 "../../sdk:objc_peerconnection",
300 "../../sdk:objc_peerconnectionfactory",
301 "../../sdk:objc_videotoolbox",
302 "../../sdk:objc_videotracksource",
303 ]
304
305 if (!build_with_chromium && is_clang) {
306 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
307 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
308 }
309 }
310 }
311
magjed6cc25612017-07-10 03:26:36 -0700312 rtc_source_set("simulcast_test_utility") {
313 testonly = true
314 sources = [
315 "codecs/vp8/simulcast_test_utility.h",
316 ]
317
318 if (!build_with_chromium && is_clang) {
319 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
320 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
321 }
322
323 deps = [
324 ":video_coding",
325 ":webrtc_vp8",
326 "../../api:video_frame_api",
magjed6cc25612017-07-10 03:26:36 -0700327 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700328 "../../rtc_base:rtc_base_approved",
magjed6cc25612017-07-10 03:26:36 -0700329 "../../test:test_support",
330 ]
331 }
332
brandtr52cdd3b2017-01-26 02:25:21 -0800333 rtc_executable("video_quality_measurement") {
334 testonly = true
335
336 sources = [
337 "codecs/tools/video_quality_measurement.cc",
338 ]
339
340 if (!build_with_chromium && is_clang) {
341 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
342 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
343 }
344
345 deps = [
346 ":video_codecs_test_framework",
347 ":video_coding",
348 ":webrtc_vp8",
349 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700350 "../../rtc_base:rtc_base_approved",
brandtr52cdd3b2017-01-26 02:25:21 -0800351 "../../system_wrappers:field_trial_default",
352 "../../system_wrappers:metrics_default",
353 "../../system_wrappers:system_wrappers",
354 "../../test:test_support",
ehmaldonado656610f2017-02-06 02:21:11 -0800355 "../../test:video_test_common",
356 "../../test:video_test_support",
357 "../video_capture",
brandtr52cdd3b2017-01-26 02:25:21 -0800358 "//third_party/gflags",
359 ]
360 } # video_quality_measurement
361
ehmaldonado38a21322016-09-02 04:10:34 -0700362 rtc_source_set("video_codecs_test_framework") {
kjellanderfb114242016-06-13 00:19:48 -0700363 testonly = true
364 sources = [
365 "codecs/test/mock/mock_packet_manipulator.h",
366 "codecs/test/packet_manipulator.cc",
367 "codecs/test/packet_manipulator.h",
368 "codecs/test/predictive_packet_manipulator.cc",
369 "codecs/test/predictive_packet_manipulator.h",
370 "codecs/test/stats.cc",
371 "codecs/test/stats.h",
sakalb8102e02017-03-06 03:52:55 -0800372 "codecs/test/video_codec_test.cc",
373 "codecs/test/video_codec_test.h",
kjellanderfb114242016-06-13 00:19:48 -0700374 "codecs/test/videoprocessor.cc",
375 "codecs/test/videoprocessor.h",
376 ]
377
kjellandere40a7ee2016-10-16 23:56:12 -0700378 if (!build_with_chromium && is_clang) {
379 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700380 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -0700381 }
382
383 deps = [
ehmaldonado36df2d72016-12-08 09:56:16 -0800384 ":video_coding",
385 ":video_coding_utility",
kjellandera8d8aad2017-03-08 05:42:26 -0800386 ":webrtc_vp8",
ehmaldonado36df2d72016-12-08 09:56:16 -0800387 "../..:webrtc_common",
ilnikd60d06a2017-04-05 03:02:20 -0700388 "../../api/video_codecs:video_codecs_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800389 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700390 "../../rtc_base:rtc_base_approved",
ehmaldonado36df2d72016-12-08 09:56:16 -0800391 "../../system_wrappers:system_wrappers",
kjellanderfb114242016-06-13 00:19:48 -0700392 "../../test:test_support",
sakalb8102e02017-03-06 03:52:55 -0800393 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800394 "../../test:video_test_support",
kjellanderfb114242016-06-13 00:19:48 -0700395 ]
396 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800397
brandtr6bb8e0e2017-02-20 04:35:52 -0800398 rtc_source_set("video_coding_videoprocessor_integration_test") {
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800399 testonly = true
brandtr6bb8e0e2017-02-20 04:35:52 -0800400
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800401 sources = [
asapersson38e93242017-02-10 01:37:17 -0800402 "codecs/test/videoprocessor_integrationtest.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800403 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800404
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800405 deps = [
406 ":video_codecs_test_framework",
407 ":video_coding",
brandtrb78bc752017-02-22 01:26:59 -0800408 ":video_coding_utility",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800409 ":webrtc_h264",
410 ":webrtc_vp8",
411 ":webrtc_vp9",
412 "../..:webrtc_common",
brandtr6bb8e0e2017-02-20 04:35:52 -0800413 "../../media:rtc_media",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700414 "../../rtc_base:rtc_base_approved",
brandtr6bb8e0e2017-02-20 04:35:52 -0800415 "../../test:test_support",
mflodman351424e2017-08-10 02:43:14 -0700416 "../../test:video_test_common",
brandtr6bb8e0e2017-02-20 04:35:52 -0800417 "../../test:video_test_support",
418 ]
419
420 if (is_android) {
421 sources += [
422 "codecs/test/android_test_initializer.cc",
423 "codecs/test/android_test_initializer.h",
424 ]
425
426 deps += [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700427 "../../rtc_base:rtc_base_approved",
brandtr6bb8e0e2017-02-20 04:35:52 -0800428 "../../sdk/android:libjingle_peerconnection_jni",
429 "//base",
430 ]
431 }
432
433 if (is_ios || is_mac) {
434 deps += [
magjed73c0eb52017-08-07 06:55:28 -0700435 ":objc_codec_test",
brandtr6bb8e0e2017-02-20 04:35:52 -0800436 "../../media:rtc_media_base",
kthelgason2f088792017-05-30 01:48:47 -0700437 "../../sdk:objc_videotoolbox",
brandtr6bb8e0e2017-02-20 04:35:52 -0800438 ]
439 }
440 }
441
442 rtc_source_set("video_coding_modules_tests") {
443 testonly = true
444
kjellandere0629c02017-04-25 04:04:50 -0700445 # Skip restricting visibility on mobile platforms since the tests on those
446 # gets additional generated targets which would require many lines here to
447 # cover (which would be confusing to read and hard to maintain).
448 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700449 visibility = [ "..:modules_tests" ]
kjellandere0629c02017-04-25 04:04:50 -0700450 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800451 sources = [
sakalb8102e02017-03-06 03:52:55 -0800452 "codecs/h264/test/h264_impl_unittest.cc",
brandtr6bb8e0e2017-02-20 04:35:52 -0800453 "codecs/test/videoprocessor_integrationtest.cc",
454 "codecs/vp8/test/vp8_impl_unittest.cc",
sakal7adadb12017-02-23 02:54:57 -0800455 "codecs/vp9/test/vp9_impl_unittest.cc",
brandtr6bb8e0e2017-02-20 04:35:52 -0800456 ]
457
458 deps = [
sakalb8102e02017-03-06 03:52:55 -0800459 ":video_codecs_test_framework",
brandtr6bb8e0e2017-02-20 04:35:52 -0800460 ":video_coding_videoprocessor_integration_test",
sakalb8102e02017-03-06 03:52:55 -0800461 ":webrtc_h264",
brandtr6bb8e0e2017-02-20 04:35:52 -0800462 ":webrtc_vp8",
sakal7adadb12017-02-23 02:54:57 -0800463 ":webrtc_vp9",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800464 "../../api:video_frame_api",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800465 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700466 "../../rtc_base:rtc_base_approved",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800467 "../../test:test_support",
468 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800469 "../video_capture",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800470 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800471
magjed73c0eb52017-08-07 06:55:28 -0700472 if (is_ios || is_mac) {
473 deps += [ ":objc_codec_test" ]
474 }
475
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800476 if (rtc_use_h264) {
brandtr669ea192017-08-07 03:35:13 -0700477 defines = [ "WEBRTC_USE_H264" ]
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800478 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800479
480 if (!build_with_chromium && is_clang) {
481 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
482 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
483 }
484 }
485
486 plot_videoprocessor_integrationtest_resources = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700487 "../../../resources/foreman_128x96.yuv",
488 "../../../resources/foreman_160x120.yuv",
489 "../../../resources/foreman_176x144.yuv",
490 "../../../resources/foreman_320x240.yuv",
491 "../../../resources/foreman_cif.yuv",
brandtr6bb8e0e2017-02-20 04:35:52 -0800492 ]
493
494 if (is_ios || is_mac) {
495 bundle_data("plot_videoprocessor_integrationtest_bundle_data") {
496 testonly = true
497 sources = plot_videoprocessor_integrationtest_resources
498 outputs = [
499 "{{bundle_resources_dir}}/{{source_file_part}}",
500 ]
501 }
502 }
503
504 # This executable is meant for local codec perf testing and should not be run
505 # on the trybots/buildbots, hence the existence of this special build target.
506 rtc_test("plot_videoprocessor_integrationtest") {
507 testonly = true
508
509 sources = [
510 "codecs/test/plot_videoprocessor_integrationtest.cc",
511 ]
512
513 deps = [
514 ":video_coding_videoprocessor_integration_test",
515 "../../test:test_main",
516 "../../test:video_test_common",
517 "../video_capture",
518 ]
519
520 data = plot_videoprocessor_integrationtest_resources
521
522 if (is_android) {
523 deps += [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700524 "../../rtc_base:rtc_base_approved",
brandtr6bb8e0e2017-02-20 04:35:52 -0800525
526 # TODO(brandtr): Figure out if the java dep below could be moved into
527 # :video_coding_videoprocessor_integration_test, where it belongs.
528 # When that is done, support for Android HW codecs can be added to the
529 # modules_tests target as well.
530 "../../sdk/android:libjingle_peerconnection_java",
531 "../../sdk/android:libjingle_peerconnection_jni",
532 "//base",
533 "//testing/android/native_test:native_test_support",
534 ]
535
536 shard_timeout = 900
537 }
538
539 if (is_ios || is_mac) {
magjed73c0eb52017-08-07 06:55:28 -0700540 deps += [
541 ":objc_codec_test",
542 ":plot_videoprocessor_integrationtest_bundle_data",
543 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800544 }
545
546 # TODO(brandtr): Remove this define when the modules_tests target properly
547 # loads the Java classes mentioned above.
548 defines = [ "WEBRTC_VIDEOPROCESSOR_INTEGRATIONTEST_HW_CODECS_ENABLED" ]
549
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800550 if (!build_with_chromium && is_clang) {
551 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
552 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
553 }
554 }
555
ehmaldonado36268652017-01-19 08:27:11 -0800556 rtc_source_set("video_coding_unittests") {
557 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700558
559 # Skip restricting visibility on mobile platforms since the tests on those
560 # gets additional generated targets which would require many lines here to
561 # cover (which would be confusing to read and hard to maintain).
562 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700563 visibility = [ "..:modules_unittests" ]
kjellandere0629c02017-04-25 04:04:50 -0700564 }
ehmaldonado36268652017-01-19 08:27:11 -0800565 sources = [
566 "codecs/test/packet_manipulator_unittest.cc",
567 "codecs/test/stats_unittest.cc",
568 "codecs/test/videoprocessor_unittest.cc",
569 "codecs/vp8/default_temporal_layers_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800570 "codecs/vp8/screenshare_layers_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800571 "codecs/vp8/simulcast_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800572 "decoding_state_unittest.cc",
573 "frame_buffer2_unittest.cc",
ilnik04f4d122017-06-19 07:18:55 -0700574 "generic_encoder_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800575 "h264_sprop_parameter_sets_unittest.cc",
576 "h264_sps_pps_tracker_unittest.cc",
577 "histogram_unittest.cc",
578 "include/mock/mock_vcm_callbacks.h",
579 "jitter_buffer_unittest.cc",
580 "jitter_estimator_tests.cc",
581 "nack_module_unittest.cc",
582 "protection_bitrate_calculator_unittest.cc",
583 "receiver_unittest.cc",
584 "rtp_frame_reference_finder_unittest.cc",
585 "sequence_number_util_unittest.cc",
586 "session_info_unittest.cc",
587 "test/stream_generator.cc",
588 "test/stream_generator.h",
589 "timing_unittest.cc",
590 "utility/default_video_bitrate_allocator_unittest.cc",
591 "utility/frame_dropper_unittest.cc",
592 "utility/ivf_file_writer_unittest.cc",
593 "utility/moving_average_unittest.cc",
594 "utility/quality_scaler_unittest.cc",
595 "utility/simulcast_rate_allocator_unittest.cc",
sprang429600d2017-01-26 06:12:26 -0800596 "video_codec_initializer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800597 "video_packet_buffer_unittest.cc",
598 "video_receiver_unittest.cc",
599 "video_sender_unittest.cc",
600 ]
601 if (rtc_libvpx_build_vp9) {
602 sources += [ "codecs/vp9/vp9_screenshare_layers_unittest.cc" ]
603 }
604 if (rtc_use_h264) {
605 sources += [ "codecs/h264/h264_encoder_impl_unittest.cc" ]
606 }
607 deps = [
magjed6cc25612017-07-10 03:26:36 -0700608 ":simulcast_test_utility",
ehmaldonado36268652017-01-19 08:27:11 -0800609 ":video_codecs_test_framework",
610 ":video_coding",
611 ":video_coding_utility",
612 ":webrtc_h264",
613 ":webrtc_vp8",
614 ":webrtc_vp9",
mbonadei1140f972017-04-26 03:38:35 -0700615 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -0800616 "../..:webrtc_common",
617 "../../api:video_frame_api",
ilnikd60d06a2017-04-05 03:02:20 -0700618 "../../api/video_codecs:video_codecs_api",
ehmaldonado36268652017-01-19 08:27:11 -0800619 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700620 "../../rtc_base:rtc_base",
621 "../../rtc_base:rtc_base_approved",
622 "../../rtc_base:rtc_task_queue",
ehmaldonado36268652017-01-19 08:27:11 -0800623 "../../system_wrappers:metrics_default",
624 "../../system_wrappers:system_wrappers",
625 "../../test:field_trial",
626 "../../test:test_support",
627 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800628 "../../test:video_test_support",
ehmaldonado36268652017-01-19 08:27:11 -0800629 "../rtp_rtcp:rtp_rtcp",
630 "//testing/gmock",
631 ]
632 if (rtc_build_libvpx) {
633 deps += [ rtc_libvpx_dir ]
634 }
635 if (is_win) {
636 cflags = [
637 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
638 "/wd4373", # virtual function override.
639 ]
640 }
641
642 # TODO(jschuh): bugs.webrtc.org/1348: fix this warning.
643 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
644 if (!build_with_chromium && is_clang) {
645 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
646 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
647 }
648 }
kjellanderfb114242016-06-13 00:19:48 -0700649}