blob: 452f0bf445cfedcb32b23f6662ee96a386e0f10e [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",
Magnus Jedvert849b3ae2017-09-29 17:54:09 +0200191 "../../api/video_codecs:video_codecs_api",
magjed21d110f2017-02-28 00:28:04 -0800192 "../../media:rtc_media_base",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700193 "../../rtc_base:rtc_base_approved",
Zeke Chin71f6f442015-06-29 14:34:58 -0700194 "../../system_wrappers",
195 ]
hbosa9a1d2a2016-01-11 10:19:02 -0800196
hbos902c03e2016-01-21 03:34:40 -0800197 if (rtc_use_h264) {
hbos9dc59282016-02-03 05:09:37 -0800198 defines += [ "WEBRTC_USE_H264" ]
hbosc5a39c22016-02-02 02:26:05 -0800199 if (rtc_initialize_ffmpeg) {
200 defines += [ "WEBRTC_INITIALIZE_FFMPEG" ]
201 }
hbosbab934b2016-01-27 01:36:03 -0800202 sources += [
203 "codecs/h264/h264_decoder_impl.cc",
204 "codecs/h264/h264_decoder_impl.h",
205 "codecs/h264/h264_encoder_impl.cc",
206 "codecs/h264/h264_encoder_impl.h",
207 ]
hbosa9a1d2a2016-01-11 10:19:02 -0800208 deps += [
kjellanderf6b55092016-02-07 23:04:26 -0800209 "../../common_video",
hta9aa96882016-12-06 05:36:03 -0800210 "../../media:rtc_media_base",
hbosa9a1d2a2016-01-11 10:19:02 -0800211 "//third_party/ffmpeg:ffmpeg",
212 "//third_party/openh264:encoder",
213 ]
214 }
Zeke Chin71f6f442015-06-29 14:34:58 -0700215}
216
kjellanderb62dbbe2016-09-23 00:38:52 -0700217rtc_static_library("webrtc_i420") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000218 sources = [
Henrik Kjellandera74c08d2015-10-22 12:23:11 +0200219 "codecs/i420/i420.cc",
220 "codecs/i420/include/i420.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000221 ]
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
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200228 deps = [
charujaincb728ea2017-09-18 03:08:08 -0700229 ":video_coding_utility",
ehmaldonado36df2d72016-12-08 09:56:16 -0800230 "../..:webrtc_common",
ehmaldonado36df2d72016-12-08 09:56:16 -0800231 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700232 "../../rtc_base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200233 "../../system_wrappers",
234 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000235}
236
kjellanderb62dbbe2016-09-23 00:38:52 -0700237rtc_static_library("webrtc_vp8") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000238 sources = [
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000239 "codecs/vp8/default_temporal_layers.cc",
240 "codecs/vp8/default_temporal_layers.h",
pbos@webrtc.org9115cde2014-12-09 10:36:40 +0000241 "codecs/vp8/include/vp8.h",
242 "codecs/vp8/include/vp8_common_types.h",
pbos@webrtc.org9115cde2014-12-09 10:36:40 +0000243 "codecs/vp8/screenshare_layers.cc",
244 "codecs/vp8/screenshare_layers.h",
kjellandera8d8aad2017-03-08 05:42:26 -0800245 "codecs/vp8/simulcast_rate_allocator.cc",
246 "codecs/vp8/simulcast_rate_allocator.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000247 "codecs/vp8/temporal_layers.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000248 "codecs/vp8/vp8_impl.cc",
249 "codecs/vp8/vp8_impl.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000250 ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000251
kjellander8f4419b2016-06-02 02:09:52 -0700252 # TODO(jschuh): Bug 1348: fix this warning.
253 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
254
kjellandere40a7ee2016-10-16 23:56:12 -0700255 if (!build_with_chromium && is_clang) {
256 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700257 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000258 }
259
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000260 deps = [
261 ":video_coding_utility",
mbonadei1140f972017-04-26 03:38:35 -0700262 "..:module_api",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000263 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -0700264 "../../api:optional",
ilnikd60d06a2017-04-05 03:02:20 -0700265 "../../api/video_codecs:video_codecs_api",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000266 "../../common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700267 "../../rtc_base:rtc_base_approved",
asaperssone5d02f92017-08-09 23:37:05 -0700268 "../../rtc_base:rtc_numerics",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700269 "../../rtc_base:sequenced_task_checker",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000270 "../../system_wrappers",
271 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000272 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200273 deps += [ rtc_libvpx_dir ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000274 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000275}
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000276
kjellanderb62dbbe2016-09-23 00:38:52 -0700277rtc_static_library("webrtc_vp9") {
phoglund33603522016-10-05 06:52:22 -0700278 if (rtc_libvpx_build_vp9) {
279 sources = [
280 "codecs/vp9/include/vp9.h",
281 "codecs/vp9/screenshare_layers.cc",
282 "codecs/vp9/screenshare_layers.h",
283 "codecs/vp9/vp9_frame_buffer_pool.cc",
284 "codecs/vp9/vp9_frame_buffer_pool.h",
285 "codecs/vp9/vp9_impl.cc",
286 "codecs/vp9/vp9_impl.h",
287 ]
288 } else {
289 sources = [
290 "codecs/vp9/vp9_noop.cc",
291 ]
292 }
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000293
kjellandere40a7ee2016-10-16 23:56:12 -0700294 if (!build_with_chromium && is_clang) {
295 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700296 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000297 }
298
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000299 deps = [
300 ":video_coding_utility",
mbonadei1140f972017-04-26 03:38:35 -0700301 "..:module_api",
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000302 "../../common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700303 "../../rtc_base:rtc_base_approved",
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000304 "../../system_wrappers",
305 ]
306 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200307 deps += [ rtc_libvpx_dir ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000308 }
309}
kjellanderfb114242016-06-13 00:19:48 -0700310
311if (rtc_include_tests) {
magjed73c0eb52017-08-07 06:55:28 -0700312 if (is_ios || is_mac) {
kthelgason36d658d2017-08-24 05:43:45 -0700313 rtc_static_library("codec_test_objc") {
magjed73c0eb52017-08-07 06:55:28 -0700314 sources = [
315 "codecs/test/objc_codec_h264_test.h",
316 "codecs/test/objc_codec_h264_test.mm",
317 ]
318 deps = [
319 "../../api:video_frame_api",
320 "../../api/video_codecs:video_codecs_api",
321 "../../media:rtc_audio_video",
322 "../../modules:module_api",
kthelgason36d658d2017-08-24 05:43:45 -0700323 "../../sdk:common_objc",
324 "../../sdk:peerconnection_objc",
325 "../../sdk:peerconnectionfactory_objc",
326 "../../sdk:videotoolbox_objc",
327 "../../sdk:videotracksource_objc",
magjed73c0eb52017-08-07 06:55:28 -0700328 ]
329
330 if (!build_with_chromium && is_clang) {
331 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
332 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
333 }
334 }
335 }
336
magjed6cc25612017-07-10 03:26:36 -0700337 rtc_source_set("simulcast_test_utility") {
338 testonly = true
339 sources = [
340 "codecs/vp8/simulcast_test_utility.h",
341 ]
342
343 if (!build_with_chromium && is_clang) {
344 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
345 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
346 }
347
348 deps = [
charujaincb728ea2017-09-18 03:08:08 -0700349 ":mock_headers",
magjed6cc25612017-07-10 03:26:36 -0700350 ":video_coding",
351 ":webrtc_vp8",
352 "../../api:video_frame_api",
magjed6cc25612017-07-10 03:26:36 -0700353 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700354 "../../rtc_base:rtc_base_approved",
magjed6cc25612017-07-10 03:26:36 -0700355 "../../test:test_support",
356 ]
357 }
358
ehmaldonado38a21322016-09-02 04:10:34 -0700359 rtc_source_set("video_codecs_test_framework") {
kjellanderfb114242016-06-13 00:19:48 -0700360 testonly = true
361 sources = [
362 "codecs/test/mock/mock_packet_manipulator.h",
363 "codecs/test/packet_manipulator.cc",
364 "codecs/test/packet_manipulator.h",
365 "codecs/test/predictive_packet_manipulator.cc",
366 "codecs/test/predictive_packet_manipulator.h",
367 "codecs/test/stats.cc",
368 "codecs/test/stats.h",
sakalb8102e02017-03-06 03:52:55 -0800369 "codecs/test/video_codec_test.cc",
370 "codecs/test/video_codec_test.h",
kjellanderfb114242016-06-13 00:19:48 -0700371 "codecs/test/videoprocessor.cc",
372 "codecs/test/videoprocessor.h",
373 ]
374
kjellandere40a7ee2016-10-16 23:56:12 -0700375 if (!build_with_chromium && is_clang) {
376 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700377 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -0700378 }
379
380 deps = [
ssilkin612f8582017-09-28 09:23:17 -0700381 ":codec_globals_headers",
ehmaldonado36df2d72016-12-08 09:56:16 -0800382 ":video_coding",
383 ":video_coding_utility",
kjellandera8d8aad2017-03-08 05:42:26 -0800384 ":webrtc_vp8",
ehmaldonado36df2d72016-12-08 09:56:16 -0800385 "../..:webrtc_common",
ilnikd60d06a2017-04-05 03:02:20 -0700386 "../../api/video_codecs:video_codecs_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800387 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700388 "../../rtc_base:rtc_base_approved",
brandtrc8c59052017-08-21 06:44:16 -0700389 "../../rtc_base:rtc_task_queue",
390 "../../rtc_base:sequenced_task_checker",
ehmaldonado36df2d72016-12-08 09:56:16 -0800391 "../../system_wrappers:system_wrappers",
kjellanderfb114242016-06-13 00:19:48 -0700392 "../../test:test_support",
sakalb8102e02017-03-06 03:52:55 -0800393 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800394 "../../test:video_test_support",
kjellanderfb114242016-06-13 00:19:48 -0700395 ]
396 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800397
brandtrdf232992017-09-07 07:50:06 -0700398 video_coding_modules_tests_resources = [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200399 "../../resources/foreman_128x96.yuv",
400 "../../resources/foreman_160x120.yuv",
401 "../../resources/foreman_176x144.yuv",
402 "../../resources/foreman_320x240.yuv",
brandtrdf232992017-09-07 07:50:06 -0700403 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800404
brandtrdf232992017-09-07 07:50:06 -0700405 if (is_ios || is_mac) {
406 bundle_data("video_coding_modules_tests_resources_bundle_data") {
407 testonly = true
408 sources = video_coding_modules_tests_resources
409 outputs = [
410 "{{bundle_resources_dir}}/{{source_file_part}}",
brandtr6bb8e0e2017-02-20 04:35:52 -0800411 ]
brandtr12a47f62017-09-01 00:10:27 -0700412 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800413 }
414
415 rtc_source_set("video_coding_modules_tests") {
416 testonly = true
417
kjellandere0629c02017-04-25 04:04:50 -0700418 # Skip restricting visibility on mobile platforms since the tests on those
419 # gets additional generated targets which would require many lines here to
420 # cover (which would be confusing to read and hard to maintain).
421 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700422 visibility = [ "..:modules_tests" ]
kjellandere0629c02017-04-25 04:04:50 -0700423 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800424 sources = [
sakalb8102e02017-03-06 03:52:55 -0800425 "codecs/h264/test/h264_impl_unittest.cc",
brandtrdf232992017-09-07 07:50:06 -0700426 "codecs/test/videoprocessor_integrationtest.cc",
427 "codecs/test/videoprocessor_integrationtest.h",
brandtr12a47f62017-09-01 00:10:27 -0700428 "codecs/test/videoprocessor_integrationtest_libvpx.cc",
429 "codecs/test/videoprocessor_integrationtest_openh264.cc",
brandtrdf232992017-09-07 07:50:06 -0700430 "codecs/test/videoprocessor_integrationtest_parameterized.cc",
brandtr6bb8e0e2017-02-20 04:35:52 -0800431 "codecs/vp8/test/vp8_impl_unittest.cc",
sakal7adadb12017-02-23 02:54:57 -0800432 "codecs/vp9/test/vp9_impl_unittest.cc",
brandtr6bb8e0e2017-02-20 04:35:52 -0800433 ]
434
435 deps = [
sakalb8102e02017-03-06 03:52:55 -0800436 ":video_codecs_test_framework",
brandtrdf232992017-09-07 07:50:06 -0700437 ":video_coding",
438 ":video_coding_utility",
sakalb8102e02017-03-06 03:52:55 -0800439 ":webrtc_h264",
brandtr6bb8e0e2017-02-20 04:35:52 -0800440 ":webrtc_vp8",
sakal7adadb12017-02-23 02:54:57 -0800441 ":webrtc_vp9",
brandtrdf232992017-09-07 07:50:06 -0700442 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -0700443 "../../api:optional",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800444 "../../api:video_frame_api",
brandtrdf232992017-09-07 07:50:06 -0700445 "../../common_video",
446 "../../media:rtc_audio_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700447 "../../rtc_base:rtc_base_approved",
brandtrdf232992017-09-07 07:50:06 -0700448 "../../system_wrappers",
asapersson142fcc92017-08-17 08:58:54 -0700449 "../../test:field_trial",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800450 "../../test:test_support",
451 "../../test:video_test_common",
brandtrdf232992017-09-07 07:50:06 -0700452 "../../test:video_test_support",
ehmaldonado656610f2017-02-06 02:21:11 -0800453 "../video_capture",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800454 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800455
brandtrdf232992017-09-07 07:50:06 -0700456 data = video_coding_modules_tests_resources
brandtr6bb8e0e2017-02-20 04:35:52 -0800457
458 if (is_android) {
Rasmus Brandt31027342017-09-29 13:48:12 +0000459 sources += [
460 "codecs/test/android_test_initializer.cc",
461 "codecs/test/android_test_initializer.h",
462 "codecs/test/videoprocessor_integrationtest_mediacodec.cc",
463 ]
464
brandtrdf232992017-09-07 07:50:06 -0700465 deps += [
Rasmus Brandt31027342017-09-29 13:48:12 +0000466 "../../sdk/android:libjingle_peerconnection_jni",
467 "//base",
brandtrdf232992017-09-07 07:50:06 -0700468 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800469 }
470
471 if (is_ios || is_mac) {
magjed73c0eb52017-08-07 06:55:28 -0700472 deps += [
kthelgason36d658d2017-08-24 05:43:45 -0700473 ":codec_test_objc",
brandtrdf232992017-09-07 07:50:06 -0700474 ":video_coding_modules_tests_resources_bundle_data",
Rasmus Brandt31027342017-09-29 13:48:12 +0000475 "../../media:rtc_media_base",
476 "../../sdk:videotoolbox_objc",
magjed73c0eb52017-08-07 06:55:28 -0700477 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800478 }
479
brandtrdf232992017-09-07 07:50:06 -0700480 if (rtc_use_h264) {
481 defines = [ "WEBRTC_USE_H264" ]
482 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800483
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800484 if (!build_with_chromium && is_clang) {
485 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
486 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
487 }
488 }
489
ehmaldonado36268652017-01-19 08:27:11 -0800490 rtc_source_set("video_coding_unittests") {
491 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700492
493 # Skip restricting visibility on mobile platforms since the tests on those
494 # gets additional generated targets which would require many lines here to
495 # cover (which would be confusing to read and hard to maintain).
496 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700497 visibility = [ "..:modules_unittests" ]
kjellandere0629c02017-04-25 04:04:50 -0700498 }
ehmaldonado36268652017-01-19 08:27:11 -0800499 sources = [
500 "codecs/test/packet_manipulator_unittest.cc",
501 "codecs/test/stats_unittest.cc",
502 "codecs/test/videoprocessor_unittest.cc",
503 "codecs/vp8/default_temporal_layers_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800504 "codecs/vp8/screenshare_layers_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800505 "codecs/vp8/simulcast_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800506 "decoding_state_unittest.cc",
507 "frame_buffer2_unittest.cc",
ilnik04f4d122017-06-19 07:18:55 -0700508 "generic_encoder_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800509 "h264_sprop_parameter_sets_unittest.cc",
510 "h264_sps_pps_tracker_unittest.cc",
511 "histogram_unittest.cc",
512 "include/mock/mock_vcm_callbacks.h",
513 "jitter_buffer_unittest.cc",
514 "jitter_estimator_tests.cc",
515 "nack_module_unittest.cc",
516 "protection_bitrate_calculator_unittest.cc",
517 "receiver_unittest.cc",
518 "rtp_frame_reference_finder_unittest.cc",
519 "sequence_number_util_unittest.cc",
520 "session_info_unittest.cc",
521 "test/stream_generator.cc",
522 "test/stream_generator.h",
charujaincb728ea2017-09-18 03:08:08 -0700523 "test/test_util.h",
ehmaldonado36268652017-01-19 08:27:11 -0800524 "timing_unittest.cc",
525 "utility/default_video_bitrate_allocator_unittest.cc",
526 "utility/frame_dropper_unittest.cc",
527 "utility/ivf_file_writer_unittest.cc",
charujaincb728ea2017-09-18 03:08:08 -0700528 "utility/mock/mock_frame_dropper.h",
ehmaldonado36268652017-01-19 08:27:11 -0800529 "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 = [
charujaincb728ea2017-09-18 03:08:08 -0700544 ":mock_headers",
magjed6cc25612017-07-10 03:26:36 -0700545 ":simulcast_test_utility",
ehmaldonado36268652017-01-19 08:27:11 -0800546 ":video_codecs_test_framework",
547 ":video_coding",
548 ":video_coding_utility",
549 ":webrtc_h264",
550 ":webrtc_vp8",
551 ":webrtc_vp9",
mbonadei1140f972017-04-26 03:38:35 -0700552 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -0800553 "../..:webrtc_common",
554 "../../api:video_frame_api",
ilnikd60d06a2017-04-05 03:02:20 -0700555 "../../api/video_codecs:video_codecs_api",
ehmaldonado36268652017-01-19 08:27:11 -0800556 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700557 "../../rtc_base:rtc_base",
558 "../../rtc_base:rtc_base_approved",
559 "../../rtc_base:rtc_task_queue",
ehmaldonado36268652017-01-19 08:27:11 -0800560 "../../system_wrappers:metrics_default",
561 "../../system_wrappers:system_wrappers",
562 "../../test:field_trial",
563 "../../test:test_support",
564 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800565 "../../test:video_test_support",
ehmaldonado36268652017-01-19 08:27:11 -0800566 "../rtp_rtcp:rtp_rtcp",
567 "//testing/gmock",
568 ]
569 if (rtc_build_libvpx) {
570 deps += [ rtc_libvpx_dir ]
571 }
572 if (is_win) {
573 cflags = [
574 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
575 "/wd4373", # virtual function override.
576 ]
577 }
578
579 # TODO(jschuh): bugs.webrtc.org/1348: fix this warning.
580 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
581 if (!build_with_chromium && is_clang) {
582 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
583 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
584 }
585 }
kjellanderfb114242016-06-13 00:19:48 -0700586}