blob: 997ad083619ff198782e5c7d93990cbbd52e4031 [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 = [
Rasmus Brandt88f080a2017-11-02 14:28:06 +010092 ":codec_globals_headers",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000093 ":video_coding_utility",
Zeke Chin71f6f442015-06-29 14:34:58 -070094 ":webrtc_h264",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000095 ":webrtc_i420",
Emircan Uysalerdbcac7f2017-10-30 23:10:12 -070096 ":webrtc_stereo",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000097 ":webrtc_vp8",
marpan@webrtc.org5b883172014-11-01 06:10:48 +000098 ":webrtc_vp9",
mbonadei1140f972017-04-26 03:38:35 -070099 "..:module_api",
Ilya Nikolaevskiy76f2a852017-11-16 14:33:53 +0100100 "..:module_api_public",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000101 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -0700102 "../../api:optional",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100103 "../../api:video_frame_api_i420",
aleloi440b6d92017-08-22 05:43:23 -0700104 "../../call:video_stream_api",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000105 "../../common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700106 "../../rtc_base:rtc_base",
107 "../../rtc_base:rtc_base_approved",
108 "../../rtc_base:rtc_numerics",
109 "../../rtc_base:rtc_task_queue",
110 "../../rtc_base:sequenced_task_checker",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000111 "../../system_wrappers",
ilnik6d5b4d62017-08-30 03:32:14 -0700112 "../pacing",
ehmaldonado36df2d72016-12-08 09:56:16 -0800113 "../rtp_rtcp:rtp_rtcp",
114 "../utility:utility",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000115 ]
116}
117
charujaincb728ea2017-09-18 03:08:08 -0700118rtc_source_set("mock_headers") {
119 testonly = true
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000120 sources = [
charujaincb728ea2017-09-18 03:08:08 -0700121 "codecs/interface/mock/mock_video_codec_interface.h",
122 "include/mock/mock_video_codec_interface.h",
123 ]
124 deps = [
125 ":video_coding_utility",
126 "../..:webrtc_common",
127 "../../test:test_support",
128 ]
129}
130
131rtc_source_set("codec_globals_headers") {
132 sources = [
133 "codecs/h264/include/h264_globals.h",
134 "codecs/interface/common_constants.h",
Emircan Uysaler90612a62017-11-28 09:45:25 -0800135 "codecs/stereo/include/stereo_globals.h",
charujaincb728ea2017-09-18 03:08:08 -0700136 "codecs/vp8/include/vp8_globals.h",
137 "codecs/vp9/include/vp9_globals.h",
138 ]
139}
140
141rtc_source_set("video_coding_utility") {
142 sources = [
143 "codecs/interface/video_codec_interface.h",
144 "codecs/interface/video_error_codes.h",
Erik Språng08127a92016-11-16 16:41:30 +0100145 "utility/default_video_bitrate_allocator.cc",
146 "utility/default_video_bitrate_allocator.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000147 "utility/frame_dropper.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100148 "utility/frame_dropper.h",
sprang3911c262016-04-15 01:24:14 -0700149 "utility/ivf_file_writer.cc",
150 "utility/ivf_file_writer.h",
kthelgason194f40a2016-09-14 02:14:58 -0700151 "utility/moving_average.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100152 "utility/moving_average.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000153 "utility/quality_scaler.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100154 "utility/quality_scaler.h",
jackychen98d8cf52015-05-21 11:12:02 -0700155 "utility/vp8_header_parser.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100156 "utility/vp8_header_parser.h",
jianj20acdf22017-05-24 10:00:16 -0700157 "utility/vp9_uncompressed_header_parser.cc",
158 "utility/vp9_uncompressed_header_parser.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000159 ]
160
kjellandere40a7ee2016-10-16 23:56:12 -0700161 if (!build_with_chromium && is_clang) {
162 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700163 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000164 }
165
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200166 deps = [
mbonadei1140f972017-04-26 03:38:35 -0700167 "..:module_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800168 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -0700169 "../../api:optional",
ilnikd60d06a2017-04-05 03:02:20 -0700170 "../../api/video_codecs:video_codecs_api",
perkj4e417b22016-07-14 23:35:55 -0700171 "../../common_video",
kjellandera8d8aad2017-03-08 05:42:26 -0800172 "../../modules/rtp_rtcp:rtp_rtcp",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700173 "../../rtc_base:rtc_base_approved",
174 "../../rtc_base:rtc_numerics",
175 "../../rtc_base:rtc_task_queue",
176 "../../rtc_base:sequenced_task_checker",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200177 "../../system_wrappers",
178 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000179}
180
kjellanderb62dbbe2016-09-23 00:38:52 -0700181rtc_static_library("webrtc_h264") {
Zeke Chin71f6f442015-06-29 14:34:58 -0700182 sources = [
183 "codecs/h264/h264.cc",
184 "codecs/h264/include/h264.h",
185 ]
186
kjellandere40a7ee2016-10-16 23:56:12 -0700187 if (!build_with_chromium && is_clang) {
188 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700189 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Zeke Chin71f6f442015-06-29 14:34:58 -0700190 }
191
hbosbab934b2016-01-27 01:36:03 -0800192 defines = []
Zeke Chin71f6f442015-06-29 14:34:58 -0700193 deps = [
ehmaldonado36df2d72016-12-08 09:56:16 -0800194 ":video_coding_utility",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100195 "../../api:video_frame_api_i420",
Magnus Jedvert849b3ae2017-09-29 17:54:09 +0200196 "../../api/video_codecs:video_codecs_api",
magjed21d110f2017-02-28 00:28:04 -0800197 "../../media:rtc_media_base",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700198 "../../rtc_base:rtc_base_approved",
Zeke Chin71f6f442015-06-29 14:34:58 -0700199 "../../system_wrappers",
200 ]
hbosa9a1d2a2016-01-11 10:19:02 -0800201
hbos902c03e2016-01-21 03:34:40 -0800202 if (rtc_use_h264) {
hbos9dc59282016-02-03 05:09:37 -0800203 defines += [ "WEBRTC_USE_H264" ]
hbosc5a39c22016-02-02 02:26:05 -0800204 if (rtc_initialize_ffmpeg) {
205 defines += [ "WEBRTC_INITIALIZE_FFMPEG" ]
206 }
hbosbab934b2016-01-27 01:36:03 -0800207 sources += [
208 "codecs/h264/h264_decoder_impl.cc",
209 "codecs/h264/h264_decoder_impl.h",
210 "codecs/h264/h264_encoder_impl.cc",
211 "codecs/h264/h264_encoder_impl.h",
212 ]
hbosa9a1d2a2016-01-11 10:19:02 -0800213 deps += [
kjellanderf6b55092016-02-07 23:04:26 -0800214 "../../common_video",
hta9aa96882016-12-06 05:36:03 -0800215 "../../media:rtc_media_base",
hbosa9a1d2a2016-01-11 10:19:02 -0800216 "//third_party/ffmpeg:ffmpeg",
217 "//third_party/openh264:encoder",
218 ]
219 }
Zeke Chin71f6f442015-06-29 14:34:58 -0700220}
221
kjellanderb62dbbe2016-09-23 00:38:52 -0700222rtc_static_library("webrtc_i420") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000223 sources = [
Henrik Kjellandera74c08d2015-10-22 12:23:11 +0200224 "codecs/i420/i420.cc",
225 "codecs/i420/include/i420.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000226 ]
227
kjellandere40a7ee2016-10-16 23:56:12 -0700228 if (!build_with_chromium && is_clang) {
229 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700230 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000231 }
232
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200233 deps = [
charujaincb728ea2017-09-18 03:08:08 -0700234 ":video_coding_utility",
ehmaldonado36df2d72016-12-08 09:56:16 -0800235 "../..:webrtc_common",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100236 "../../api:video_frame_api_i420",
ehmaldonado36df2d72016-12-08 09:56:16 -0800237 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700238 "../../rtc_base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200239 "../../system_wrappers",
240 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000241}
242
Emircan Uysalerdbcac7f2017-10-30 23:10:12 -0700243rtc_static_library("webrtc_stereo") {
244 sources = [
245 "codecs/stereo/include/stereo_decoder_adapter.h",
246 "codecs/stereo/include/stereo_encoder_adapter.h",
247 "codecs/stereo/stereo_decoder_adapter.cc",
248 "codecs/stereo/stereo_encoder_adapter.cc",
249 ]
250
251 if (!build_with_chromium && is_clang) {
252 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
253 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
254 }
255
256 deps = [
257 ":video_coding_utility",
258 "..:module_api",
259 "../..:webrtc_common",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100260 "../../api:video_frame_api_i420",
Emircan Uysalerdbcac7f2017-10-30 23:10:12 -0700261 "../../api/video_codecs:video_codecs_api",
262 "../../common_video:common_video",
263 "../../rtc_base:rtc_base_approved",
264 "../../system_wrappers",
265 ]
266}
267
kjellanderb62dbbe2016-09-23 00:38:52 -0700268rtc_static_library("webrtc_vp8") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000269 sources = [
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000270 "codecs/vp8/default_temporal_layers.cc",
271 "codecs/vp8/default_temporal_layers.h",
pbos@webrtc.org9115cde2014-12-09 10:36:40 +0000272 "codecs/vp8/include/vp8.h",
273 "codecs/vp8/include/vp8_common_types.h",
pbos@webrtc.org9115cde2014-12-09 10:36:40 +0000274 "codecs/vp8/screenshare_layers.cc",
275 "codecs/vp8/screenshare_layers.h",
kjellandera8d8aad2017-03-08 05:42:26 -0800276 "codecs/vp8/simulcast_rate_allocator.cc",
277 "codecs/vp8/simulcast_rate_allocator.h",
Ilya Nikolaevskiy58662912017-10-04 15:07:09 +0200278 "codecs/vp8/temporal_layers.cc",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000279 "codecs/vp8/temporal_layers.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000280 "codecs/vp8/vp8_impl.cc",
281 "codecs/vp8/vp8_impl.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000282 ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000283
kjellander8f4419b2016-06-02 02:09:52 -0700284 # TODO(jschuh): Bug 1348: fix this warning.
285 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
286
kjellandere40a7ee2016-10-16 23:56:12 -0700287 if (!build_with_chromium && is_clang) {
288 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700289 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000290 }
291
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000292 deps = [
293 ":video_coding_utility",
mbonadei1140f972017-04-26 03:38:35 -0700294 "..:module_api",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000295 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -0700296 "../../api:optional",
ilnikd60d06a2017-04-05 03:02:20 -0700297 "../../api/video_codecs:video_codecs_api",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000298 "../../common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700299 "../../rtc_base:rtc_base_approved",
asaperssone5d02f92017-08-09 23:37:05 -0700300 "../../rtc_base:rtc_numerics",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700301 "../../rtc_base:sequenced_task_checker",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000302 "../../system_wrappers",
303 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000304 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200305 deps += [ rtc_libvpx_dir ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000306 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000307}
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000308
kjellanderb62dbbe2016-09-23 00:38:52 -0700309rtc_static_library("webrtc_vp9") {
phoglund33603522016-10-05 06:52:22 -0700310 if (rtc_libvpx_build_vp9) {
311 sources = [
312 "codecs/vp9/include/vp9.h",
313 "codecs/vp9/screenshare_layers.cc",
314 "codecs/vp9/screenshare_layers.h",
315 "codecs/vp9/vp9_frame_buffer_pool.cc",
316 "codecs/vp9/vp9_frame_buffer_pool.h",
317 "codecs/vp9/vp9_impl.cc",
318 "codecs/vp9/vp9_impl.h",
319 ]
320 } else {
321 sources = [
322 "codecs/vp9/vp9_noop.cc",
323 ]
324 }
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000325
kjellandere40a7ee2016-10-16 23:56:12 -0700326 if (!build_with_chromium && is_clang) {
327 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700328 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000329 }
330
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000331 deps = [
332 ":video_coding_utility",
mbonadei1140f972017-04-26 03:38:35 -0700333 "..:module_api",
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000334 "../../common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700335 "../../rtc_base:rtc_base_approved",
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000336 "../../system_wrappers",
337 ]
338 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200339 deps += [ rtc_libvpx_dir ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000340 }
341}
kjellanderfb114242016-06-13 00:19:48 -0700342
343if (rtc_include_tests) {
magjed73c0eb52017-08-07 06:55:28 -0700344 if (is_ios || is_mac) {
kthelgason36d658d2017-08-24 05:43:45 -0700345 rtc_static_library("codec_test_objc") {
magjed73c0eb52017-08-07 06:55:28 -0700346 sources = [
347 "codecs/test/objc_codec_h264_test.h",
348 "codecs/test/objc_codec_h264_test.mm",
349 ]
350 deps = [
351 "../../api:video_frame_api",
352 "../../api/video_codecs:video_codecs_api",
353 "../../media:rtc_audio_video",
354 "../../modules:module_api",
kthelgason36d658d2017-08-24 05:43:45 -0700355 "../../sdk:common_objc",
356 "../../sdk:peerconnection_objc",
357 "../../sdk:peerconnectionfactory_objc",
358 "../../sdk:videotoolbox_objc",
359 "../../sdk:videotracksource_objc",
magjed73c0eb52017-08-07 06:55:28 -0700360 ]
361
362 if (!build_with_chromium && is_clang) {
363 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
364 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
365 }
366 }
367 }
368
magjed6cc25612017-07-10 03:26:36 -0700369 rtc_source_set("simulcast_test_utility") {
370 testonly = true
371 sources = [
372 "codecs/vp8/simulcast_test_utility.h",
373 ]
374
375 if (!build_with_chromium && is_clang) {
376 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
377 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
378 }
379
380 deps = [
charujaincb728ea2017-09-18 03:08:08 -0700381 ":mock_headers",
magjed6cc25612017-07-10 03:26:36 -0700382 ":video_coding",
383 ":webrtc_vp8",
384 "../../api:video_frame_api",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100385 "../../api:video_frame_api_i420",
magjed6cc25612017-07-10 03:26:36 -0700386 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700387 "../../rtc_base:rtc_base_approved",
magjed6cc25612017-07-10 03:26:36 -0700388 "../../test:test_support",
389 ]
390 }
391
ehmaldonado38a21322016-09-02 04:10:34 -0700392 rtc_source_set("video_codecs_test_framework") {
kjellanderfb114242016-06-13 00:19:48 -0700393 testonly = true
394 sources = [
395 "codecs/test/mock/mock_packet_manipulator.h",
396 "codecs/test/packet_manipulator.cc",
397 "codecs/test/packet_manipulator.h",
kjellanderfb114242016-06-13 00:19:48 -0700398 "codecs/test/stats.cc",
399 "codecs/test/stats.h",
Åsa Persson2d27fb52017-10-19 14:05:50 +0200400 "codecs/test/test_config.cc",
401 "codecs/test/test_config.h",
sakalb8102e02017-03-06 03:52:55 -0800402 "codecs/test/video_codec_test.cc",
403 "codecs/test/video_codec_test.h",
kjellanderfb114242016-06-13 00:19:48 -0700404 "codecs/test/videoprocessor.cc",
405 "codecs/test/videoprocessor.h",
406 ]
407
kjellandere40a7ee2016-10-16 23:56:12 -0700408 if (!build_with_chromium && is_clang) {
409 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700410 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -0700411 }
412
413 deps = [
ssilkin612f8582017-09-28 09:23:17 -0700414 ":codec_globals_headers",
ehmaldonado36df2d72016-12-08 09:56:16 -0800415 ":video_coding",
416 ":video_coding_utility",
kjellandera8d8aad2017-03-08 05:42:26 -0800417 ":webrtc_vp8",
ehmaldonado36df2d72016-12-08 09:56:16 -0800418 "../..:webrtc_common",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100419 "../../api:video_frame_api_i420",
ilnikd60d06a2017-04-05 03:02:20 -0700420 "../../api/video_codecs:video_codecs_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800421 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700422 "../../rtc_base:rtc_base_approved",
brandtrc8c59052017-08-21 06:44:16 -0700423 "../../rtc_base:rtc_task_queue",
424 "../../rtc_base:sequenced_task_checker",
ehmaldonado36df2d72016-12-08 09:56:16 -0800425 "../../system_wrappers:system_wrappers",
kjellanderfb114242016-06-13 00:19:48 -0700426 "../../test:test_support",
sakalb8102e02017-03-06 03:52:55 -0800427 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800428 "../../test:video_test_support",
kjellanderfb114242016-06-13 00:19:48 -0700429 ]
430 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800431
brandtrdf232992017-09-07 07:50:06 -0700432 video_coding_modules_tests_resources = [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200433 "../../resources/foreman_128x96.yuv",
434 "../../resources/foreman_160x120.yuv",
435 "../../resources/foreman_176x144.yuv",
436 "../../resources/foreman_320x240.yuv",
brandtrdf232992017-09-07 07:50:06 -0700437 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800438
brandtrdf232992017-09-07 07:50:06 -0700439 if (is_ios || is_mac) {
440 bundle_data("video_coding_modules_tests_resources_bundle_data") {
441 testonly = true
442 sources = video_coding_modules_tests_resources
443 outputs = [
444 "{{bundle_resources_dir}}/{{source_file_part}}",
brandtr6bb8e0e2017-02-20 04:35:52 -0800445 ]
brandtr12a47f62017-09-01 00:10:27 -0700446 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800447 }
448
449 rtc_source_set("video_coding_modules_tests") {
450 testonly = true
451
452 sources = [
sakalb8102e02017-03-06 03:52:55 -0800453 "codecs/h264/test/h264_impl_unittest.cc",
Emircan Uysalerdbcac7f2017-10-30 23:10:12 -0700454 "codecs/stereo/test/stereo_adapter_unittest.cc",
brandtrdf232992017-09-07 07:50:06 -0700455 "codecs/test/videoprocessor_integrationtest.cc",
456 "codecs/test/videoprocessor_integrationtest.h",
brandtr12a47f62017-09-01 00:10:27 -0700457 "codecs/test/videoprocessor_integrationtest_libvpx.cc",
458 "codecs/test/videoprocessor_integrationtest_openh264.cc",
brandtrdf232992017-09-07 07:50:06 -0700459 "codecs/test/videoprocessor_integrationtest_parameterized.cc",
brandtr6bb8e0e2017-02-20 04:35:52 -0800460 "codecs/vp8/test/vp8_impl_unittest.cc",
sakal7adadb12017-02-23 02:54:57 -0800461 "codecs/vp9/test/vp9_impl_unittest.cc",
brandtr6bb8e0e2017-02-20 04:35:52 -0800462 ]
463
464 deps = [
sakalb8102e02017-03-06 03:52:55 -0800465 ":video_codecs_test_framework",
brandtrdf232992017-09-07 07:50:06 -0700466 ":video_coding",
467 ":video_coding_utility",
sakalb8102e02017-03-06 03:52:55 -0800468 ":webrtc_h264",
Emircan Uysalerdbcac7f2017-10-30 23:10:12 -0700469 ":webrtc_stereo",
brandtr6bb8e0e2017-02-20 04:35:52 -0800470 ":webrtc_vp8",
sakal7adadb12017-02-23 02:54:57 -0800471 ":webrtc_vp9",
brandtrdf232992017-09-07 07:50:06 -0700472 "../..:webrtc_common",
Emircan Uysalerdbcac7f2017-10-30 23:10:12 -0700473 "../../api:mock_video_codec_factory",
kwiberg84f6a3f2017-09-05 08:43:13 -0700474 "../../api:optional",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800475 "../../api:video_frame_api",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100476 "../../api:video_frame_api_i420",
brandtrdf232992017-09-07 07:50:06 -0700477 "../../common_video",
478 "../../media:rtc_audio_video",
Rasmus Brandtfb1a8662017-10-27 14:51:46 +0200479 "../../media:rtc_media_base",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700480 "../../rtc_base:rtc_base_approved",
Åsa Persson7173cf22017-10-19 12:14:09 +0200481 "../../rtc_base:rtc_base_tests_utils",
brandtrdf232992017-09-07 07:50:06 -0700482 "../../system_wrappers",
asapersson142fcc92017-08-17 08:58:54 -0700483 "../../test:field_trial",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800484 "../../test:test_support",
485 "../../test:video_test_common",
brandtrdf232992017-09-07 07:50:06 -0700486 "../../test:video_test_support",
ehmaldonado656610f2017-02-06 02:21:11 -0800487 "../video_capture",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800488 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800489
brandtrdf232992017-09-07 07:50:06 -0700490 data = video_coding_modules_tests_resources
brandtr6bb8e0e2017-02-20 04:35:52 -0800491
492 if (is_android) {
Rasmus Brandt31027342017-09-29 13:48:12 +0000493 sources += [
494 "codecs/test/android_test_initializer.cc",
495 "codecs/test/android_test_initializer.h",
496 "codecs/test/videoprocessor_integrationtest_mediacodec.cc",
497 ]
498
brandtrdf232992017-09-07 07:50:06 -0700499 deps += [
Rasmus Brandt31027342017-09-29 13:48:12 +0000500 "../../sdk/android:libjingle_peerconnection_jni",
501 "//base",
brandtrdf232992017-09-07 07:50:06 -0700502 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800503 }
504
505 if (is_ios || is_mac) {
Rasmus Brandtf7a35582017-10-24 10:16:33 +0200506 sources +=
507 [ "codecs/test/videoprocessor_integrationtest_videotoolbox.cc" ]
508
magjed73c0eb52017-08-07 06:55:28 -0700509 deps += [
kthelgason36d658d2017-08-24 05:43:45 -0700510 ":codec_test_objc",
brandtrdf232992017-09-07 07:50:06 -0700511 ":video_coding_modules_tests_resources_bundle_data",
Rasmus Brandt31027342017-09-29 13:48:12 +0000512 "../../media:rtc_media_base",
513 "../../sdk:videotoolbox_objc",
magjed73c0eb52017-08-07 06:55:28 -0700514 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800515 }
516
brandtrdf232992017-09-07 07:50:06 -0700517 if (rtc_use_h264) {
518 defines = [ "WEBRTC_USE_H264" ]
519 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800520
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800521 if (!build_with_chromium && is_clang) {
522 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
523 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
524 }
525 }
526
ehmaldonado36268652017-01-19 08:27:11 -0800527 rtc_source_set("video_coding_unittests") {
528 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700529
ehmaldonado36268652017-01-19 08:27:11 -0800530 sources = [
531 "codecs/test/packet_manipulator_unittest.cc",
532 "codecs/test/stats_unittest.cc",
Åsa Persson2d27fb52017-10-19 14:05:50 +0200533 "codecs/test/test_config_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800534 "codecs/test/videoprocessor_unittest.cc",
535 "codecs/vp8/default_temporal_layers_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800536 "codecs/vp8/screenshare_layers_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800537 "codecs/vp8/simulcast_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800538 "decoding_state_unittest.cc",
539 "frame_buffer2_unittest.cc",
ilnik04f4d122017-06-19 07:18:55 -0700540 "generic_encoder_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800541 "h264_sprop_parameter_sets_unittest.cc",
542 "h264_sps_pps_tracker_unittest.cc",
543 "histogram_unittest.cc",
544 "include/mock/mock_vcm_callbacks.h",
545 "jitter_buffer_unittest.cc",
546 "jitter_estimator_tests.cc",
547 "nack_module_unittest.cc",
548 "protection_bitrate_calculator_unittest.cc",
549 "receiver_unittest.cc",
550 "rtp_frame_reference_finder_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800551 "session_info_unittest.cc",
552 "test/stream_generator.cc",
553 "test/stream_generator.h",
charujaincb728ea2017-09-18 03:08:08 -0700554 "test/test_util.h",
ehmaldonado36268652017-01-19 08:27:11 -0800555 "timing_unittest.cc",
556 "utility/default_video_bitrate_allocator_unittest.cc",
557 "utility/frame_dropper_unittest.cc",
558 "utility/ivf_file_writer_unittest.cc",
charujaincb728ea2017-09-18 03:08:08 -0700559 "utility/mock/mock_frame_dropper.h",
ehmaldonado36268652017-01-19 08:27:11 -0800560 "utility/moving_average_unittest.cc",
561 "utility/quality_scaler_unittest.cc",
562 "utility/simulcast_rate_allocator_unittest.cc",
sprang429600d2017-01-26 06:12:26 -0800563 "video_codec_initializer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800564 "video_packet_buffer_unittest.cc",
565 "video_receiver_unittest.cc",
566 "video_sender_unittest.cc",
567 ]
568 if (rtc_libvpx_build_vp9) {
569 sources += [ "codecs/vp9/vp9_screenshare_layers_unittest.cc" ]
570 }
571 if (rtc_use_h264) {
572 sources += [ "codecs/h264/h264_encoder_impl_unittest.cc" ]
573 }
574 deps = [
charujaincb728ea2017-09-18 03:08:08 -0700575 ":mock_headers",
magjed6cc25612017-07-10 03:26:36 -0700576 ":simulcast_test_utility",
ehmaldonado36268652017-01-19 08:27:11 -0800577 ":video_codecs_test_framework",
578 ":video_coding",
579 ":video_coding_utility",
580 ":webrtc_h264",
581 ":webrtc_vp8",
582 ":webrtc_vp9",
mbonadei1140f972017-04-26 03:38:35 -0700583 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -0800584 "../..:webrtc_common",
585 "../../api:video_frame_api",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100586 "../../api:video_frame_api_i420",
ilnikd60d06a2017-04-05 03:02:20 -0700587 "../../api/video_codecs:video_codecs_api",
ehmaldonado36268652017-01-19 08:27:11 -0800588 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700589 "../../rtc_base:rtc_base",
590 "../../rtc_base:rtc_base_approved",
Bjorn Tereliusa194e582017-10-25 13:07:09 +0200591 "../../rtc_base:rtc_numerics",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700592 "../../rtc_base:rtc_task_queue",
ehmaldonado36268652017-01-19 08:27:11 -0800593 "../../system_wrappers:metrics_default",
594 "../../system_wrappers:system_wrappers",
595 "../../test:field_trial",
596 "../../test:test_support",
597 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800598 "../../test:video_test_support",
ehmaldonado36268652017-01-19 08:27:11 -0800599 "../rtp_rtcp:rtp_rtcp",
600 "//testing/gmock",
601 ]
602 if (rtc_build_libvpx) {
603 deps += [ rtc_libvpx_dir ]
604 }
605 if (is_win) {
606 cflags = [
607 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
608 "/wd4373", # virtual function override.
609 ]
610 }
611
612 # TODO(jschuh): bugs.webrtc.org/1348: fix this warning.
613 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
614 if (!build_with_chromium && is_clang) {
615 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
616 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
617 }
618 }
kjellanderfb114242016-06-13 00:19:48 -0700619}