blob: 1ef5c5d2a6b207787018b8db349d41ca2a5a9588 [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",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000097 "../..:webrtc_common",
ehmaldonado36df2d72016-12-08 09:56:16 -080098 "../../base:rtc_base",
99 "../../base:rtc_base_approved",
tereliusbc5d9212017-01-13 09:14:33 -0800100 "../../base:rtc_numerics",
ehmaldonado36df2d72016-12-08 09:56:16 -0800101 "../../base:rtc_task_queue",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000102 "../../common_video",
103 "../../system_wrappers",
ehmaldonado36df2d72016-12-08 09:56:16 -0800104 "../rtp_rtcp:rtp_rtcp",
105 "../utility:utility",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000106 ]
107}
108
kjellanderb62dbbe2016-09-23 00:38:52 -0700109rtc_static_library("video_coding_utility") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000110 sources = [
Erik Språng08127a92016-11-16 16:41:30 +0100111 "utility/default_video_bitrate_allocator.cc",
112 "utility/default_video_bitrate_allocator.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000113 "utility/frame_dropper.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100114 "utility/frame_dropper.h",
sprang3911c262016-04-15 01:24:14 -0700115 "utility/ivf_file_writer.cc",
116 "utility/ivf_file_writer.h",
kthelgason194f40a2016-09-14 02:14:58 -0700117 "utility/moving_average.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100118 "utility/moving_average.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000119 "utility/quality_scaler.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100120 "utility/quality_scaler.h",
jackychen98d8cf52015-05-21 11:12:02 -0700121 "utility/vp8_header_parser.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100122 "utility/vp8_header_parser.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000123 ]
124
kjellandere40a7ee2016-10-16 23:56:12 -0700125 if (!build_with_chromium && is_clang) {
126 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700127 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000128 }
129
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200130 deps = [
ehmaldonado36df2d72016-12-08 09:56:16 -0800131 "../..:webrtc_common",
ehmaldonado36df2d72016-12-08 09:56:16 -0800132 "../../base:rtc_base_approved",
tereliusbc5d9212017-01-13 09:14:33 -0800133 "../../base:rtc_numerics",
kjellandera8d8aad2017-03-08 05:42:26 -0800134 "../../base:rtc_task_queue",
perkj4e417b22016-07-14 23:35:55 -0700135 "../../common_video",
kjellandera8d8aad2017-03-08 05:42:26 -0800136 "../../modules/rtp_rtcp:rtp_rtcp",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200137 "../../system_wrappers",
138 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000139}
140
kjellanderb62dbbe2016-09-23 00:38:52 -0700141rtc_static_library("webrtc_h264") {
Zeke Chin71f6f442015-06-29 14:34:58 -0700142 sources = [
143 "codecs/h264/h264.cc",
144 "codecs/h264/include/h264.h",
145 ]
146
kjellandere40a7ee2016-10-16 23:56:12 -0700147 if (!build_with_chromium && is_clang) {
148 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700149 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Zeke Chin71f6f442015-06-29 14:34:58 -0700150 }
151
hbosbab934b2016-01-27 01:36:03 -0800152 defines = []
Zeke Chin71f6f442015-06-29 14:34:58 -0700153 deps = [
ehmaldonado36df2d72016-12-08 09:56:16 -0800154 ":video_coding_utility",
155 "../../base:rtc_base_approved",
magjed21d110f2017-02-28 00:28:04 -0800156 "../../media:rtc_media_base",
Zeke Chin71f6f442015-06-29 14:34:58 -0700157 "../../system_wrappers",
158 ]
hbosa9a1d2a2016-01-11 10:19:02 -0800159
hbos902c03e2016-01-21 03:34:40 -0800160 if (rtc_use_h264) {
hbos9dc59282016-02-03 05:09:37 -0800161 defines += [ "WEBRTC_USE_H264" ]
hbosc5a39c22016-02-02 02:26:05 -0800162 if (rtc_initialize_ffmpeg) {
163 defines += [ "WEBRTC_INITIALIZE_FFMPEG" ]
164 }
hbosbab934b2016-01-27 01:36:03 -0800165 sources += [
166 "codecs/h264/h264_decoder_impl.cc",
167 "codecs/h264/h264_decoder_impl.h",
168 "codecs/h264/h264_encoder_impl.cc",
169 "codecs/h264/h264_encoder_impl.h",
170 ]
hbosa9a1d2a2016-01-11 10:19:02 -0800171 deps += [
kjellanderf6b55092016-02-07 23:04:26 -0800172 "../../common_video",
hta9aa96882016-12-06 05:36:03 -0800173 "../../media:rtc_media_base",
hbosa9a1d2a2016-01-11 10:19:02 -0800174 "//third_party/ffmpeg:ffmpeg",
175 "//third_party/openh264:encoder",
176 ]
177 }
Zeke Chin71f6f442015-06-29 14:34:58 -0700178}
179
kjellanderb62dbbe2016-09-23 00:38:52 -0700180rtc_static_library("webrtc_i420") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000181 sources = [
Henrik Kjellandera74c08d2015-10-22 12:23:11 +0200182 "codecs/i420/i420.cc",
183 "codecs/i420/include/i420.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000184 ]
185
kjellandere40a7ee2016-10-16 23:56:12 -0700186 if (!build_with_chromium && is_clang) {
187 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700188 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000189 }
190
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200191 deps = [
ehmaldonado36df2d72016-12-08 09:56:16 -0800192 "../..:webrtc_common",
193 "../../base:rtc_base_approved",
194 "../../common_video:common_video",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200195 "../../system_wrappers",
196 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000197}
198
kjellanderb62dbbe2016-09-23 00:38:52 -0700199rtc_static_library("webrtc_vp8") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000200 sources = [
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000201 "codecs/vp8/default_temporal_layers.cc",
202 "codecs/vp8/default_temporal_layers.h",
pbos@webrtc.org9115cde2014-12-09 10:36:40 +0000203 "codecs/vp8/include/vp8.h",
204 "codecs/vp8/include/vp8_common_types.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000205 "codecs/vp8/realtime_temporal_layers.cc",
206 "codecs/vp8/reference_picture_selection.cc",
207 "codecs/vp8/reference_picture_selection.h",
pbos@webrtc.org9115cde2014-12-09 10:36:40 +0000208 "codecs/vp8/screenshare_layers.cc",
209 "codecs/vp8/screenshare_layers.h",
210 "codecs/vp8/simulcast_encoder_adapter.cc",
211 "codecs/vp8/simulcast_encoder_adapter.h",
kjellandera8d8aad2017-03-08 05:42:26 -0800212 "codecs/vp8/simulcast_rate_allocator.cc",
213 "codecs/vp8/simulcast_rate_allocator.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000214 "codecs/vp8/temporal_layers.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000215 "codecs/vp8/vp8_impl.cc",
216 "codecs/vp8/vp8_impl.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000217 ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000218
kjellander8f4419b2016-06-02 02:09:52 -0700219 # TODO(jschuh): Bug 1348: fix this warning.
220 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
221
kjellandere40a7ee2016-10-16 23:56:12 -0700222 if (!build_with_chromium && is_clang) {
223 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700224 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000225 }
226
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000227 deps = [
228 ":video_coding_utility",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000229 "../..:webrtc_common",
ehmaldonado36df2d72016-12-08 09:56:16 -0800230 "../../base:rtc_base_approved",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000231 "../../common_video",
232 "../../system_wrappers",
233 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000234 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200235 deps += [ rtc_libvpx_dir ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000236 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000237}
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000238
kjellanderb62dbbe2016-09-23 00:38:52 -0700239rtc_static_library("webrtc_vp9") {
phoglund33603522016-10-05 06:52:22 -0700240 if (rtc_libvpx_build_vp9) {
241 sources = [
242 "codecs/vp9/include/vp9.h",
243 "codecs/vp9/screenshare_layers.cc",
244 "codecs/vp9/screenshare_layers.h",
245 "codecs/vp9/vp9_frame_buffer_pool.cc",
246 "codecs/vp9/vp9_frame_buffer_pool.h",
247 "codecs/vp9/vp9_impl.cc",
248 "codecs/vp9/vp9_impl.h",
249 ]
250 } else {
251 sources = [
252 "codecs/vp9/vp9_noop.cc",
253 ]
254 }
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000255
kjellandere40a7ee2016-10-16 23:56:12 -0700256 if (!build_with_chromium && is_clang) {
257 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700258 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000259 }
260
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000261 deps = [
262 ":video_coding_utility",
ehmaldonado36df2d72016-12-08 09:56:16 -0800263 "../../base:rtc_base_approved",
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000264 "../../common_video",
265 "../../system_wrappers",
266 ]
267 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200268 deps += [ rtc_libvpx_dir ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000269 }
270}
kjellanderfb114242016-06-13 00:19:48 -0700271
272if (rtc_include_tests) {
brandtr52cdd3b2017-01-26 02:25:21 -0800273 rtc_executable("video_quality_measurement") {
274 testonly = true
275
276 sources = [
277 "codecs/tools/video_quality_measurement.cc",
278 ]
279
280 if (!build_with_chromium && is_clang) {
281 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
282 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
283 }
284
285 deps = [
286 ":video_codecs_test_framework",
287 ":video_coding",
288 ":webrtc_vp8",
289 "../..:webrtc_common",
290 "../../base:rtc_base_approved",
291 "../../system_wrappers:field_trial_default",
292 "../../system_wrappers:metrics_default",
293 "../../system_wrappers:system_wrappers",
294 "../../test:test_support",
ehmaldonado656610f2017-02-06 02:21:11 -0800295 "../../test:video_test_common",
296 "../../test:video_test_support",
297 "../video_capture",
brandtr52cdd3b2017-01-26 02:25:21 -0800298 "//third_party/gflags",
299 ]
300 } # video_quality_measurement
301
ehmaldonado38a21322016-09-02 04:10:34 -0700302 rtc_source_set("video_codecs_test_framework") {
kjellanderfb114242016-06-13 00:19:48 -0700303 testonly = true
304 sources = [
305 "codecs/test/mock/mock_packet_manipulator.h",
306 "codecs/test/packet_manipulator.cc",
307 "codecs/test/packet_manipulator.h",
308 "codecs/test/predictive_packet_manipulator.cc",
309 "codecs/test/predictive_packet_manipulator.h",
310 "codecs/test/stats.cc",
311 "codecs/test/stats.h",
sakalb8102e02017-03-06 03:52:55 -0800312 "codecs/test/video_codec_test.cc",
313 "codecs/test/video_codec_test.h",
kjellanderfb114242016-06-13 00:19:48 -0700314 "codecs/test/videoprocessor.cc",
315 "codecs/test/videoprocessor.h",
316 ]
317
kjellandere40a7ee2016-10-16 23:56:12 -0700318 if (!build_with_chromium && is_clang) {
319 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700320 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -0700321 }
322
323 deps = [
ehmaldonado36df2d72016-12-08 09:56:16 -0800324 ":video_coding",
325 ":video_coding_utility",
kjellandera8d8aad2017-03-08 05:42:26 -0800326 ":webrtc_vp8",
ehmaldonado36df2d72016-12-08 09:56:16 -0800327 "../..:webrtc_common",
328 "../../base:rtc_base_approved",
329 "../../common_video:common_video",
330 "../../system_wrappers:system_wrappers",
kjellanderfb114242016-06-13 00:19:48 -0700331 "../../test:test_support",
sakalb8102e02017-03-06 03:52:55 -0800332 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800333 "../../test:video_test_support",
kjellanderfb114242016-06-13 00:19:48 -0700334 ]
335 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800336
brandtr6bb8e0e2017-02-20 04:35:52 -0800337 rtc_source_set("video_coding_videoprocessor_integration_test") {
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800338 testonly = true
brandtr6bb8e0e2017-02-20 04:35:52 -0800339
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800340 sources = [
asapersson38e93242017-02-10 01:37:17 -0800341 "codecs/test/videoprocessor_integrationtest.h",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800342 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800343
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800344 deps = [
345 ":video_codecs_test_framework",
346 ":video_coding",
brandtrb78bc752017-02-22 01:26:59 -0800347 ":video_coding_utility",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800348 ":webrtc_h264",
349 ":webrtc_vp8",
350 ":webrtc_vp9",
351 "../..:webrtc_common",
brandtr6bb8e0e2017-02-20 04:35:52 -0800352 "../../base:rtc_base_approved",
353 "../../media:rtc_media",
354 "../../test:test_support",
355 "../../test:video_test_support",
356 ]
357
358 if (is_android) {
359 sources += [
360 "codecs/test/android_test_initializer.cc",
361 "codecs/test/android_test_initializer.h",
362 ]
363
364 deps += [
365 "../../base:rtc_base_approved",
366 "../../sdk/android:libjingle_peerconnection_jni",
367 "//base",
368 ]
369 }
370
371 if (is_ios || is_mac) {
372 deps += [
373 "../../media:rtc_media_base",
374 "../../sdk:webrtc_h264_video_toolbox",
375 ]
376 }
377 }
378
379 rtc_source_set("video_coding_modules_tests") {
380 testonly = true
381
382 sources = [
sakalb8102e02017-03-06 03:52:55 -0800383 "codecs/h264/test/h264_impl_unittest.cc",
brandtr6bb8e0e2017-02-20 04:35:52 -0800384 "codecs/test/videoprocessor_integrationtest.cc",
385 "codecs/vp8/test/vp8_impl_unittest.cc",
sakal7adadb12017-02-23 02:54:57 -0800386 "codecs/vp9/test/vp9_impl_unittest.cc",
brandtr6bb8e0e2017-02-20 04:35:52 -0800387 ]
388
389 deps = [
sakalb8102e02017-03-06 03:52:55 -0800390 ":video_codecs_test_framework",
brandtr6bb8e0e2017-02-20 04:35:52 -0800391 ":video_coding_videoprocessor_integration_test",
sakalb8102e02017-03-06 03:52:55 -0800392 ":webrtc_h264",
brandtr6bb8e0e2017-02-20 04:35:52 -0800393 ":webrtc_vp8",
sakal7adadb12017-02-23 02:54:57 -0800394 ":webrtc_vp9",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800395 "../../api:video_frame_api",
396 "../../base:rtc_base_approved",
397 "../../common_video:common_video",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800398 "../../test:test_support",
399 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800400 "../video_capture",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800401 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800402
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800403 if (rtc_use_h264) {
404 defines = [ "WEBRTC_VIDEOPROCESSOR_H264_TESTS" ]
405 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800406
407 if (!build_with_chromium && is_clang) {
408 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
409 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
410 }
411 }
412
413 plot_videoprocessor_integrationtest_resources = [
414 "//resources/foreman_128x96.yuv",
415 "//resources/foreman_160x120.yuv",
416 "//resources/foreman_176x144.yuv",
417 "//resources/foreman_320x240.yuv",
418 "//resources/foreman_cif.yuv",
419 ]
420
421 if (is_ios || is_mac) {
422 bundle_data("plot_videoprocessor_integrationtest_bundle_data") {
423 testonly = true
424 sources = plot_videoprocessor_integrationtest_resources
425 outputs = [
426 "{{bundle_resources_dir}}/{{source_file_part}}",
427 ]
428 }
429 }
430
431 # This executable is meant for local codec perf testing and should not be run
432 # on the trybots/buildbots, hence the existence of this special build target.
433 rtc_test("plot_videoprocessor_integrationtest") {
434 testonly = true
435
436 sources = [
437 "codecs/test/plot_videoprocessor_integrationtest.cc",
438 ]
439
440 deps = [
441 ":video_coding_videoprocessor_integration_test",
442 "../../test:test_main",
443 "../../test:video_test_common",
444 "../video_capture",
445 ]
446
447 data = plot_videoprocessor_integrationtest_resources
448
449 if (is_android) {
450 deps += [
451 "../../base:rtc_base_approved",
452
453 # TODO(brandtr): Figure out if the java dep below could be moved into
454 # :video_coding_videoprocessor_integration_test, where it belongs.
455 # When that is done, support for Android HW codecs can be added to the
456 # modules_tests target as well.
457 "../../sdk/android:libjingle_peerconnection_java",
458 "../../sdk/android:libjingle_peerconnection_jni",
459 "//base",
460 "//testing/android/native_test:native_test_support",
461 ]
462
463 shard_timeout = 900
464 }
465
466 if (is_ios || is_mac) {
467 deps += [ ":plot_videoprocessor_integrationtest_bundle_data" ]
468 }
469
470 # TODO(brandtr): Remove this define when the modules_tests target properly
471 # loads the Java classes mentioned above.
472 defines = [ "WEBRTC_VIDEOPROCESSOR_INTEGRATIONTEST_HW_CODECS_ENABLED" ]
473
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800474 if (!build_with_chromium && is_clang) {
475 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
476 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
477 }
478 }
479
ehmaldonado36268652017-01-19 08:27:11 -0800480 rtc_source_set("video_coding_unittests") {
481 testonly = true
482 sources = [
483 "codecs/test/packet_manipulator_unittest.cc",
484 "codecs/test/stats_unittest.cc",
485 "codecs/test/videoprocessor_unittest.cc",
486 "codecs/vp8/default_temporal_layers_unittest.cc",
487 "codecs/vp8/reference_picture_selection_unittest.cc",
488 "codecs/vp8/screenshare_layers_unittest.cc",
489 "codecs/vp8/simulcast_encoder_adapter_unittest.cc",
490 "codecs/vp8/simulcast_unittest.cc",
491 "codecs/vp8/simulcast_unittest.h",
492 "decoding_state_unittest.cc",
493 "frame_buffer2_unittest.cc",
494 "h264_sprop_parameter_sets_unittest.cc",
495 "h264_sps_pps_tracker_unittest.cc",
496 "histogram_unittest.cc",
497 "include/mock/mock_vcm_callbacks.h",
498 "jitter_buffer_unittest.cc",
499 "jitter_estimator_tests.cc",
500 "nack_module_unittest.cc",
501 "protection_bitrate_calculator_unittest.cc",
502 "receiver_unittest.cc",
503 "rtp_frame_reference_finder_unittest.cc",
504 "sequence_number_util_unittest.cc",
505 "session_info_unittest.cc",
506 "test/stream_generator.cc",
507 "test/stream_generator.h",
508 "timing_unittest.cc",
509 "utility/default_video_bitrate_allocator_unittest.cc",
510 "utility/frame_dropper_unittest.cc",
511 "utility/ivf_file_writer_unittest.cc",
512 "utility/moving_average_unittest.cc",
513 "utility/quality_scaler_unittest.cc",
514 "utility/simulcast_rate_allocator_unittest.cc",
sprang429600d2017-01-26 06:12:26 -0800515 "video_codec_initializer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800516 "video_coding_robustness_unittest.cc",
517 "video_packet_buffer_unittest.cc",
518 "video_receiver_unittest.cc",
519 "video_sender_unittest.cc",
520 ]
521 if (rtc_libvpx_build_vp9) {
522 sources += [ "codecs/vp9/vp9_screenshare_layers_unittest.cc" ]
523 }
524 if (rtc_use_h264) {
525 sources += [ "codecs/h264/h264_encoder_impl_unittest.cc" ]
526 }
527 deps = [
528 ":video_codecs_test_framework",
529 ":video_coding",
530 ":video_coding_utility",
531 ":webrtc_h264",
532 ":webrtc_vp8",
533 ":webrtc_vp9",
534 "../..:webrtc_common",
535 "../../api:video_frame_api",
536 "../../base:rtc_base",
537 "../../base:rtc_base_approved",
538 "../../base:rtc_task_queue",
539 "../../common_video:common_video",
540 "../../system_wrappers:metrics_default",
541 "../../system_wrappers:system_wrappers",
542 "../../test:field_trial",
543 "../../test:test_support",
544 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800545 "../../test:video_test_support",
ehmaldonado36268652017-01-19 08:27:11 -0800546 "../rtp_rtcp:rtp_rtcp",
547 "//testing/gmock",
548 ]
549 if (rtc_build_libvpx) {
550 deps += [ rtc_libvpx_dir ]
551 }
552 if (is_win) {
553 cflags = [
554 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
555 "/wd4373", # virtual function override.
556 ]
557 }
558
559 # TODO(jschuh): bugs.webrtc.org/1348: fix this warning.
560 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
561 if (!build_with_chromium && is_clang) {
562 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
563 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
564 }
565 }
kjellanderfb114242016-06-13 00:19:48 -0700566}