blob: 477e06444ee54ab00399fe5591ef375913902405 [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",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000104 "../../common_video",
105 "../../system_wrappers",
ehmaldonado36df2d72016-12-08 09:56:16 -0800106 "../rtp_rtcp:rtp_rtcp",
107 "../utility:utility",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000108 ]
109}
110
kjellanderb62dbbe2016-09-23 00:38:52 -0700111rtc_static_library("video_coding_utility") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000112 sources = [
Erik Språng08127a92016-11-16 16:41:30 +0100113 "utility/default_video_bitrate_allocator.cc",
114 "utility/default_video_bitrate_allocator.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000115 "utility/frame_dropper.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100116 "utility/frame_dropper.h",
sprang3911c262016-04-15 01:24:14 -0700117 "utility/ivf_file_writer.cc",
118 "utility/ivf_file_writer.h",
kthelgason194f40a2016-09-14 02:14:58 -0700119 "utility/moving_average.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100120 "utility/moving_average.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000121 "utility/quality_scaler.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100122 "utility/quality_scaler.h",
jackychen98d8cf52015-05-21 11:12:02 -0700123 "utility/vp8_header_parser.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100124 "utility/vp8_header_parser.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000125 ]
126
kjellandere40a7ee2016-10-16 23:56:12 -0700127 if (!build_with_chromium && is_clang) {
128 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700129 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000130 }
131
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200132 deps = [
mbonadei1140f972017-04-26 03:38:35 -0700133 "..:module_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800134 "../..:webrtc_common",
ilnikd60d06a2017-04-05 03:02:20 -0700135 "../../api/video_codecs:video_codecs_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800136 "../../base:rtc_base_approved",
tereliusbc5d9212017-01-13 09:14:33 -0800137 "../../base:rtc_numerics",
kjellandera8d8aad2017-03-08 05:42:26 -0800138 "../../base:rtc_task_queue",
perkj4e417b22016-07-14 23:35:55 -0700139 "../../common_video",
kjellandera8d8aad2017-03-08 05:42:26 -0800140 "../../modules/rtp_rtcp:rtp_rtcp",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200141 "../../system_wrappers",
142 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000143}
144
kjellanderb62dbbe2016-09-23 00:38:52 -0700145rtc_static_library("webrtc_h264") {
Zeke Chin71f6f442015-06-29 14:34:58 -0700146 sources = [
147 "codecs/h264/h264.cc",
148 "codecs/h264/include/h264.h",
149 ]
150
kjellandere40a7ee2016-10-16 23:56:12 -0700151 if (!build_with_chromium && is_clang) {
152 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700153 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Zeke Chin71f6f442015-06-29 14:34:58 -0700154 }
155
hbosbab934b2016-01-27 01:36:03 -0800156 defines = []
Zeke Chin71f6f442015-06-29 14:34:58 -0700157 deps = [
ehmaldonado36df2d72016-12-08 09:56:16 -0800158 ":video_coding_utility",
159 "../../base:rtc_base_approved",
magjed21d110f2017-02-28 00:28:04 -0800160 "../../media:rtc_media_base",
Zeke Chin71f6f442015-06-29 14:34:58 -0700161 "../../system_wrappers",
162 ]
hbosa9a1d2a2016-01-11 10:19:02 -0800163
hbos902c03e2016-01-21 03:34:40 -0800164 if (rtc_use_h264) {
hbos9dc59282016-02-03 05:09:37 -0800165 defines += [ "WEBRTC_USE_H264" ]
hbosc5a39c22016-02-02 02:26:05 -0800166 if (rtc_initialize_ffmpeg) {
167 defines += [ "WEBRTC_INITIALIZE_FFMPEG" ]
168 }
hbosbab934b2016-01-27 01:36:03 -0800169 sources += [
170 "codecs/h264/h264_decoder_impl.cc",
171 "codecs/h264/h264_decoder_impl.h",
172 "codecs/h264/h264_encoder_impl.cc",
173 "codecs/h264/h264_encoder_impl.h",
174 ]
hbosa9a1d2a2016-01-11 10:19:02 -0800175 deps += [
kjellanderf6b55092016-02-07 23:04:26 -0800176 "../../common_video",
hta9aa96882016-12-06 05:36:03 -0800177 "../../media:rtc_media_base",
hbosa9a1d2a2016-01-11 10:19:02 -0800178 "//third_party/ffmpeg:ffmpeg",
179 "//third_party/openh264:encoder",
180 ]
181 }
Zeke Chin71f6f442015-06-29 14:34:58 -0700182}
183
kjellanderb62dbbe2016-09-23 00:38:52 -0700184rtc_static_library("webrtc_i420") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000185 sources = [
Henrik Kjellandera74c08d2015-10-22 12:23:11 +0200186 "codecs/i420/i420.cc",
187 "codecs/i420/include/i420.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000188 ]
189
kjellandere40a7ee2016-10-16 23:56:12 -0700190 if (!build_with_chromium && is_clang) {
191 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700192 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000193 }
194
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200195 deps = [
ehmaldonado36df2d72016-12-08 09:56:16 -0800196 "../..:webrtc_common",
197 "../../base:rtc_base_approved",
198 "../../common_video:common_video",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200199 "../../system_wrappers",
200 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000201}
202
kjellanderb62dbbe2016-09-23 00:38:52 -0700203rtc_static_library("webrtc_vp8") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000204 sources = [
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000205 "codecs/vp8/default_temporal_layers.cc",
206 "codecs/vp8/default_temporal_layers.h",
pbos@webrtc.org9115cde2014-12-09 10:36:40 +0000207 "codecs/vp8/include/vp8.h",
208 "codecs/vp8/include/vp8_common_types.h",
pbos@webrtc.org9115cde2014-12-09 10:36:40 +0000209 "codecs/vp8/screenshare_layers.cc",
210 "codecs/vp8/screenshare_layers.h",
211 "codecs/vp8/simulcast_encoder_adapter.cc",
212 "codecs/vp8/simulcast_encoder_adapter.h",
kjellandera8d8aad2017-03-08 05:42:26 -0800213 "codecs/vp8/simulcast_rate_allocator.cc",
214 "codecs/vp8/simulcast_rate_allocator.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000215 "codecs/vp8/temporal_layers.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000216 "codecs/vp8/vp8_impl.cc",
217 "codecs/vp8/vp8_impl.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000218 ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000219
kjellander8f4419b2016-06-02 02:09:52 -0700220 # TODO(jschuh): Bug 1348: fix this warning.
221 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
222
kjellandere40a7ee2016-10-16 23:56:12 -0700223 if (!build_with_chromium && is_clang) {
224 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700225 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000226 }
227
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000228 deps = [
229 ":video_coding_utility",
mbonadei1140f972017-04-26 03:38:35 -0700230 "..:module_api",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000231 "../..:webrtc_common",
ilnikd60d06a2017-04-05 03:02:20 -0700232 "../../api/video_codecs:video_codecs_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800233 "../../base:rtc_base_approved",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000234 "../../common_video",
235 "../../system_wrappers",
236 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000237 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200238 deps += [ rtc_libvpx_dir ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000239 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000240}
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000241
kjellanderb62dbbe2016-09-23 00:38:52 -0700242rtc_static_library("webrtc_vp9") {
phoglund33603522016-10-05 06:52:22 -0700243 if (rtc_libvpx_build_vp9) {
244 sources = [
245 "codecs/vp9/include/vp9.h",
246 "codecs/vp9/screenshare_layers.cc",
247 "codecs/vp9/screenshare_layers.h",
248 "codecs/vp9/vp9_frame_buffer_pool.cc",
249 "codecs/vp9/vp9_frame_buffer_pool.h",
250 "codecs/vp9/vp9_impl.cc",
251 "codecs/vp9/vp9_impl.h",
252 ]
253 } else {
254 sources = [
255 "codecs/vp9/vp9_noop.cc",
256 ]
257 }
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000258
kjellandere40a7ee2016-10-16 23:56:12 -0700259 if (!build_with_chromium && is_clang) {
260 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700261 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000262 }
263
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000264 deps = [
265 ":video_coding_utility",
mbonadei1140f972017-04-26 03:38:35 -0700266 "..:module_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800267 "../../base:rtc_base_approved",
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000268 "../../common_video",
269 "../../system_wrappers",
270 ]
271 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200272 deps += [ rtc_libvpx_dir ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000273 }
274}
kjellanderfb114242016-06-13 00:19:48 -0700275
276if (rtc_include_tests) {
brandtr52cdd3b2017-01-26 02:25:21 -0800277 rtc_executable("video_quality_measurement") {
278 testonly = true
279
280 sources = [
281 "codecs/tools/video_quality_measurement.cc",
282 ]
283
284 if (!build_with_chromium && is_clang) {
285 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
286 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
287 }
288
289 deps = [
290 ":video_codecs_test_framework",
291 ":video_coding",
292 ":webrtc_vp8",
293 "../..:webrtc_common",
294 "../../base:rtc_base_approved",
295 "../../system_wrappers:field_trial_default",
296 "../../system_wrappers:metrics_default",
297 "../../system_wrappers:system_wrappers",
298 "../../test:test_support",
ehmaldonado656610f2017-02-06 02:21:11 -0800299 "../../test:video_test_common",
300 "../../test:video_test_support",
301 "../video_capture",
brandtr52cdd3b2017-01-26 02:25:21 -0800302 "//third_party/gflags",
303 ]
304 } # video_quality_measurement
305
ehmaldonado38a21322016-09-02 04:10:34 -0700306 rtc_source_set("video_codecs_test_framework") {
kjellanderfb114242016-06-13 00:19:48 -0700307 testonly = true
308 sources = [
309 "codecs/test/mock/mock_packet_manipulator.h",
310 "codecs/test/packet_manipulator.cc",
311 "codecs/test/packet_manipulator.h",
312 "codecs/test/predictive_packet_manipulator.cc",
313 "codecs/test/predictive_packet_manipulator.h",
314 "codecs/test/stats.cc",
315 "codecs/test/stats.h",
sakalb8102e02017-03-06 03:52:55 -0800316 "codecs/test/video_codec_test.cc",
317 "codecs/test/video_codec_test.h",
kjellanderfb114242016-06-13 00:19:48 -0700318 "codecs/test/videoprocessor.cc",
319 "codecs/test/videoprocessor.h",
320 ]
321
kjellandere40a7ee2016-10-16 23:56:12 -0700322 if (!build_with_chromium && is_clang) {
323 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700324 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -0700325 }
326
327 deps = [
ehmaldonado36df2d72016-12-08 09:56:16 -0800328 ":video_coding",
329 ":video_coding_utility",
kjellandera8d8aad2017-03-08 05:42:26 -0800330 ":webrtc_vp8",
ehmaldonado36df2d72016-12-08 09:56:16 -0800331 "../..:webrtc_common",
ilnikd60d06a2017-04-05 03:02:20 -0700332 "../../api/video_codecs:video_codecs_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800333 "../../base:rtc_base_approved",
334 "../../common_video:common_video",
335 "../../system_wrappers:system_wrappers",
kjellanderfb114242016-06-13 00:19:48 -0700336 "../../test:test_support",
sakalb8102e02017-03-06 03:52:55 -0800337 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800338 "../../test:video_test_support",
kjellanderfb114242016-06-13 00:19:48 -0700339 ]
340 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800341
brandtr6bb8e0e2017-02-20 04:35:52 -0800342 rtc_source_set("video_coding_videoprocessor_integration_test") {
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800343 testonly = true
brandtr6bb8e0e2017-02-20 04:35:52 -0800344
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800345 sources = [
asapersson38e93242017-02-10 01:37:17 -0800346 "codecs/test/videoprocessor_integrationtest.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800347 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800348
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800349 deps = [
350 ":video_codecs_test_framework",
351 ":video_coding",
brandtrb78bc752017-02-22 01:26:59 -0800352 ":video_coding_utility",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800353 ":webrtc_h264",
354 ":webrtc_vp8",
355 ":webrtc_vp9",
356 "../..:webrtc_common",
brandtr6bb8e0e2017-02-20 04:35:52 -0800357 "../../base:rtc_base_approved",
358 "../../media:rtc_media",
359 "../../test:test_support",
360 "../../test:video_test_support",
361 ]
362
363 if (is_android) {
364 sources += [
365 "codecs/test/android_test_initializer.cc",
366 "codecs/test/android_test_initializer.h",
367 ]
368
369 deps += [
370 "../../base:rtc_base_approved",
371 "../../sdk/android:libjingle_peerconnection_jni",
372 "//base",
373 ]
374 }
375
376 if (is_ios || is_mac) {
377 deps += [
378 "../../media:rtc_media_base",
379 "../../sdk:webrtc_h264_video_toolbox",
380 ]
381 }
382 }
383
384 rtc_source_set("video_coding_modules_tests") {
385 testonly = true
386
kjellandere0629c02017-04-25 04:04:50 -0700387 # Skip restricting visibility on mobile platforms since the tests on those
388 # gets additional generated targets which would require many lines here to
389 # cover (which would be confusing to read and hard to maintain).
390 if (!is_android && !is_ios) {
391 visibility = [ "//webrtc/modules:modules_tests" ]
392 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800393 sources = [
sakalb8102e02017-03-06 03:52:55 -0800394 "codecs/h264/test/h264_impl_unittest.cc",
brandtr6bb8e0e2017-02-20 04:35:52 -0800395 "codecs/test/videoprocessor_integrationtest.cc",
396 "codecs/vp8/test/vp8_impl_unittest.cc",
sakal7adadb12017-02-23 02:54:57 -0800397 "codecs/vp9/test/vp9_impl_unittest.cc",
brandtr6bb8e0e2017-02-20 04:35:52 -0800398 ]
399
400 deps = [
sakalb8102e02017-03-06 03:52:55 -0800401 ":video_codecs_test_framework",
brandtr6bb8e0e2017-02-20 04:35:52 -0800402 ":video_coding_videoprocessor_integration_test",
sakalb8102e02017-03-06 03:52:55 -0800403 ":webrtc_h264",
brandtr6bb8e0e2017-02-20 04:35:52 -0800404 ":webrtc_vp8",
sakal7adadb12017-02-23 02:54:57 -0800405 ":webrtc_vp9",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800406 "../../api:video_frame_api",
407 "../../base:rtc_base_approved",
408 "../../common_video:common_video",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800409 "../../test:test_support",
410 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800411 "../video_capture",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800412 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800413
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800414 if (rtc_use_h264) {
415 defines = [ "WEBRTC_VIDEOPROCESSOR_H264_TESTS" ]
416 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800417
418 if (!build_with_chromium && is_clang) {
419 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
420 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
421 }
422 }
423
424 plot_videoprocessor_integrationtest_resources = [
425 "//resources/foreman_128x96.yuv",
426 "//resources/foreman_160x120.yuv",
427 "//resources/foreman_176x144.yuv",
428 "//resources/foreman_320x240.yuv",
429 "//resources/foreman_cif.yuv",
430 ]
431
432 if (is_ios || is_mac) {
433 bundle_data("plot_videoprocessor_integrationtest_bundle_data") {
434 testonly = true
435 sources = plot_videoprocessor_integrationtest_resources
436 outputs = [
437 "{{bundle_resources_dir}}/{{source_file_part}}",
438 ]
439 }
440 }
441
442 # This executable is meant for local codec perf testing and should not be run
443 # on the trybots/buildbots, hence the existence of this special build target.
444 rtc_test("plot_videoprocessor_integrationtest") {
445 testonly = true
446
447 sources = [
448 "codecs/test/plot_videoprocessor_integrationtest.cc",
449 ]
450
451 deps = [
452 ":video_coding_videoprocessor_integration_test",
453 "../../test:test_main",
454 "../../test:video_test_common",
455 "../video_capture",
456 ]
457
458 data = plot_videoprocessor_integrationtest_resources
459
460 if (is_android) {
461 deps += [
462 "../../base:rtc_base_approved",
463
464 # TODO(brandtr): Figure out if the java dep below could be moved into
465 # :video_coding_videoprocessor_integration_test, where it belongs.
466 # When that is done, support for Android HW codecs can be added to the
467 # modules_tests target as well.
468 "../../sdk/android:libjingle_peerconnection_java",
469 "../../sdk/android:libjingle_peerconnection_jni",
470 "//base",
471 "//testing/android/native_test:native_test_support",
472 ]
473
474 shard_timeout = 900
475 }
476
477 if (is_ios || is_mac) {
478 deps += [ ":plot_videoprocessor_integrationtest_bundle_data" ]
479 }
480
481 # TODO(brandtr): Remove this define when the modules_tests target properly
482 # loads the Java classes mentioned above.
483 defines = [ "WEBRTC_VIDEOPROCESSOR_INTEGRATIONTEST_HW_CODECS_ENABLED" ]
484
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800485 if (!build_with_chromium && is_clang) {
486 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
487 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
488 }
489 }
490
ehmaldonado36268652017-01-19 08:27:11 -0800491 rtc_source_set("video_coding_unittests") {
492 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700493
494 # Skip restricting visibility on mobile platforms since the tests on those
495 # gets additional generated targets which would require many lines here to
496 # cover (which would be confusing to read and hard to maintain).
497 if (!is_android && !is_ios) {
498 visibility = [ "//webrtc/modules:modules_unittests" ]
499 }
ehmaldonado36268652017-01-19 08:27:11 -0800500 sources = [
501 "codecs/test/packet_manipulator_unittest.cc",
502 "codecs/test/stats_unittest.cc",
503 "codecs/test/videoprocessor_unittest.cc",
504 "codecs/vp8/default_temporal_layers_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800505 "codecs/vp8/screenshare_layers_unittest.cc",
506 "codecs/vp8/simulcast_encoder_adapter_unittest.cc",
507 "codecs/vp8/simulcast_unittest.cc",
508 "codecs/vp8/simulcast_unittest.h",
509 "decoding_state_unittest.cc",
510 "frame_buffer2_unittest.cc",
511 "h264_sprop_parameter_sets_unittest.cc",
512 "h264_sps_pps_tracker_unittest.cc",
513 "histogram_unittest.cc",
514 "include/mock/mock_vcm_callbacks.h",
515 "jitter_buffer_unittest.cc",
516 "jitter_estimator_tests.cc",
517 "nack_module_unittest.cc",
518 "protection_bitrate_calculator_unittest.cc",
519 "receiver_unittest.cc",
520 "rtp_frame_reference_finder_unittest.cc",
521 "sequence_number_util_unittest.cc",
522 "session_info_unittest.cc",
523 "test/stream_generator.cc",
524 "test/stream_generator.h",
525 "timing_unittest.cc",
526 "utility/default_video_bitrate_allocator_unittest.cc",
527 "utility/frame_dropper_unittest.cc",
528 "utility/ivf_file_writer_unittest.cc",
529 "utility/moving_average_unittest.cc",
530 "utility/quality_scaler_unittest.cc",
531 "utility/simulcast_rate_allocator_unittest.cc",
sprang429600d2017-01-26 06:12:26 -0800532 "video_codec_initializer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800533 "video_packet_buffer_unittest.cc",
534 "video_receiver_unittest.cc",
535 "video_sender_unittest.cc",
536 ]
537 if (rtc_libvpx_build_vp9) {
538 sources += [ "codecs/vp9/vp9_screenshare_layers_unittest.cc" ]
539 }
540 if (rtc_use_h264) {
541 sources += [ "codecs/h264/h264_encoder_impl_unittest.cc" ]
542 }
543 deps = [
544 ":video_codecs_test_framework",
545 ":video_coding",
546 ":video_coding_utility",
547 ":webrtc_h264",
548 ":webrtc_vp8",
549 ":webrtc_vp9",
mbonadei1140f972017-04-26 03:38:35 -0700550 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -0800551 "../..:webrtc_common",
552 "../../api:video_frame_api",
ilnikd60d06a2017-04-05 03:02:20 -0700553 "../../api/video_codecs:video_codecs_api",
ehmaldonado36268652017-01-19 08:27:11 -0800554 "../../base:rtc_base",
555 "../../base:rtc_base_approved",
556 "../../base:rtc_task_queue",
557 "../../common_video:common_video",
558 "../../system_wrappers:metrics_default",
559 "../../system_wrappers:system_wrappers",
560 "../../test:field_trial",
561 "../../test:test_support",
562 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800563 "../../test:video_test_support",
ehmaldonado36268652017-01-19 08:27:11 -0800564 "../rtp_rtcp:rtp_rtcp",
565 "//testing/gmock",
566 ]
567 if (rtc_build_libvpx) {
568 deps += [ rtc_libvpx_dir ]
569 }
570 if (is_win) {
571 cflags = [
572 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
573 "/wd4373", # virtual function override.
574 ]
575 }
576
577 # TODO(jschuh): bugs.webrtc.org/1348: fix this warning.
578 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
579 if (!build_with_chromium && is_clang) {
580 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
581 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
582 }
583 }
kjellanderfb114242016-06-13 00:19:48 -0700584}