blob: 11dafc1c219da8ef7904b52b7f0bcadc46c72281 [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
kjellanderb62dbbe2016-09-23 00:38:52 -0700149rtc_static_library("webrtc_h264") {
Zeke Chin71f6f442015-06-29 14:34:58 -0700150 sources = [
151 "codecs/h264/h264.cc",
152 "codecs/h264/include/h264.h",
153 ]
154
kjellandere40a7ee2016-10-16 23:56:12 -0700155 if (!build_with_chromium && is_clang) {
156 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700157 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Zeke Chin71f6f442015-06-29 14:34:58 -0700158 }
159
hbosbab934b2016-01-27 01:36:03 -0800160 defines = []
Zeke Chin71f6f442015-06-29 14:34:58 -0700161 deps = [
ehmaldonado36df2d72016-12-08 09:56:16 -0800162 ":video_coding_utility",
magjed21d110f2017-02-28 00:28:04 -0800163 "../../media:rtc_media_base",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700164 "../../rtc_base:rtc_base_approved",
Zeke Chin71f6f442015-06-29 14:34:58 -0700165 "../../system_wrappers",
166 ]
hbosa9a1d2a2016-01-11 10:19:02 -0800167
hbos902c03e2016-01-21 03:34:40 -0800168 if (rtc_use_h264) {
hbos9dc59282016-02-03 05:09:37 -0800169 defines += [ "WEBRTC_USE_H264" ]
hbosc5a39c22016-02-02 02:26:05 -0800170 if (rtc_initialize_ffmpeg) {
171 defines += [ "WEBRTC_INITIALIZE_FFMPEG" ]
172 }
hbosbab934b2016-01-27 01:36:03 -0800173 sources += [
174 "codecs/h264/h264_decoder_impl.cc",
175 "codecs/h264/h264_decoder_impl.h",
176 "codecs/h264/h264_encoder_impl.cc",
177 "codecs/h264/h264_encoder_impl.h",
178 ]
hbosa9a1d2a2016-01-11 10:19:02 -0800179 deps += [
kjellanderf6b55092016-02-07 23:04:26 -0800180 "../../common_video",
hta9aa96882016-12-06 05:36:03 -0800181 "../../media:rtc_media_base",
hbosa9a1d2a2016-01-11 10:19:02 -0800182 "//third_party/ffmpeg:ffmpeg",
183 "//third_party/openh264:encoder",
184 ]
185 }
Zeke Chin71f6f442015-06-29 14:34:58 -0700186}
187
kjellanderb62dbbe2016-09-23 00:38:52 -0700188rtc_static_library("webrtc_i420") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000189 sources = [
Henrik Kjellandera74c08d2015-10-22 12:23:11 +0200190 "codecs/i420/i420.cc",
191 "codecs/i420/include/i420.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000192 ]
193
kjellandere40a7ee2016-10-16 23:56:12 -0700194 if (!build_with_chromium && is_clang) {
195 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700196 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000197 }
198
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200199 deps = [
ehmaldonado36df2d72016-12-08 09:56:16 -0800200 "../..:webrtc_common",
ehmaldonado36df2d72016-12-08 09:56:16 -0800201 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700202 "../../rtc_base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200203 "../../system_wrappers",
204 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000205}
206
kjellanderb62dbbe2016-09-23 00:38:52 -0700207rtc_static_library("webrtc_vp8") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000208 sources = [
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000209 "codecs/vp8/default_temporal_layers.cc",
210 "codecs/vp8/default_temporal_layers.h",
pbos@webrtc.org9115cde2014-12-09 10:36:40 +0000211 "codecs/vp8/include/vp8.h",
212 "codecs/vp8/include/vp8_common_types.h",
pbos@webrtc.org9115cde2014-12-09 10:36:40 +0000213 "codecs/vp8/screenshare_layers.cc",
214 "codecs/vp8/screenshare_layers.h",
kjellandera8d8aad2017-03-08 05:42:26 -0800215 "codecs/vp8/simulcast_rate_allocator.cc",
216 "codecs/vp8/simulcast_rate_allocator.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000217 "codecs/vp8/temporal_layers.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000218 "codecs/vp8/vp8_impl.cc",
219 "codecs/vp8/vp8_impl.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000220 ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000221
kjellander8f4419b2016-06-02 02:09:52 -0700222 # TODO(jschuh): Bug 1348: fix this warning.
223 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
224
kjellandere40a7ee2016-10-16 23:56:12 -0700225 if (!build_with_chromium && is_clang) {
226 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700227 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000228 }
229
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000230 deps = [
231 ":video_coding_utility",
mbonadei1140f972017-04-26 03:38:35 -0700232 "..:module_api",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000233 "../..:webrtc_common",
ilnikd60d06a2017-04-05 03:02:20 -0700234 "../../api/video_codecs:video_codecs_api",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000235 "../../common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700236 "../../rtc_base:rtc_base_approved",
237 "../../rtc_base:sequenced_task_checker",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000238 "../../system_wrappers",
239 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000240 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200241 deps += [ rtc_libvpx_dir ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000242 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000243}
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000244
kjellanderb62dbbe2016-09-23 00:38:52 -0700245rtc_static_library("webrtc_vp9") {
phoglund33603522016-10-05 06:52:22 -0700246 if (rtc_libvpx_build_vp9) {
247 sources = [
248 "codecs/vp9/include/vp9.h",
249 "codecs/vp9/screenshare_layers.cc",
250 "codecs/vp9/screenshare_layers.h",
251 "codecs/vp9/vp9_frame_buffer_pool.cc",
252 "codecs/vp9/vp9_frame_buffer_pool.h",
253 "codecs/vp9/vp9_impl.cc",
254 "codecs/vp9/vp9_impl.h",
255 ]
256 } else {
257 sources = [
258 "codecs/vp9/vp9_noop.cc",
259 ]
260 }
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000261
kjellandere40a7ee2016-10-16 23:56:12 -0700262 if (!build_with_chromium && is_clang) {
263 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700264 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000265 }
266
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000267 deps = [
268 ":video_coding_utility",
mbonadei1140f972017-04-26 03:38:35 -0700269 "..:module_api",
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000270 "../../common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700271 "../../rtc_base:rtc_base_approved",
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000272 "../../system_wrappers",
273 ]
274 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200275 deps += [ rtc_libvpx_dir ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000276 }
277}
kjellanderfb114242016-06-13 00:19:48 -0700278
279if (rtc_include_tests) {
magjed73c0eb52017-08-07 06:55:28 -0700280 if (is_ios || is_mac) {
281 rtc_static_library("objc_codec_test") {
282 sources = [
283 "codecs/test/objc_codec_h264_test.h",
284 "codecs/test/objc_codec_h264_test.mm",
285 ]
286 deps = [
287 "../../api:video_frame_api",
288 "../../api/video_codecs:video_codecs_api",
289 "../../media:rtc_audio_video",
290 "../../modules:module_api",
291 "../../sdk:objc_common",
292 "../../sdk:objc_peerconnection",
293 "../../sdk:objc_peerconnectionfactory",
294 "../../sdk:objc_videotoolbox",
295 "../../sdk:objc_videotracksource",
296 ]
297
298 if (!build_with_chromium && is_clang) {
299 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
300 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
301 }
302 }
303 }
304
magjed6cc25612017-07-10 03:26:36 -0700305 rtc_source_set("simulcast_test_utility") {
306 testonly = true
307 sources = [
308 "codecs/vp8/simulcast_test_utility.h",
309 ]
310
311 if (!build_with_chromium && is_clang) {
312 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
313 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
314 }
315
316 deps = [
317 ":video_coding",
318 ":webrtc_vp8",
319 "../../api:video_frame_api",
magjed6cc25612017-07-10 03:26:36 -0700320 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700321 "../../rtc_base:rtc_base_approved",
magjed6cc25612017-07-10 03:26:36 -0700322 "../../test:test_support",
323 ]
324 }
325
brandtr52cdd3b2017-01-26 02:25:21 -0800326 rtc_executable("video_quality_measurement") {
327 testonly = true
328
329 sources = [
330 "codecs/tools/video_quality_measurement.cc",
331 ]
332
333 if (!build_with_chromium && is_clang) {
334 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
335 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
336 }
337
338 deps = [
339 ":video_codecs_test_framework",
340 ":video_coding",
341 ":webrtc_vp8",
342 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700343 "../../rtc_base:rtc_base_approved",
brandtr52cdd3b2017-01-26 02:25:21 -0800344 "../../system_wrappers:field_trial_default",
345 "../../system_wrappers:metrics_default",
346 "../../system_wrappers:system_wrappers",
347 "../../test:test_support",
ehmaldonado656610f2017-02-06 02:21:11 -0800348 "../../test:video_test_common",
349 "../../test:video_test_support",
350 "../video_capture",
brandtr52cdd3b2017-01-26 02:25:21 -0800351 "//third_party/gflags",
352 ]
353 } # video_quality_measurement
354
ehmaldonado38a21322016-09-02 04:10:34 -0700355 rtc_source_set("video_codecs_test_framework") {
kjellanderfb114242016-06-13 00:19:48 -0700356 testonly = true
357 sources = [
358 "codecs/test/mock/mock_packet_manipulator.h",
359 "codecs/test/packet_manipulator.cc",
360 "codecs/test/packet_manipulator.h",
361 "codecs/test/predictive_packet_manipulator.cc",
362 "codecs/test/predictive_packet_manipulator.h",
363 "codecs/test/stats.cc",
364 "codecs/test/stats.h",
sakalb8102e02017-03-06 03:52:55 -0800365 "codecs/test/video_codec_test.cc",
366 "codecs/test/video_codec_test.h",
kjellanderfb114242016-06-13 00:19:48 -0700367 "codecs/test/videoprocessor.cc",
368 "codecs/test/videoprocessor.h",
369 ]
370
kjellandere40a7ee2016-10-16 23:56:12 -0700371 if (!build_with_chromium && is_clang) {
372 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700373 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -0700374 }
375
376 deps = [
ehmaldonado36df2d72016-12-08 09:56:16 -0800377 ":video_coding",
378 ":video_coding_utility",
kjellandera8d8aad2017-03-08 05:42:26 -0800379 ":webrtc_vp8",
ehmaldonado36df2d72016-12-08 09:56:16 -0800380 "../..:webrtc_common",
ilnikd60d06a2017-04-05 03:02:20 -0700381 "../../api/video_codecs:video_codecs_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800382 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700383 "../../rtc_base:rtc_base_approved",
ehmaldonado36df2d72016-12-08 09:56:16 -0800384 "../../system_wrappers:system_wrappers",
kjellanderfb114242016-06-13 00:19:48 -0700385 "../../test:test_support",
sakalb8102e02017-03-06 03:52:55 -0800386 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800387 "../../test:video_test_support",
kjellanderfb114242016-06-13 00:19:48 -0700388 ]
389 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800390
brandtr6bb8e0e2017-02-20 04:35:52 -0800391 rtc_source_set("video_coding_videoprocessor_integration_test") {
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800392 testonly = true
brandtr6bb8e0e2017-02-20 04:35:52 -0800393
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800394 sources = [
asapersson38e93242017-02-10 01:37:17 -0800395 "codecs/test/videoprocessor_integrationtest.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800396 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800397
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800398 deps = [
399 ":video_codecs_test_framework",
400 ":video_coding",
brandtrb78bc752017-02-22 01:26:59 -0800401 ":video_coding_utility",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800402 ":webrtc_h264",
403 ":webrtc_vp8",
404 ":webrtc_vp9",
405 "../..:webrtc_common",
brandtr6bb8e0e2017-02-20 04:35:52 -0800406 "../../media:rtc_media",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700407 "../../rtc_base:rtc_base_approved",
brandtr6bb8e0e2017-02-20 04:35:52 -0800408 "../../test:test_support",
409 "../../test:video_test_support",
410 ]
411
412 if (is_android) {
413 sources += [
414 "codecs/test/android_test_initializer.cc",
415 "codecs/test/android_test_initializer.h",
416 ]
417
418 deps += [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700419 "../../rtc_base:rtc_base_approved",
brandtr6bb8e0e2017-02-20 04:35:52 -0800420 "../../sdk/android:libjingle_peerconnection_jni",
421 "//base",
422 ]
423 }
424
425 if (is_ios || is_mac) {
426 deps += [
magjed73c0eb52017-08-07 06:55:28 -0700427 ":objc_codec_test",
brandtr6bb8e0e2017-02-20 04:35:52 -0800428 "../../media:rtc_media_base",
kthelgason2f088792017-05-30 01:48:47 -0700429 "../../sdk:objc_videotoolbox",
brandtr6bb8e0e2017-02-20 04:35:52 -0800430 ]
431 }
432 }
433
434 rtc_source_set("video_coding_modules_tests") {
435 testonly = true
436
kjellandere0629c02017-04-25 04:04:50 -0700437 # Skip restricting visibility on mobile platforms since the tests on those
438 # gets additional generated targets which would require many lines here to
439 # cover (which would be confusing to read and hard to maintain).
440 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700441 visibility = [ "..:modules_tests" ]
kjellandere0629c02017-04-25 04:04:50 -0700442 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800443 sources = [
sakalb8102e02017-03-06 03:52:55 -0800444 "codecs/h264/test/h264_impl_unittest.cc",
brandtr6bb8e0e2017-02-20 04:35:52 -0800445 "codecs/test/videoprocessor_integrationtest.cc",
446 "codecs/vp8/test/vp8_impl_unittest.cc",
sakal7adadb12017-02-23 02:54:57 -0800447 "codecs/vp9/test/vp9_impl_unittest.cc",
brandtr6bb8e0e2017-02-20 04:35:52 -0800448 ]
449
450 deps = [
sakalb8102e02017-03-06 03:52:55 -0800451 ":video_codecs_test_framework",
brandtr6bb8e0e2017-02-20 04:35:52 -0800452 ":video_coding_videoprocessor_integration_test",
sakalb8102e02017-03-06 03:52:55 -0800453 ":webrtc_h264",
brandtr6bb8e0e2017-02-20 04:35:52 -0800454 ":webrtc_vp8",
sakal7adadb12017-02-23 02:54:57 -0800455 ":webrtc_vp9",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800456 "../../api:video_frame_api",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800457 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700458 "../../rtc_base:rtc_base_approved",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800459 "../../test:test_support",
460 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800461 "../video_capture",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800462 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800463
magjed73c0eb52017-08-07 06:55:28 -0700464 if (is_ios || is_mac) {
465 deps += [ ":objc_codec_test" ]
466 }
467
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800468 if (rtc_use_h264) {
brandtr669ea192017-08-07 03:35:13 -0700469 defines = [ "WEBRTC_USE_H264" ]
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800470 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800471
472 if (!build_with_chromium && is_clang) {
473 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
474 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
475 }
476 }
477
478 plot_videoprocessor_integrationtest_resources = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700479 "../../../resources/foreman_128x96.yuv",
480 "../../../resources/foreman_160x120.yuv",
481 "../../../resources/foreman_176x144.yuv",
482 "../../../resources/foreman_320x240.yuv",
483 "../../../resources/foreman_cif.yuv",
brandtr6bb8e0e2017-02-20 04:35:52 -0800484 ]
485
486 if (is_ios || is_mac) {
487 bundle_data("plot_videoprocessor_integrationtest_bundle_data") {
488 testonly = true
489 sources = plot_videoprocessor_integrationtest_resources
490 outputs = [
491 "{{bundle_resources_dir}}/{{source_file_part}}",
492 ]
493 }
494 }
495
496 # This executable is meant for local codec perf testing and should not be run
497 # on the trybots/buildbots, hence the existence of this special build target.
498 rtc_test("plot_videoprocessor_integrationtest") {
499 testonly = true
500
501 sources = [
502 "codecs/test/plot_videoprocessor_integrationtest.cc",
503 ]
504
505 deps = [
506 ":video_coding_videoprocessor_integration_test",
507 "../../test:test_main",
508 "../../test:video_test_common",
509 "../video_capture",
510 ]
511
512 data = plot_videoprocessor_integrationtest_resources
513
514 if (is_android) {
515 deps += [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700516 "../../rtc_base:rtc_base_approved",
brandtr6bb8e0e2017-02-20 04:35:52 -0800517
518 # TODO(brandtr): Figure out if the java dep below could be moved into
519 # :video_coding_videoprocessor_integration_test, where it belongs.
520 # When that is done, support for Android HW codecs can be added to the
521 # modules_tests target as well.
522 "../../sdk/android:libjingle_peerconnection_java",
523 "../../sdk/android:libjingle_peerconnection_jni",
524 "//base",
525 "//testing/android/native_test:native_test_support",
526 ]
527
528 shard_timeout = 900
529 }
530
531 if (is_ios || is_mac) {
magjed73c0eb52017-08-07 06:55:28 -0700532 deps += [
533 ":objc_codec_test",
534 ":plot_videoprocessor_integrationtest_bundle_data",
535 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800536 }
537
538 # TODO(brandtr): Remove this define when the modules_tests target properly
539 # loads the Java classes mentioned above.
540 defines = [ "WEBRTC_VIDEOPROCESSOR_INTEGRATIONTEST_HW_CODECS_ENABLED" ]
541
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800542 if (!build_with_chromium && is_clang) {
543 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
544 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
545 }
546 }
547
ehmaldonado36268652017-01-19 08:27:11 -0800548 rtc_source_set("video_coding_unittests") {
549 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700550
551 # Skip restricting visibility on mobile platforms since the tests on those
552 # gets additional generated targets which would require many lines here to
553 # cover (which would be confusing to read and hard to maintain).
554 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700555 visibility = [ "..:modules_unittests" ]
kjellandere0629c02017-04-25 04:04:50 -0700556 }
ehmaldonado36268652017-01-19 08:27:11 -0800557 sources = [
558 "codecs/test/packet_manipulator_unittest.cc",
559 "codecs/test/stats_unittest.cc",
560 "codecs/test/videoprocessor_unittest.cc",
561 "codecs/vp8/default_temporal_layers_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800562 "codecs/vp8/screenshare_layers_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800563 "codecs/vp8/simulcast_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800564 "decoding_state_unittest.cc",
565 "frame_buffer2_unittest.cc",
ilnik04f4d122017-06-19 07:18:55 -0700566 "generic_encoder_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800567 "h264_sprop_parameter_sets_unittest.cc",
568 "h264_sps_pps_tracker_unittest.cc",
569 "histogram_unittest.cc",
570 "include/mock/mock_vcm_callbacks.h",
571 "jitter_buffer_unittest.cc",
572 "jitter_estimator_tests.cc",
573 "nack_module_unittest.cc",
574 "protection_bitrate_calculator_unittest.cc",
575 "receiver_unittest.cc",
576 "rtp_frame_reference_finder_unittest.cc",
577 "sequence_number_util_unittest.cc",
578 "session_info_unittest.cc",
579 "test/stream_generator.cc",
580 "test/stream_generator.h",
581 "timing_unittest.cc",
582 "utility/default_video_bitrate_allocator_unittest.cc",
583 "utility/frame_dropper_unittest.cc",
584 "utility/ivf_file_writer_unittest.cc",
585 "utility/moving_average_unittest.cc",
586 "utility/quality_scaler_unittest.cc",
587 "utility/simulcast_rate_allocator_unittest.cc",
sprang429600d2017-01-26 06:12:26 -0800588 "video_codec_initializer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800589 "video_packet_buffer_unittest.cc",
590 "video_receiver_unittest.cc",
591 "video_sender_unittest.cc",
592 ]
593 if (rtc_libvpx_build_vp9) {
594 sources += [ "codecs/vp9/vp9_screenshare_layers_unittest.cc" ]
595 }
596 if (rtc_use_h264) {
597 sources += [ "codecs/h264/h264_encoder_impl_unittest.cc" ]
598 }
599 deps = [
magjed6cc25612017-07-10 03:26:36 -0700600 ":simulcast_test_utility",
ehmaldonado36268652017-01-19 08:27:11 -0800601 ":video_codecs_test_framework",
602 ":video_coding",
603 ":video_coding_utility",
604 ":webrtc_h264",
605 ":webrtc_vp8",
606 ":webrtc_vp9",
mbonadei1140f972017-04-26 03:38:35 -0700607 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -0800608 "../..:webrtc_common",
609 "../../api:video_frame_api",
ilnikd60d06a2017-04-05 03:02:20 -0700610 "../../api/video_codecs:video_codecs_api",
ehmaldonado36268652017-01-19 08:27:11 -0800611 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700612 "../../rtc_base:rtc_base",
613 "../../rtc_base:rtc_base_approved",
614 "../../rtc_base:rtc_task_queue",
ehmaldonado36268652017-01-19 08:27:11 -0800615 "../../system_wrappers:metrics_default",
616 "../../system_wrappers:system_wrappers",
617 "../../test:field_trial",
618 "../../test:test_support",
619 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800620 "../../test:video_test_support",
ehmaldonado36268652017-01-19 08:27:11 -0800621 "../rtp_rtcp:rtp_rtcp",
622 "//testing/gmock",
623 ]
624 if (rtc_build_libvpx) {
625 deps += [ rtc_libvpx_dir ]
626 }
627 if (is_win) {
628 cflags = [
629 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
630 "/wd4373", # virtual function override.
631 ]
632 }
633
634 # TODO(jschuh): bugs.webrtc.org/1348: fix this warning.
635 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
636 if (!build_with_chromium && is_clang) {
637 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
638 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
639 }
640 }
kjellanderfb114242016-06-13 00:19:48 -0700641}