blob: d333264d93a72e197a453601bdc9162f354a98c7 [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",
ehmaldonado36df2d72016-12-08 09:56:16 -0800100 "../../base:rtc_base",
101 "../../base:rtc_base_approved",
tereliusbc5d9212017-01-13 09:14:33 -0800102 "../../base:rtc_numerics",
ehmaldonado36df2d72016-12-08 09:56:16 -0800103 "../../base:rtc_task_queue",
perkj39a41d92017-06-12 05:53:35 -0700104 "../../base:sequenced_task_checker",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000105 "../../common_video",
106 "../../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",
ehmaldonado36df2d72016-12-08 09:56:16 -0800139 "../../base:rtc_base_approved",
tereliusbc5d9212017-01-13 09:14:33 -0800140 "../../base:rtc_numerics",
kjellandera8d8aad2017-03-08 05:42:26 -0800141 "../../base:rtc_task_queue",
perkj39a41d92017-06-12 05:53:35 -0700142 "../../base:sequenced_task_checker",
perkj4e417b22016-07-14 23:35:55 -0700143 "../../common_video",
kjellandera8d8aad2017-03-08 05:42:26 -0800144 "../../modules/rtp_rtcp:rtp_rtcp",
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",
163 "../../base:rtc_base_approved",
magjed21d110f2017-02-28 00:28:04 -0800164 "../../media:rtc_media_base",
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",
201 "../../base:rtc_base_approved",
202 "../../common_video:common_video",
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",
215 "codecs/vp8/simulcast_encoder_adapter.cc",
216 "codecs/vp8/simulcast_encoder_adapter.h",
kjellandera8d8aad2017-03-08 05:42:26 -0800217 "codecs/vp8/simulcast_rate_allocator.cc",
218 "codecs/vp8/simulcast_rate_allocator.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000219 "codecs/vp8/temporal_layers.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000220 "codecs/vp8/vp8_impl.cc",
221 "codecs/vp8/vp8_impl.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000222 ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000223
kjellander8f4419b2016-06-02 02:09:52 -0700224 # TODO(jschuh): Bug 1348: fix this warning.
225 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
226
kjellandere40a7ee2016-10-16 23:56:12 -0700227 if (!build_with_chromium && is_clang) {
228 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700229 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000230 }
231
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000232 deps = [
233 ":video_coding_utility",
mbonadei1140f972017-04-26 03:38:35 -0700234 "..:module_api",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000235 "../..:webrtc_common",
ilnikd60d06a2017-04-05 03:02:20 -0700236 "../../api/video_codecs:video_codecs_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800237 "../../base:rtc_base_approved",
perkj39a41d92017-06-12 05:53:35 -0700238 "../../base:sequenced_task_checker",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000239 "../../common_video",
240 "../../system_wrappers",
241 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000242 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200243 deps += [ rtc_libvpx_dir ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000244 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000245}
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000246
kjellanderb62dbbe2016-09-23 00:38:52 -0700247rtc_static_library("webrtc_vp9") {
phoglund33603522016-10-05 06:52:22 -0700248 if (rtc_libvpx_build_vp9) {
249 sources = [
250 "codecs/vp9/include/vp9.h",
251 "codecs/vp9/screenshare_layers.cc",
252 "codecs/vp9/screenshare_layers.h",
253 "codecs/vp9/vp9_frame_buffer_pool.cc",
254 "codecs/vp9/vp9_frame_buffer_pool.h",
255 "codecs/vp9/vp9_impl.cc",
256 "codecs/vp9/vp9_impl.h",
257 ]
258 } else {
259 sources = [
260 "codecs/vp9/vp9_noop.cc",
261 ]
262 }
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000263
kjellandere40a7ee2016-10-16 23:56:12 -0700264 if (!build_with_chromium && is_clang) {
265 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700266 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000267 }
268
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000269 deps = [
270 ":video_coding_utility",
mbonadei1140f972017-04-26 03:38:35 -0700271 "..:module_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800272 "../../base:rtc_base_approved",
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000273 "../../common_video",
274 "../../system_wrappers",
275 ]
276 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200277 deps += [ rtc_libvpx_dir ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000278 }
279}
kjellanderfb114242016-06-13 00:19:48 -0700280
281if (rtc_include_tests) {
brandtr52cdd3b2017-01-26 02:25:21 -0800282 rtc_executable("video_quality_measurement") {
283 testonly = true
284
285 sources = [
286 "codecs/tools/video_quality_measurement.cc",
287 ]
288
289 if (!build_with_chromium && is_clang) {
290 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
291 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
292 }
293
294 deps = [
295 ":video_codecs_test_framework",
296 ":video_coding",
297 ":webrtc_vp8",
298 "../..:webrtc_common",
299 "../../base:rtc_base_approved",
300 "../../system_wrappers:field_trial_default",
301 "../../system_wrappers:metrics_default",
302 "../../system_wrappers:system_wrappers",
303 "../../test:test_support",
ehmaldonado656610f2017-02-06 02:21:11 -0800304 "../../test:video_test_common",
305 "../../test:video_test_support",
306 "../video_capture",
brandtr52cdd3b2017-01-26 02:25:21 -0800307 "//third_party/gflags",
308 ]
309 } # video_quality_measurement
310
ehmaldonado38a21322016-09-02 04:10:34 -0700311 rtc_source_set("video_codecs_test_framework") {
kjellanderfb114242016-06-13 00:19:48 -0700312 testonly = true
313 sources = [
314 "codecs/test/mock/mock_packet_manipulator.h",
315 "codecs/test/packet_manipulator.cc",
316 "codecs/test/packet_manipulator.h",
317 "codecs/test/predictive_packet_manipulator.cc",
318 "codecs/test/predictive_packet_manipulator.h",
319 "codecs/test/stats.cc",
320 "codecs/test/stats.h",
sakalb8102e02017-03-06 03:52:55 -0800321 "codecs/test/video_codec_test.cc",
322 "codecs/test/video_codec_test.h",
kjellanderfb114242016-06-13 00:19:48 -0700323 "codecs/test/videoprocessor.cc",
324 "codecs/test/videoprocessor.h",
325 ]
326
kjellandere40a7ee2016-10-16 23:56:12 -0700327 if (!build_with_chromium && is_clang) {
328 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700329 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -0700330 }
331
332 deps = [
ehmaldonado36df2d72016-12-08 09:56:16 -0800333 ":video_coding",
334 ":video_coding_utility",
kjellandera8d8aad2017-03-08 05:42:26 -0800335 ":webrtc_vp8",
ehmaldonado36df2d72016-12-08 09:56:16 -0800336 "../..:webrtc_common",
ilnikd60d06a2017-04-05 03:02:20 -0700337 "../../api/video_codecs:video_codecs_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800338 "../../base:rtc_base_approved",
339 "../../common_video:common_video",
340 "../../system_wrappers:system_wrappers",
kjellanderfb114242016-06-13 00:19:48 -0700341 "../../test:test_support",
sakalb8102e02017-03-06 03:52:55 -0800342 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800343 "../../test:video_test_support",
kjellanderfb114242016-06-13 00:19:48 -0700344 ]
345 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800346
brandtr6bb8e0e2017-02-20 04:35:52 -0800347 rtc_source_set("video_coding_videoprocessor_integration_test") {
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800348 testonly = true
brandtr6bb8e0e2017-02-20 04:35:52 -0800349
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800350 sources = [
asapersson38e93242017-02-10 01:37:17 -0800351 "codecs/test/videoprocessor_integrationtest.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800352 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800353
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800354 deps = [
355 ":video_codecs_test_framework",
356 ":video_coding",
brandtrb78bc752017-02-22 01:26:59 -0800357 ":video_coding_utility",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800358 ":webrtc_h264",
359 ":webrtc_vp8",
360 ":webrtc_vp9",
361 "../..:webrtc_common",
brandtr6bb8e0e2017-02-20 04:35:52 -0800362 "../../base:rtc_base_approved",
363 "../../media:rtc_media",
364 "../../test:test_support",
365 "../../test:video_test_support",
366 ]
367
368 if (is_android) {
369 sources += [
370 "codecs/test/android_test_initializer.cc",
371 "codecs/test/android_test_initializer.h",
372 ]
373
374 deps += [
375 "../../base:rtc_base_approved",
376 "../../sdk/android:libjingle_peerconnection_jni",
377 "//base",
378 ]
379 }
380
381 if (is_ios || is_mac) {
382 deps += [
383 "../../media:rtc_media_base",
kthelgason2f088792017-05-30 01:48:47 -0700384 "../../sdk:objc_videotoolbox",
brandtr6bb8e0e2017-02-20 04:35:52 -0800385 ]
386 }
387 }
388
389 rtc_source_set("video_coding_modules_tests") {
390 testonly = true
391
kjellandere0629c02017-04-25 04:04:50 -0700392 # Skip restricting visibility on mobile platforms since the tests on those
393 # gets additional generated targets which would require many lines here to
394 # cover (which would be confusing to read and hard to maintain).
395 if (!is_android && !is_ios) {
396 visibility = [ "//webrtc/modules:modules_tests" ]
397 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800398 sources = [
sakalb8102e02017-03-06 03:52:55 -0800399 "codecs/h264/test/h264_impl_unittest.cc",
brandtr6bb8e0e2017-02-20 04:35:52 -0800400 "codecs/test/videoprocessor_integrationtest.cc",
401 "codecs/vp8/test/vp8_impl_unittest.cc",
sakal7adadb12017-02-23 02:54:57 -0800402 "codecs/vp9/test/vp9_impl_unittest.cc",
brandtr6bb8e0e2017-02-20 04:35:52 -0800403 ]
404
405 deps = [
sakalb8102e02017-03-06 03:52:55 -0800406 ":video_codecs_test_framework",
brandtr6bb8e0e2017-02-20 04:35:52 -0800407 ":video_coding_videoprocessor_integration_test",
sakalb8102e02017-03-06 03:52:55 -0800408 ":webrtc_h264",
brandtr6bb8e0e2017-02-20 04:35:52 -0800409 ":webrtc_vp8",
sakal7adadb12017-02-23 02:54:57 -0800410 ":webrtc_vp9",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800411 "../../api:video_frame_api",
412 "../../base:rtc_base_approved",
413 "../../common_video:common_video",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800414 "../../test:test_support",
415 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800416 "../video_capture",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800417 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800418
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800419 if (rtc_use_h264) {
420 defines = [ "WEBRTC_VIDEOPROCESSOR_H264_TESTS" ]
421 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800422
423 if (!build_with_chromium && is_clang) {
424 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
425 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
426 }
427 }
428
429 plot_videoprocessor_integrationtest_resources = [
430 "//resources/foreman_128x96.yuv",
431 "//resources/foreman_160x120.yuv",
432 "//resources/foreman_176x144.yuv",
433 "//resources/foreman_320x240.yuv",
434 "//resources/foreman_cif.yuv",
435 ]
436
437 if (is_ios || is_mac) {
438 bundle_data("plot_videoprocessor_integrationtest_bundle_data") {
439 testonly = true
440 sources = plot_videoprocessor_integrationtest_resources
441 outputs = [
442 "{{bundle_resources_dir}}/{{source_file_part}}",
443 ]
444 }
445 }
446
447 # This executable is meant for local codec perf testing and should not be run
448 # on the trybots/buildbots, hence the existence of this special build target.
449 rtc_test("plot_videoprocessor_integrationtest") {
450 testonly = true
451
452 sources = [
453 "codecs/test/plot_videoprocessor_integrationtest.cc",
454 ]
455
456 deps = [
457 ":video_coding_videoprocessor_integration_test",
458 "../../test:test_main",
459 "../../test:video_test_common",
460 "../video_capture",
461 ]
462
463 data = plot_videoprocessor_integrationtest_resources
464
465 if (is_android) {
466 deps += [
467 "../../base:rtc_base_approved",
468
469 # TODO(brandtr): Figure out if the java dep below could be moved into
470 # :video_coding_videoprocessor_integration_test, where it belongs.
471 # When that is done, support for Android HW codecs can be added to the
472 # modules_tests target as well.
473 "../../sdk/android:libjingle_peerconnection_java",
474 "../../sdk/android:libjingle_peerconnection_jni",
475 "//base",
476 "//testing/android/native_test:native_test_support",
477 ]
478
479 shard_timeout = 900
480 }
481
482 if (is_ios || is_mac) {
483 deps += [ ":plot_videoprocessor_integrationtest_bundle_data" ]
484 }
485
486 # TODO(brandtr): Remove this define when the modules_tests target properly
487 # loads the Java classes mentioned above.
488 defines = [ "WEBRTC_VIDEOPROCESSOR_INTEGRATIONTEST_HW_CODECS_ENABLED" ]
489
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800490 if (!build_with_chromium && is_clang) {
491 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
492 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
493 }
494 }
495
ehmaldonado36268652017-01-19 08:27:11 -0800496 rtc_source_set("video_coding_unittests") {
497 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700498
499 # Skip restricting visibility on mobile platforms since the tests on those
500 # gets additional generated targets which would require many lines here to
501 # cover (which would be confusing to read and hard to maintain).
502 if (!is_android && !is_ios) {
503 visibility = [ "//webrtc/modules:modules_unittests" ]
504 }
ehmaldonado36268652017-01-19 08:27:11 -0800505 sources = [
506 "codecs/test/packet_manipulator_unittest.cc",
507 "codecs/test/stats_unittest.cc",
508 "codecs/test/videoprocessor_unittest.cc",
509 "codecs/vp8/default_temporal_layers_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800510 "codecs/vp8/screenshare_layers_unittest.cc",
511 "codecs/vp8/simulcast_encoder_adapter_unittest.cc",
512 "codecs/vp8/simulcast_unittest.cc",
513 "codecs/vp8/simulcast_unittest.h",
514 "decoding_state_unittest.cc",
515 "frame_buffer2_unittest.cc",
ilnik04f4d122017-06-19 07:18:55 -0700516 "generic_encoder_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800517 "h264_sprop_parameter_sets_unittest.cc",
518 "h264_sps_pps_tracker_unittest.cc",
519 "histogram_unittest.cc",
520 "include/mock/mock_vcm_callbacks.h",
521 "jitter_buffer_unittest.cc",
522 "jitter_estimator_tests.cc",
523 "nack_module_unittest.cc",
524 "protection_bitrate_calculator_unittest.cc",
525 "receiver_unittest.cc",
526 "rtp_frame_reference_finder_unittest.cc",
527 "sequence_number_util_unittest.cc",
528 "session_info_unittest.cc",
529 "test/stream_generator.cc",
530 "test/stream_generator.h",
531 "timing_unittest.cc",
532 "utility/default_video_bitrate_allocator_unittest.cc",
533 "utility/frame_dropper_unittest.cc",
534 "utility/ivf_file_writer_unittest.cc",
535 "utility/moving_average_unittest.cc",
536 "utility/quality_scaler_unittest.cc",
537 "utility/simulcast_rate_allocator_unittest.cc",
sprang429600d2017-01-26 06:12:26 -0800538 "video_codec_initializer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800539 "video_packet_buffer_unittest.cc",
540 "video_receiver_unittest.cc",
541 "video_sender_unittest.cc",
542 ]
543 if (rtc_libvpx_build_vp9) {
544 sources += [ "codecs/vp9/vp9_screenshare_layers_unittest.cc" ]
545 }
546 if (rtc_use_h264) {
547 sources += [ "codecs/h264/h264_encoder_impl_unittest.cc" ]
548 }
549 deps = [
550 ":video_codecs_test_framework",
551 ":video_coding",
552 ":video_coding_utility",
553 ":webrtc_h264",
554 ":webrtc_vp8",
555 ":webrtc_vp9",
mbonadei1140f972017-04-26 03:38:35 -0700556 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -0800557 "../..:webrtc_common",
558 "../../api:video_frame_api",
ilnikd60d06a2017-04-05 03:02:20 -0700559 "../../api/video_codecs:video_codecs_api",
ehmaldonado36268652017-01-19 08:27:11 -0800560 "../../base:rtc_base",
561 "../../base:rtc_base_approved",
562 "../../base:rtc_task_queue",
563 "../../common_video:common_video",
564 "../../system_wrappers:metrics_default",
565 "../../system_wrappers:system_wrappers",
566 "../../test:field_trial",
567 "../../test:test_support",
568 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800569 "../../test:video_test_support",
ehmaldonado36268652017-01-19 08:27:11 -0800570 "../rtp_rtcp:rtp_rtcp",
571 "//testing/gmock",
572 ]
573 if (rtc_build_libvpx) {
574 deps += [ rtc_libvpx_dir ]
575 }
576 if (is_win) {
577 cflags = [
578 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
579 "/wd4373", # virtual function override.
580 ]
581 }
582
583 # TODO(jschuh): bugs.webrtc.org/1348: fix this warning.
584 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
585 if (!build_with_chromium && is_clang) {
586 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
587 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
588 }
589 }
kjellanderfb114242016-06-13 00:19:48 -0700590}