blob: 463665f35287039dbaf84415a24fe3aba2c3e528 [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",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000098 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -070099 "../../api:optional",
aleloi440b6d92017-08-22 05:43:23 -0700100 "../../call:video_stream_api",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000101 "../../common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700102 "../../rtc_base:rtc_base",
103 "../../rtc_base:rtc_base_approved",
104 "../../rtc_base:rtc_numerics",
105 "../../rtc_base:rtc_task_queue",
106 "../../rtc_base:sequenced_task_checker",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000107 "../../system_wrappers",
ilnik6d5b4d62017-08-30 03:32:14 -0700108 "../pacing",
ehmaldonado36df2d72016-12-08 09:56:16 -0800109 "../rtp_rtcp:rtp_rtcp",
110 "../utility:utility",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000111 ]
112}
113
charujaincb728ea2017-09-18 03:08:08 -0700114rtc_source_set("mock_headers") {
115 testonly = true
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000116 sources = [
charujaincb728ea2017-09-18 03:08:08 -0700117 "codecs/interface/mock/mock_video_codec_interface.h",
118 "include/mock/mock_video_codec_interface.h",
119 ]
120 deps = [
121 ":video_coding_utility",
122 "../..:webrtc_common",
123 "../../test:test_support",
124 ]
125}
126
127rtc_source_set("codec_globals_headers") {
128 sources = [
129 "codecs/h264/include/h264_globals.h",
130 "codecs/interface/common_constants.h",
131 "codecs/vp8/include/vp8_globals.h",
132 "codecs/vp9/include/vp9_globals.h",
133 ]
134}
135
136rtc_source_set("video_coding_utility") {
137 sources = [
138 "codecs/interface/video_codec_interface.h",
139 "codecs/interface/video_error_codes.h",
140 "sequence_number_util.h",
Erik Språng08127a92016-11-16 16:41:30 +0100141 "utility/default_video_bitrate_allocator.cc",
142 "utility/default_video_bitrate_allocator.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000143 "utility/frame_dropper.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100144 "utility/frame_dropper.h",
sprang3911c262016-04-15 01:24:14 -0700145 "utility/ivf_file_writer.cc",
146 "utility/ivf_file_writer.h",
kthelgason194f40a2016-09-14 02:14:58 -0700147 "utility/moving_average.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100148 "utility/moving_average.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000149 "utility/quality_scaler.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100150 "utility/quality_scaler.h",
jackychen98d8cf52015-05-21 11:12:02 -0700151 "utility/vp8_header_parser.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100152 "utility/vp8_header_parser.h",
jianj20acdf22017-05-24 10:00:16 -0700153 "utility/vp9_uncompressed_header_parser.cc",
154 "utility/vp9_uncompressed_header_parser.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000155 ]
156
kjellandere40a7ee2016-10-16 23:56:12 -0700157 if (!build_with_chromium && is_clang) {
158 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700159 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000160 }
161
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200162 deps = [
mbonadei1140f972017-04-26 03:38:35 -0700163 "..:module_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800164 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -0700165 "../../api:optional",
ilnikd60d06a2017-04-05 03:02:20 -0700166 "../../api/video_codecs:video_codecs_api",
perkj4e417b22016-07-14 23:35:55 -0700167 "../../common_video",
kjellandera8d8aad2017-03-08 05:42:26 -0800168 "../../modules/rtp_rtcp:rtp_rtcp",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700169 "../../rtc_base:rtc_base_approved",
170 "../../rtc_base:rtc_numerics",
171 "../../rtc_base:rtc_task_queue",
172 "../../rtc_base:sequenced_task_checker",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200173 "../../system_wrappers",
174 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000175}
176
kjellanderb62dbbe2016-09-23 00:38:52 -0700177rtc_static_library("webrtc_h264") {
Zeke Chin71f6f442015-06-29 14:34:58 -0700178 sources = [
179 "codecs/h264/h264.cc",
180 "codecs/h264/include/h264.h",
181 ]
182
kjellandere40a7ee2016-10-16 23:56:12 -0700183 if (!build_with_chromium && is_clang) {
184 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700185 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Zeke Chin71f6f442015-06-29 14:34:58 -0700186 }
187
hbosbab934b2016-01-27 01:36:03 -0800188 defines = []
Zeke Chin71f6f442015-06-29 14:34:58 -0700189 deps = [
ehmaldonado36df2d72016-12-08 09:56:16 -0800190 ":video_coding_utility",
magjed21d110f2017-02-28 00:28:04 -0800191 "../../media:rtc_media_base",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700192 "../../rtc_base:rtc_base_approved",
Zeke Chin71f6f442015-06-29 14:34:58 -0700193 "../../system_wrappers",
194 ]
hbosa9a1d2a2016-01-11 10:19:02 -0800195
hbos902c03e2016-01-21 03:34:40 -0800196 if (rtc_use_h264) {
hbos9dc59282016-02-03 05:09:37 -0800197 defines += [ "WEBRTC_USE_H264" ]
hbosc5a39c22016-02-02 02:26:05 -0800198 if (rtc_initialize_ffmpeg) {
199 defines += [ "WEBRTC_INITIALIZE_FFMPEG" ]
200 }
hbosbab934b2016-01-27 01:36:03 -0800201 sources += [
202 "codecs/h264/h264_decoder_impl.cc",
203 "codecs/h264/h264_decoder_impl.h",
204 "codecs/h264/h264_encoder_impl.cc",
205 "codecs/h264/h264_encoder_impl.h",
206 ]
hbosa9a1d2a2016-01-11 10:19:02 -0800207 deps += [
kjellanderf6b55092016-02-07 23:04:26 -0800208 "../../common_video",
hta9aa96882016-12-06 05:36:03 -0800209 "../../media:rtc_media_base",
hbosa9a1d2a2016-01-11 10:19:02 -0800210 "//third_party/ffmpeg:ffmpeg",
211 "//third_party/openh264:encoder",
212 ]
213 }
Zeke Chin71f6f442015-06-29 14:34:58 -0700214}
215
kjellanderb62dbbe2016-09-23 00:38:52 -0700216rtc_static_library("webrtc_i420") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000217 sources = [
Henrik Kjellandera74c08d2015-10-22 12:23:11 +0200218 "codecs/i420/i420.cc",
219 "codecs/i420/include/i420.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000220 ]
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
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200227 deps = [
charujaincb728ea2017-09-18 03:08:08 -0700228 ":video_coding_utility",
ehmaldonado36df2d72016-12-08 09:56:16 -0800229 "../..:webrtc_common",
ehmaldonado36df2d72016-12-08 09:56:16 -0800230 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700231 "../../rtc_base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200232 "../../system_wrappers",
233 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000234}
235
kjellanderb62dbbe2016-09-23 00:38:52 -0700236rtc_static_library("webrtc_vp8") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000237 sources = [
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000238 "codecs/vp8/default_temporal_layers.cc",
239 "codecs/vp8/default_temporal_layers.h",
pbos@webrtc.org9115cde2014-12-09 10:36:40 +0000240 "codecs/vp8/include/vp8.h",
241 "codecs/vp8/include/vp8_common_types.h",
pbos@webrtc.org9115cde2014-12-09 10:36:40 +0000242 "codecs/vp8/screenshare_layers.cc",
243 "codecs/vp8/screenshare_layers.h",
kjellandera8d8aad2017-03-08 05:42:26 -0800244 "codecs/vp8/simulcast_rate_allocator.cc",
245 "codecs/vp8/simulcast_rate_allocator.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000246 "codecs/vp8/temporal_layers.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000247 "codecs/vp8/vp8_impl.cc",
248 "codecs/vp8/vp8_impl.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000249 ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000250
kjellander8f4419b2016-06-02 02:09:52 -0700251 # TODO(jschuh): Bug 1348: fix this warning.
252 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
253
kjellandere40a7ee2016-10-16 23:56:12 -0700254 if (!build_with_chromium && is_clang) {
255 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700256 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000257 }
258
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000259 deps = [
260 ":video_coding_utility",
mbonadei1140f972017-04-26 03:38:35 -0700261 "..:module_api",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000262 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -0700263 "../../api:optional",
ilnikd60d06a2017-04-05 03:02:20 -0700264 "../../api/video_codecs:video_codecs_api",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000265 "../../common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700266 "../../rtc_base:rtc_base_approved",
asaperssone5d02f92017-08-09 23:37:05 -0700267 "../../rtc_base:rtc_numerics",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700268 "../../rtc_base:sequenced_task_checker",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000269 "../../system_wrappers",
270 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000271 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200272 deps += [ rtc_libvpx_dir ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000273 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000274}
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000275
kjellanderb62dbbe2016-09-23 00:38:52 -0700276rtc_static_library("webrtc_vp9") {
phoglund33603522016-10-05 06:52:22 -0700277 if (rtc_libvpx_build_vp9) {
278 sources = [
279 "codecs/vp9/include/vp9.h",
280 "codecs/vp9/screenshare_layers.cc",
281 "codecs/vp9/screenshare_layers.h",
282 "codecs/vp9/vp9_frame_buffer_pool.cc",
283 "codecs/vp9/vp9_frame_buffer_pool.h",
284 "codecs/vp9/vp9_impl.cc",
285 "codecs/vp9/vp9_impl.h",
286 ]
287 } else {
288 sources = [
289 "codecs/vp9/vp9_noop.cc",
290 ]
291 }
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000292
kjellandere40a7ee2016-10-16 23:56:12 -0700293 if (!build_with_chromium && is_clang) {
294 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700295 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000296 }
297
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000298 deps = [
299 ":video_coding_utility",
mbonadei1140f972017-04-26 03:38:35 -0700300 "..:module_api",
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000301 "../../common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700302 "../../rtc_base:rtc_base_approved",
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000303 "../../system_wrappers",
304 ]
305 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200306 deps += [ rtc_libvpx_dir ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000307 }
308}
kjellanderfb114242016-06-13 00:19:48 -0700309
310if (rtc_include_tests) {
magjed73c0eb52017-08-07 06:55:28 -0700311 if (is_ios || is_mac) {
kthelgason36d658d2017-08-24 05:43:45 -0700312 rtc_static_library("codec_test_objc") {
magjed73c0eb52017-08-07 06:55:28 -0700313 sources = [
314 "codecs/test/objc_codec_h264_test.h",
315 "codecs/test/objc_codec_h264_test.mm",
316 ]
317 deps = [
318 "../../api:video_frame_api",
319 "../../api/video_codecs:video_codecs_api",
320 "../../media:rtc_audio_video",
321 "../../modules:module_api",
kthelgason36d658d2017-08-24 05:43:45 -0700322 "../../sdk:common_objc",
323 "../../sdk:peerconnection_objc",
324 "../../sdk:peerconnectionfactory_objc",
325 "../../sdk:videotoolbox_objc",
326 "../../sdk:videotracksource_objc",
magjed73c0eb52017-08-07 06:55:28 -0700327 ]
328
329 if (!build_with_chromium && is_clang) {
330 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
331 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
332 }
333 }
334 }
335
magjed6cc25612017-07-10 03:26:36 -0700336 rtc_source_set("simulcast_test_utility") {
337 testonly = true
338 sources = [
339 "codecs/vp8/simulcast_test_utility.h",
340 ]
341
342 if (!build_with_chromium && is_clang) {
343 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
344 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
345 }
346
347 deps = [
charujaincb728ea2017-09-18 03:08:08 -0700348 ":mock_headers",
magjed6cc25612017-07-10 03:26:36 -0700349 ":video_coding",
350 ":webrtc_vp8",
351 "../../api:video_frame_api",
magjed6cc25612017-07-10 03:26:36 -0700352 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700353 "../../rtc_base:rtc_base_approved",
magjed6cc25612017-07-10 03:26:36 -0700354 "../../test:test_support",
355 ]
356 }
357
ehmaldonado38a21322016-09-02 04:10:34 -0700358 rtc_source_set("video_codecs_test_framework") {
kjellanderfb114242016-06-13 00:19:48 -0700359 testonly = true
360 sources = [
361 "codecs/test/mock/mock_packet_manipulator.h",
362 "codecs/test/packet_manipulator.cc",
363 "codecs/test/packet_manipulator.h",
364 "codecs/test/predictive_packet_manipulator.cc",
365 "codecs/test/predictive_packet_manipulator.h",
366 "codecs/test/stats.cc",
367 "codecs/test/stats.h",
sakalb8102e02017-03-06 03:52:55 -0800368 "codecs/test/video_codec_test.cc",
369 "codecs/test/video_codec_test.h",
kjellanderfb114242016-06-13 00:19:48 -0700370 "codecs/test/videoprocessor.cc",
371 "codecs/test/videoprocessor.h",
372 ]
373
kjellandere40a7ee2016-10-16 23:56:12 -0700374 if (!build_with_chromium && is_clang) {
375 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700376 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -0700377 }
378
379 deps = [
ssilkin612f8582017-09-28 09:23:17 -0700380 ":codec_globals_headers",
ehmaldonado36df2d72016-12-08 09:56:16 -0800381 ":video_coding",
382 ":video_coding_utility",
kjellandera8d8aad2017-03-08 05:42:26 -0800383 ":webrtc_vp8",
ehmaldonado36df2d72016-12-08 09:56:16 -0800384 "../..:webrtc_common",
ilnikd60d06a2017-04-05 03:02:20 -0700385 "../../api/video_codecs:video_codecs_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800386 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700387 "../../rtc_base:rtc_base_approved",
brandtrc8c59052017-08-21 06:44:16 -0700388 "../../rtc_base:rtc_task_queue",
389 "../../rtc_base:sequenced_task_checker",
ehmaldonado36df2d72016-12-08 09:56:16 -0800390 "../../system_wrappers:system_wrappers",
kjellanderfb114242016-06-13 00:19:48 -0700391 "../../test:test_support",
sakalb8102e02017-03-06 03:52:55 -0800392 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800393 "../../test:video_test_support",
kjellanderfb114242016-06-13 00:19:48 -0700394 ]
395 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800396
Rasmus Brandt2666cf72017-09-29 13:48:31 +0200397 if (is_android) {
398 rtc_source_set("codecs_test_android_test_initializer") {
399 testonly = true
400
401 sources = [
402 "codecs/test/android_test_initializer.cc",
403 "codecs/test/android_test_initializer.h",
404 ]
405
406 deps = [
407 "../../rtc_base:rtc_base_approved",
408 "../../sdk/android:libjingle_peerconnection_jni",
409 "//base",
410 ]
411 }
412 }
413
brandtrdf232992017-09-07 07:50:06 -0700414 video_coding_modules_tests_resources = [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200415 "../../resources/foreman_128x96.yuv",
416 "../../resources/foreman_160x120.yuv",
417 "../../resources/foreman_176x144.yuv",
418 "../../resources/foreman_320x240.yuv",
brandtrdf232992017-09-07 07:50:06 -0700419 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800420
brandtrdf232992017-09-07 07:50:06 -0700421 if (is_ios || is_mac) {
422 bundle_data("video_coding_modules_tests_resources_bundle_data") {
423 testonly = true
424 sources = video_coding_modules_tests_resources
425 outputs = [
426 "{{bundle_resources_dir}}/{{source_file_part}}",
brandtr6bb8e0e2017-02-20 04:35:52 -0800427 ]
brandtr12a47f62017-09-01 00:10:27 -0700428 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800429 }
430
431 rtc_source_set("video_coding_modules_tests") {
432 testonly = true
433
kjellandere0629c02017-04-25 04:04:50 -0700434 # Skip restricting visibility on mobile platforms since the tests on those
435 # gets additional generated targets which would require many lines here to
436 # cover (which would be confusing to read and hard to maintain).
437 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700438 visibility = [ "..:modules_tests" ]
kjellandere0629c02017-04-25 04:04:50 -0700439 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800440 sources = [
sakalb8102e02017-03-06 03:52:55 -0800441 "codecs/h264/test/h264_impl_unittest.cc",
brandtrdf232992017-09-07 07:50:06 -0700442 "codecs/test/videoprocessor_integrationtest.cc",
443 "codecs/test/videoprocessor_integrationtest.h",
brandtr12a47f62017-09-01 00:10:27 -0700444 "codecs/test/videoprocessor_integrationtest_libvpx.cc",
445 "codecs/test/videoprocessor_integrationtest_openh264.cc",
brandtrdf232992017-09-07 07:50:06 -0700446 "codecs/test/videoprocessor_integrationtest_parameterized.cc",
brandtr6bb8e0e2017-02-20 04:35:52 -0800447 "codecs/vp8/test/vp8_impl_unittest.cc",
sakal7adadb12017-02-23 02:54:57 -0800448 "codecs/vp9/test/vp9_impl_unittest.cc",
brandtr6bb8e0e2017-02-20 04:35:52 -0800449 ]
450
451 deps = [
sakalb8102e02017-03-06 03:52:55 -0800452 ":video_codecs_test_framework",
brandtrdf232992017-09-07 07:50:06 -0700453 ":video_coding",
454 ":video_coding_utility",
sakalb8102e02017-03-06 03:52:55 -0800455 ":webrtc_h264",
brandtr6bb8e0e2017-02-20 04:35:52 -0800456 ":webrtc_vp8",
sakal7adadb12017-02-23 02:54:57 -0800457 ":webrtc_vp9",
brandtrdf232992017-09-07 07:50:06 -0700458 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -0700459 "../../api:optional",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800460 "../../api:video_frame_api",
brandtrdf232992017-09-07 07:50:06 -0700461 "../../common_video",
462 "../../media:rtc_audio_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700463 "../../rtc_base:rtc_base_approved",
brandtrdf232992017-09-07 07:50:06 -0700464 "../../system_wrappers",
asapersson142fcc92017-08-17 08:58:54 -0700465 "../../test:field_trial",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800466 "../../test:test_support",
467 "../../test:video_test_common",
brandtrdf232992017-09-07 07:50:06 -0700468 "../../test:video_test_support",
ehmaldonado656610f2017-02-06 02:21:11 -0800469 "../video_capture",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800470 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800471
brandtrdf232992017-09-07 07:50:06 -0700472 data = video_coding_modules_tests_resources
brandtr6bb8e0e2017-02-20 04:35:52 -0800473
474 if (is_android) {
brandtrdf232992017-09-07 07:50:06 -0700475 deps += [
Rasmus Brandt2666cf72017-09-29 13:48:31 +0200476 ":codecs_test_android_test_initializer",
477 "../../sdk/android:video_jni",
brandtrdf232992017-09-07 07:50:06 -0700478 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800479 }
480
481 if (is_ios || is_mac) {
magjed73c0eb52017-08-07 06:55:28 -0700482 deps += [
kthelgason36d658d2017-08-24 05:43:45 -0700483 ":codec_test_objc",
brandtrdf232992017-09-07 07:50:06 -0700484 ":video_coding_modules_tests_resources_bundle_data",
magjed73c0eb52017-08-07 06:55:28 -0700485 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800486 }
487
brandtrdf232992017-09-07 07:50:06 -0700488 if (rtc_use_h264) {
489 defines = [ "WEBRTC_USE_H264" ]
490 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800491
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800492 if (!build_with_chromium && is_clang) {
493 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
494 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
495 }
496 }
497
ehmaldonado36268652017-01-19 08:27:11 -0800498 rtc_source_set("video_coding_unittests") {
499 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700500
501 # Skip restricting visibility on mobile platforms since the tests on those
502 # gets additional generated targets which would require many lines here to
503 # cover (which would be confusing to read and hard to maintain).
504 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700505 visibility = [ "..:modules_unittests" ]
kjellandere0629c02017-04-25 04:04:50 -0700506 }
ehmaldonado36268652017-01-19 08:27:11 -0800507 sources = [
508 "codecs/test/packet_manipulator_unittest.cc",
509 "codecs/test/stats_unittest.cc",
510 "codecs/test/videoprocessor_unittest.cc",
511 "codecs/vp8/default_temporal_layers_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800512 "codecs/vp8/screenshare_layers_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800513 "codecs/vp8/simulcast_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800514 "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",
charujaincb728ea2017-09-18 03:08:08 -0700531 "test/test_util.h",
ehmaldonado36268652017-01-19 08:27:11 -0800532 "timing_unittest.cc",
533 "utility/default_video_bitrate_allocator_unittest.cc",
534 "utility/frame_dropper_unittest.cc",
535 "utility/ivf_file_writer_unittest.cc",
charujaincb728ea2017-09-18 03:08:08 -0700536 "utility/mock/mock_frame_dropper.h",
ehmaldonado36268652017-01-19 08:27:11 -0800537 "utility/moving_average_unittest.cc",
538 "utility/quality_scaler_unittest.cc",
539 "utility/simulcast_rate_allocator_unittest.cc",
sprang429600d2017-01-26 06:12:26 -0800540 "video_codec_initializer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800541 "video_packet_buffer_unittest.cc",
542 "video_receiver_unittest.cc",
543 "video_sender_unittest.cc",
544 ]
545 if (rtc_libvpx_build_vp9) {
546 sources += [ "codecs/vp9/vp9_screenshare_layers_unittest.cc" ]
547 }
548 if (rtc_use_h264) {
549 sources += [ "codecs/h264/h264_encoder_impl_unittest.cc" ]
550 }
551 deps = [
charujaincb728ea2017-09-18 03:08:08 -0700552 ":mock_headers",
magjed6cc25612017-07-10 03:26:36 -0700553 ":simulcast_test_utility",
ehmaldonado36268652017-01-19 08:27:11 -0800554 ":video_codecs_test_framework",
555 ":video_coding",
556 ":video_coding_utility",
557 ":webrtc_h264",
558 ":webrtc_vp8",
559 ":webrtc_vp9",
mbonadei1140f972017-04-26 03:38:35 -0700560 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -0800561 "../..:webrtc_common",
562 "../../api:video_frame_api",
ilnikd60d06a2017-04-05 03:02:20 -0700563 "../../api/video_codecs:video_codecs_api",
ehmaldonado36268652017-01-19 08:27:11 -0800564 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700565 "../../rtc_base:rtc_base",
566 "../../rtc_base:rtc_base_approved",
567 "../../rtc_base:rtc_task_queue",
ehmaldonado36268652017-01-19 08:27:11 -0800568 "../../system_wrappers:metrics_default",
569 "../../system_wrappers:system_wrappers",
570 "../../test:field_trial",
571 "../../test:test_support",
572 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800573 "../../test:video_test_support",
ehmaldonado36268652017-01-19 08:27:11 -0800574 "../rtp_rtcp:rtp_rtcp",
575 "//testing/gmock",
576 ]
577 if (rtc_build_libvpx) {
578 deps += [ rtc_libvpx_dir ]
579 }
580 if (is_win) {
581 cflags = [
582 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
583 "/wd4373", # virtual function override.
584 ]
585 }
586
587 # TODO(jschuh): bugs.webrtc.org/1348: fix this warning.
588 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
589 if (!build_with_chromium && is_clang) {
590 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
591 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
592 }
593 }
kjellanderfb114242016-06-13 00:19:48 -0700594}