blob: 71e9333bde130d74934dba9ece86d41c2e4c4de5 [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.h",
Ying Wange58e91b2017-12-18 14:49:46 +010061 "protection_bitrate_calculator_default.cc",
62 "protection_bitrate_calculator_default.h",
kjellandera8d8aad2017-03-08 05:42:26 -080063 "qp_parser.cc",
64 "qp_parser.h",
Henrik Kjellander2557b862015-11-18 22:00:21 +010065 "receiver.cc",
66 "receiver.h",
philipel02447bc2016-05-13 06:01:03 -070067 "rtp_frame_reference_finder.cc",
68 "rtp_frame_reference_finder.h",
Henrik Kjellander2557b862015-11-18 22:00:21 +010069 "rtt_filter.cc",
70 "rtt_filter.h",
71 "session_info.cc",
72 "session_info.h",
73 "timestamp_map.cc",
74 "timestamp_map.h",
75 "timing.cc",
76 "timing.h",
Erik Språng08127a92016-11-16 16:41:30 +010077 "video_codec_initializer.cc",
Henrik Kjellander2557b862015-11-18 22:00:21 +010078 "video_coding_impl.cc",
79 "video_coding_impl.h",
80 "video_receiver.cc",
81 "video_sender.cc",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000082 ]
83
kjellander8f4419b2016-06-02 02:09:52 -070084 # TODO(jschuh): Bug 1348: fix this warning.
85 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +000086
kjellandere40a7ee2016-10-16 23:56:12 -070087 if (!build_with_chromium && is_clang) {
88 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070089 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +000090 }
91
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000092 deps = [
Rasmus Brandt88f080a2017-11-02 14:28:06 +010093 ":codec_globals_headers",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000094 ":video_coding_utility",
Zeke Chin71f6f442015-06-29 14:34:58 -070095 ":webrtc_h264",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000096 ":webrtc_i420",
Emircan Uysalerdbcac7f2017-10-30 23:10:12 -070097 ":webrtc_stereo",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000098 ":webrtc_vp8",
marpan@webrtc.org5b883172014-11-01 06:10:48 +000099 ":webrtc_vp9",
mbonadei1140f972017-04-26 03:38:35 -0700100 "..:module_api",
Ilya Nikolaevskiy76f2a852017-11-16 14:33:53 +0100101 "..:module_api_public",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000102 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100103 "../../:typedefs",
kwiberg84f6a3f2017-09-05 08:43:13 -0700104 "../../api:optional",
Mirko Bonadei0594a7c2017-12-18 11:42:48 +0100105 "../../api:video_frame_api",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100106 "../../api:video_frame_api_i420",
aleloi440b6d92017-08-22 05:43:23 -0700107 "../../call:video_stream_api",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000108 "../../common_video",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100109 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700110 "../../rtc_base:rtc_base",
111 "../../rtc_base:rtc_base_approved",
112 "../../rtc_base:rtc_numerics",
113 "../../rtc_base:rtc_task_queue",
114 "../../rtc_base:sequenced_task_checker",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000115 "../../system_wrappers",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100116 "../../system_wrappers:field_trial_api",
117 "../../system_wrappers:metrics_api",
ilnik6d5b4d62017-08-30 03:32:14 -0700118 "../pacing",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100119 "../rtp_rtcp:rtp_rtcp_format",
ehmaldonado36df2d72016-12-08 09:56:16 -0800120 "../utility:utility",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000121 ]
122}
123
charujaincb728ea2017-09-18 03:08:08 -0700124rtc_source_set("mock_headers") {
125 testonly = true
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000126 sources = [
charujaincb728ea2017-09-18 03:08:08 -0700127 "codecs/interface/mock/mock_video_codec_interface.h",
128 "include/mock/mock_video_codec_interface.h",
129 ]
130 deps = [
131 ":video_coding_utility",
132 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100133 "../../:typedefs",
charujaincb728ea2017-09-18 03:08:08 -0700134 "../../test:test_support",
135 ]
136}
137
138rtc_source_set("codec_globals_headers") {
139 sources = [
140 "codecs/h264/include/h264_globals.h",
141 "codecs/interface/common_constants.h",
Emircan Uysaler90612a62017-11-28 09:45:25 -0800142 "codecs/stereo/include/stereo_globals.h",
charujaincb728ea2017-09-18 03:08:08 -0700143 "codecs/vp8/include/vp8_globals.h",
144 "codecs/vp9/include/vp9_globals.h",
145 ]
146}
147
148rtc_source_set("video_coding_utility") {
149 sources = [
150 "codecs/interface/video_codec_interface.h",
151 "codecs/interface/video_error_codes.h",
Erik Språng08127a92016-11-16 16:41:30 +0100152 "utility/default_video_bitrate_allocator.cc",
153 "utility/default_video_bitrate_allocator.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000154 "utility/frame_dropper.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100155 "utility/frame_dropper.h",
sprang3911c262016-04-15 01:24:14 -0700156 "utility/ivf_file_writer.cc",
157 "utility/ivf_file_writer.h",
kthelgason194f40a2016-09-14 02:14:58 -0700158 "utility/moving_average.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100159 "utility/moving_average.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000160 "utility/quality_scaler.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100161 "utility/quality_scaler.h",
jackychen98d8cf52015-05-21 11:12:02 -0700162 "utility/vp8_header_parser.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100163 "utility/vp8_header_parser.h",
jianj20acdf22017-05-24 10:00:16 -0700164 "utility/vp9_uncompressed_header_parser.cc",
165 "utility/vp9_uncompressed_header_parser.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000166 ]
167
kjellandere40a7ee2016-10-16 23:56:12 -0700168 if (!build_with_chromium && is_clang) {
169 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700170 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000171 }
172
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200173 deps = [
mbonadei1140f972017-04-26 03:38:35 -0700174 "..:module_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800175 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100176 "../../:typedefs",
kwiberg84f6a3f2017-09-05 08:43:13 -0700177 "../../api:optional",
ilnikd60d06a2017-04-05 03:02:20 -0700178 "../../api/video_codecs:video_codecs_api",
perkj4e417b22016-07-14 23:35:55 -0700179 "../../common_video",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100180 "../../modules/rtp_rtcp",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100181 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700182 "../../rtc_base:rtc_base_approved",
183 "../../rtc_base:rtc_numerics",
184 "../../rtc_base:rtc_task_queue",
185 "../../rtc_base:sequenced_task_checker",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200186 "../../system_wrappers",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100187 "../rtp_rtcp:rtp_rtcp_format",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200188 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000189}
190
kjellanderb62dbbe2016-09-23 00:38:52 -0700191rtc_static_library("webrtc_h264") {
Zeke Chin71f6f442015-06-29 14:34:58 -0700192 sources = [
193 "codecs/h264/h264.cc",
194 "codecs/h264/include/h264.h",
195 ]
196
kjellandere40a7ee2016-10-16 23:56:12 -0700197 if (!build_with_chromium && is_clang) {
198 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700199 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Zeke Chin71f6f442015-06-29 14:34:58 -0700200 }
201
hbosbab934b2016-01-27 01:36:03 -0800202 defines = []
Zeke Chin71f6f442015-06-29 14:34:58 -0700203 deps = [
ehmaldonado36df2d72016-12-08 09:56:16 -0800204 ":video_coding_utility",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100205 "../../api:video_frame_api_i420",
Magnus Jedvert849b3ae2017-09-29 17:54:09 +0200206 "../../api/video_codecs:video_codecs_api",
magjed21d110f2017-02-28 00:28:04 -0800207 "../../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100208 "../../rtc_base:checks",
Patrik Höglund76df0df2017-12-19 11:50:21 +0100209 "../../rtc_base:rtc_base",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100210 "../../system_wrappers:metrics_api",
Zeke Chin71f6f442015-06-29 14:34:58 -0700211 ]
hbosa9a1d2a2016-01-11 10:19:02 -0800212
hbos902c03e2016-01-21 03:34:40 -0800213 if (rtc_use_h264) {
hbos9dc59282016-02-03 05:09:37 -0800214 defines += [ "WEBRTC_USE_H264" ]
hbosc5a39c22016-02-02 02:26:05 -0800215 if (rtc_initialize_ffmpeg) {
216 defines += [ "WEBRTC_INITIALIZE_FFMPEG" ]
217 }
hbosbab934b2016-01-27 01:36:03 -0800218 sources += [
219 "codecs/h264/h264_decoder_impl.cc",
220 "codecs/h264/h264_decoder_impl.h",
221 "codecs/h264/h264_encoder_impl.cc",
222 "codecs/h264/h264_encoder_impl.h",
223 ]
hbosa9a1d2a2016-01-11 10:19:02 -0800224 deps += [
kjellanderf6b55092016-02-07 23:04:26 -0800225 "../../common_video",
hta9aa96882016-12-06 05:36:03 -0800226 "../../media:rtc_media_base",
hbosa9a1d2a2016-01-11 10:19:02 -0800227 "//third_party/ffmpeg:ffmpeg",
228 "//third_party/openh264:encoder",
229 ]
230 }
Zeke Chin71f6f442015-06-29 14:34:58 -0700231}
232
kjellanderb62dbbe2016-09-23 00:38:52 -0700233rtc_static_library("webrtc_i420") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000234 sources = [
Henrik Kjellandera74c08d2015-10-22 12:23:11 +0200235 "codecs/i420/i420.cc",
236 "codecs/i420/include/i420.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000237 ]
238
kjellandere40a7ee2016-10-16 23:56:12 -0700239 if (!build_with_chromium && is_clang) {
240 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700241 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000242 }
243
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200244 deps = [
charujaincb728ea2017-09-18 03:08:08 -0700245 ":video_coding_utility",
ehmaldonado36df2d72016-12-08 09:56:16 -0800246 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100247 "../../:typedefs",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100248 "../../api:video_frame_api_i420",
ehmaldonado36df2d72016-12-08 09:56:16 -0800249 "../../common_video:common_video",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100250 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700251 "../../rtc_base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200252 "../../system_wrappers",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100253 "//third_party/libyuv",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200254 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000255}
256
Emircan Uysalerdbcac7f2017-10-30 23:10:12 -0700257rtc_static_library("webrtc_stereo") {
258 sources = [
259 "codecs/stereo/include/stereo_decoder_adapter.h",
260 "codecs/stereo/include/stereo_encoder_adapter.h",
261 "codecs/stereo/stereo_decoder_adapter.cc",
262 "codecs/stereo/stereo_encoder_adapter.cc",
263 ]
264
265 if (!build_with_chromium && is_clang) {
266 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
267 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
268 }
269
270 deps = [
271 ":video_coding_utility",
272 "..:module_api",
273 "../..:webrtc_common",
Mirko Bonadei0594a7c2017-12-18 11:42:48 +0100274 "../../api:video_frame_api",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100275 "../../api:video_frame_api_i420",
Emircan Uysalerdbcac7f2017-10-30 23:10:12 -0700276 "../../api/video_codecs:video_codecs_api",
277 "../../common_video:common_video",
Patrik Höglund76df0df2017-12-19 11:50:21 +0100278 "../../rtc_base:rtc_base",
Emircan Uysalerdbcac7f2017-10-30 23:10:12 -0700279 "../../system_wrappers",
280 ]
281}
282
kjellanderb62dbbe2016-09-23 00:38:52 -0700283rtc_static_library("webrtc_vp8") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000284 sources = [
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000285 "codecs/vp8/default_temporal_layers.cc",
286 "codecs/vp8/default_temporal_layers.h",
pbos@webrtc.org9115cde2014-12-09 10:36:40 +0000287 "codecs/vp8/include/vp8.h",
288 "codecs/vp8/include/vp8_common_types.h",
pbos@webrtc.org9115cde2014-12-09 10:36:40 +0000289 "codecs/vp8/screenshare_layers.cc",
290 "codecs/vp8/screenshare_layers.h",
kjellandera8d8aad2017-03-08 05:42:26 -0800291 "codecs/vp8/simulcast_rate_allocator.cc",
292 "codecs/vp8/simulcast_rate_allocator.h",
Ilya Nikolaevskiy58662912017-10-04 15:07:09 +0200293 "codecs/vp8/temporal_layers.cc",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000294 "codecs/vp8/temporal_layers.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000295 "codecs/vp8/vp8_impl.cc",
296 "codecs/vp8/vp8_impl.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000297 ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000298
kjellander8f4419b2016-06-02 02:09:52 -0700299 # TODO(jschuh): Bug 1348: fix this warning.
300 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
301
kjellandere40a7ee2016-10-16 23:56:12 -0700302 if (!build_with_chromium && is_clang) {
303 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700304 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000305 }
306
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000307 deps = [
308 ":video_coding_utility",
mbonadei1140f972017-04-26 03:38:35 -0700309 "..:module_api",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000310 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100311 "../../:typedefs",
kwiberg84f6a3f2017-09-05 08:43:13 -0700312 "../../api:optional",
Mirko Bonadei0594a7c2017-12-18 11:42:48 +0100313 "../../api:video_frame_api",
ilnikd60d06a2017-04-05 03:02:20 -0700314 "../../api/video_codecs:video_codecs_api",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000315 "../../common_video",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100316 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700317 "../../rtc_base:rtc_base_approved",
asaperssone5d02f92017-08-09 23:37:05 -0700318 "../../rtc_base:rtc_numerics",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700319 "../../rtc_base:sequenced_task_checker",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000320 "../../system_wrappers",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100321 "../../system_wrappers:field_trial_api",
322 "../../system_wrappers:metrics_api",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100323 "//third_party/libyuv",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000324 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000325 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200326 deps += [ rtc_libvpx_dir ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000327 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000328}
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000329
kjellanderb62dbbe2016-09-23 00:38:52 -0700330rtc_static_library("webrtc_vp9") {
phoglund33603522016-10-05 06:52:22 -0700331 if (rtc_libvpx_build_vp9) {
332 sources = [
333 "codecs/vp9/include/vp9.h",
334 "codecs/vp9/screenshare_layers.cc",
335 "codecs/vp9/screenshare_layers.h",
336 "codecs/vp9/vp9_frame_buffer_pool.cc",
337 "codecs/vp9/vp9_frame_buffer_pool.h",
338 "codecs/vp9/vp9_impl.cc",
339 "codecs/vp9/vp9_impl.h",
340 ]
341 } else {
342 sources = [
343 "codecs/vp9/vp9_noop.cc",
344 ]
345 }
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000346
kjellandere40a7ee2016-10-16 23:56:12 -0700347 if (!build_with_chromium && is_clang) {
348 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700349 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000350 }
351
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000352 deps = [
353 ":video_coding_utility",
mbonadei1140f972017-04-26 03:38:35 -0700354 "..:module_api",
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000355 "../../common_video",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100356 "../../rtc_base:checks",
Patrik Höglund76df0df2017-12-19 11:50:21 +0100357 "../../rtc_base:rtc_base",
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000358 "../../system_wrappers",
359 ]
360 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200361 deps += [ rtc_libvpx_dir ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000362 }
363}
kjellanderfb114242016-06-13 00:19:48 -0700364
365if (rtc_include_tests) {
magjed73c0eb52017-08-07 06:55:28 -0700366 if (is_ios || is_mac) {
kthelgason36d658d2017-08-24 05:43:45 -0700367 rtc_static_library("codec_test_objc") {
magjed73c0eb52017-08-07 06:55:28 -0700368 sources = [
369 "codecs/test/objc_codec_h264_test.h",
370 "codecs/test/objc_codec_h264_test.mm",
371 ]
372 deps = [
373 "../../api:video_frame_api",
374 "../../api/video_codecs:video_codecs_api",
375 "../../media:rtc_audio_video",
376 "../../modules:module_api",
Magnus Jedverte4a9e922017-12-04 14:09:40 +0100377 "../../rtc_base:rtc_base_approved",
kthelgason36d658d2017-08-24 05:43:45 -0700378 "../../sdk:common_objc",
379 "../../sdk:peerconnection_objc",
380 "../../sdk:peerconnectionfactory_objc",
381 "../../sdk:videotoolbox_objc",
382 "../../sdk:videotracksource_objc",
magjed73c0eb52017-08-07 06:55:28 -0700383 ]
384
385 if (!build_with_chromium && is_clang) {
386 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
387 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
388 }
389 }
390 }
391
magjed6cc25612017-07-10 03:26:36 -0700392 rtc_source_set("simulcast_test_utility") {
393 testonly = true
394 sources = [
395 "codecs/vp8/simulcast_test_utility.h",
396 ]
397
398 if (!build_with_chromium && is_clang) {
399 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
400 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
401 }
402
403 deps = [
charujaincb728ea2017-09-18 03:08:08 -0700404 ":mock_headers",
magjed6cc25612017-07-10 03:26:36 -0700405 ":video_coding",
406 ":webrtc_vp8",
407 "../../api:video_frame_api",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100408 "../../api:video_frame_api_i420",
magjed6cc25612017-07-10 03:26:36 -0700409 "../../common_video:common_video",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100410 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700411 "../../rtc_base:rtc_base_approved",
magjed6cc25612017-07-10 03:26:36 -0700412 "../../test:test_support",
413 ]
414 }
415
ehmaldonado38a21322016-09-02 04:10:34 -0700416 rtc_source_set("video_codecs_test_framework") {
kjellanderfb114242016-06-13 00:19:48 -0700417 testonly = true
418 sources = [
419 "codecs/test/mock/mock_packet_manipulator.h",
420 "codecs/test/packet_manipulator.cc",
421 "codecs/test/packet_manipulator.h",
kjellanderfb114242016-06-13 00:19:48 -0700422 "codecs/test/stats.cc",
423 "codecs/test/stats.h",
Åsa Persson2d27fb52017-10-19 14:05:50 +0200424 "codecs/test/test_config.cc",
425 "codecs/test/test_config.h",
sakalb8102e02017-03-06 03:52:55 -0800426 "codecs/test/video_codec_test.cc",
427 "codecs/test/video_codec_test.h",
kjellanderfb114242016-06-13 00:19:48 -0700428 "codecs/test/videoprocessor.cc",
429 "codecs/test/videoprocessor.h",
430 ]
431
kjellandere40a7ee2016-10-16 23:56:12 -0700432 if (!build_with_chromium && is_clang) {
433 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700434 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -0700435 }
436
437 deps = [
ssilkin612f8582017-09-28 09:23:17 -0700438 ":codec_globals_headers",
ehmaldonado36df2d72016-12-08 09:56:16 -0800439 ":video_coding",
440 ":video_coding_utility",
kjellandera8d8aad2017-03-08 05:42:26 -0800441 ":webrtc_vp8",
ehmaldonado36df2d72016-12-08 09:56:16 -0800442 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100443 "../../:typedefs",
Mirko Bonadei0594a7c2017-12-18 11:42:48 +0100444 "../../api:video_frame_api",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100445 "../../api:video_frame_api_i420",
ilnikd60d06a2017-04-05 03:02:20 -0700446 "../../api/video_codecs:video_codecs_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800447 "../../common_video:common_video",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100448 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700449 "../../rtc_base:rtc_base_approved",
brandtrc8c59052017-08-21 06:44:16 -0700450 "../../rtc_base:rtc_task_queue",
451 "../../rtc_base:sequenced_task_checker",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100452 "../../system_wrappers",
kjellanderfb114242016-06-13 00:19:48 -0700453 "../../test:test_support",
sakalb8102e02017-03-06 03:52:55 -0800454 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800455 "../../test:video_test_support",
kjellanderfb114242016-06-13 00:19:48 -0700456 ]
457 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800458
brandtrdf232992017-09-07 07:50:06 -0700459 video_coding_modules_tests_resources = [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200460 "../../resources/foreman_128x96.yuv",
461 "../../resources/foreman_160x120.yuv",
462 "../../resources/foreman_176x144.yuv",
463 "../../resources/foreman_320x240.yuv",
brandtrdf232992017-09-07 07:50:06 -0700464 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800465
brandtrdf232992017-09-07 07:50:06 -0700466 if (is_ios || is_mac) {
467 bundle_data("video_coding_modules_tests_resources_bundle_data") {
468 testonly = true
469 sources = video_coding_modules_tests_resources
470 outputs = [
471 "{{bundle_resources_dir}}/{{source_file_part}}",
brandtr6bb8e0e2017-02-20 04:35:52 -0800472 ]
brandtr12a47f62017-09-01 00:10:27 -0700473 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800474 }
475
476 rtc_source_set("video_coding_modules_tests") {
477 testonly = true
478
479 sources = [
sakalb8102e02017-03-06 03:52:55 -0800480 "codecs/h264/test/h264_impl_unittest.cc",
Emircan Uysalerdbcac7f2017-10-30 23:10:12 -0700481 "codecs/stereo/test/stereo_adapter_unittest.cc",
brandtrdf232992017-09-07 07:50:06 -0700482 "codecs/test/videoprocessor_integrationtest.cc",
483 "codecs/test/videoprocessor_integrationtest.h",
brandtr12a47f62017-09-01 00:10:27 -0700484 "codecs/test/videoprocessor_integrationtest_libvpx.cc",
485 "codecs/test/videoprocessor_integrationtest_openh264.cc",
brandtrdf232992017-09-07 07:50:06 -0700486 "codecs/test/videoprocessor_integrationtest_parameterized.cc",
brandtr6bb8e0e2017-02-20 04:35:52 -0800487 "codecs/vp8/test/vp8_impl_unittest.cc",
sakal7adadb12017-02-23 02:54:57 -0800488 "codecs/vp9/test/vp9_impl_unittest.cc",
brandtr6bb8e0e2017-02-20 04:35:52 -0800489 ]
490
491 deps = [
sakalb8102e02017-03-06 03:52:55 -0800492 ":video_codecs_test_framework",
brandtrdf232992017-09-07 07:50:06 -0700493 ":video_coding",
494 ":video_coding_utility",
sakalb8102e02017-03-06 03:52:55 -0800495 ":webrtc_h264",
Emircan Uysalerdbcac7f2017-10-30 23:10:12 -0700496 ":webrtc_stereo",
brandtr6bb8e0e2017-02-20 04:35:52 -0800497 ":webrtc_vp8",
sakal7adadb12017-02-23 02:54:57 -0800498 ":webrtc_vp9",
brandtrdf232992017-09-07 07:50:06 -0700499 "../..:webrtc_common",
Emircan Uysalerdbcac7f2017-10-30 23:10:12 -0700500 "../../api:mock_video_codec_factory",
kwiberg84f6a3f2017-09-05 08:43:13 -0700501 "../../api:optional",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800502 "../../api:video_frame_api",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100503 "../../api:video_frame_api_i420",
brandtrdf232992017-09-07 07:50:06 -0700504 "../../common_video",
505 "../../media:rtc_audio_video",
Rasmus Brandtfb1a8662017-10-27 14:51:46 +0200506 "../../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100507 "../../rtc_base:checks",
Patrik Höglund76df0df2017-12-19 11:50:21 +0100508 "../../rtc_base:rtc_base",
Åsa Persson7173cf22017-10-19 12:14:09 +0200509 "../../rtc_base:rtc_base_tests_utils",
brandtrdf232992017-09-07 07:50:06 -0700510 "../../system_wrappers",
asapersson142fcc92017-08-17 08:58:54 -0700511 "../../test:field_trial",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800512 "../../test:test_support",
513 "../../test:video_test_common",
brandtrdf232992017-09-07 07:50:06 -0700514 "../../test:video_test_support",
ehmaldonado656610f2017-02-06 02:21:11 -0800515 "../video_capture",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800516 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800517
brandtrdf232992017-09-07 07:50:06 -0700518 data = video_coding_modules_tests_resources
brandtr6bb8e0e2017-02-20 04:35:52 -0800519
520 if (is_android) {
Rasmus Brandt31027342017-09-29 13:48:12 +0000521 sources += [
522 "codecs/test/android_test_initializer.cc",
523 "codecs/test/android_test_initializer.h",
524 "codecs/test/videoprocessor_integrationtest_mediacodec.cc",
525 ]
526
brandtrdf232992017-09-07 07:50:06 -0700527 deps += [
Rasmus Brandt31027342017-09-29 13:48:12 +0000528 "../../sdk/android:libjingle_peerconnection_jni",
529 "//base",
brandtrdf232992017-09-07 07:50:06 -0700530 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800531 }
532
533 if (is_ios || is_mac) {
Rasmus Brandtf7a35582017-10-24 10:16:33 +0200534 sources +=
535 [ "codecs/test/videoprocessor_integrationtest_videotoolbox.cc" ]
536
magjed73c0eb52017-08-07 06:55:28 -0700537 deps += [
kthelgason36d658d2017-08-24 05:43:45 -0700538 ":codec_test_objc",
brandtrdf232992017-09-07 07:50:06 -0700539 ":video_coding_modules_tests_resources_bundle_data",
Rasmus Brandt31027342017-09-29 13:48:12 +0000540 "../../media:rtc_media_base",
541 "../../sdk:videotoolbox_objc",
magjed73c0eb52017-08-07 06:55:28 -0700542 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800543 }
544
brandtrdf232992017-09-07 07:50:06 -0700545 if (rtc_use_h264) {
546 defines = [ "WEBRTC_USE_H264" ]
547 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800548
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800549 if (!build_with_chromium && is_clang) {
550 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
551 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
552 }
553 }
554
ehmaldonado36268652017-01-19 08:27:11 -0800555 rtc_source_set("video_coding_unittests") {
556 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700557
ehmaldonado36268652017-01-19 08:27:11 -0800558 sources = [
559 "codecs/test/packet_manipulator_unittest.cc",
560 "codecs/test/stats_unittest.cc",
Åsa Persson2d27fb52017-10-19 14:05:50 +0200561 "codecs/test/test_config_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800562 "codecs/test/videoprocessor_unittest.cc",
563 "codecs/vp8/default_temporal_layers_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800564 "codecs/vp8/screenshare_layers_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800565 "codecs/vp8/simulcast_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800566 "decoding_state_unittest.cc",
567 "frame_buffer2_unittest.cc",
ilnik04f4d122017-06-19 07:18:55 -0700568 "generic_encoder_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800569 "h264_sprop_parameter_sets_unittest.cc",
570 "h264_sps_pps_tracker_unittest.cc",
571 "histogram_unittest.cc",
572 "include/mock/mock_vcm_callbacks.h",
573 "jitter_buffer_unittest.cc",
574 "jitter_estimator_tests.cc",
575 "nack_module_unittest.cc",
576 "protection_bitrate_calculator_unittest.cc",
577 "receiver_unittest.cc",
578 "rtp_frame_reference_finder_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800579 "session_info_unittest.cc",
580 "test/stream_generator.cc",
581 "test/stream_generator.h",
charujaincb728ea2017-09-18 03:08:08 -0700582 "test/test_util.h",
ehmaldonado36268652017-01-19 08:27:11 -0800583 "timing_unittest.cc",
584 "utility/default_video_bitrate_allocator_unittest.cc",
585 "utility/frame_dropper_unittest.cc",
586 "utility/ivf_file_writer_unittest.cc",
charujaincb728ea2017-09-18 03:08:08 -0700587 "utility/mock/mock_frame_dropper.h",
ehmaldonado36268652017-01-19 08:27:11 -0800588 "utility/moving_average_unittest.cc",
589 "utility/quality_scaler_unittest.cc",
590 "utility/simulcast_rate_allocator_unittest.cc",
sprang429600d2017-01-26 06:12:26 -0800591 "video_codec_initializer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800592 "video_packet_buffer_unittest.cc",
593 "video_receiver_unittest.cc",
594 "video_sender_unittest.cc",
595 ]
596 if (rtc_libvpx_build_vp9) {
597 sources += [ "codecs/vp9/vp9_screenshare_layers_unittest.cc" ]
598 }
599 if (rtc_use_h264) {
600 sources += [ "codecs/h264/h264_encoder_impl_unittest.cc" ]
601 }
602 deps = [
charujaincb728ea2017-09-18 03:08:08 -0700603 ":mock_headers",
magjed6cc25612017-07-10 03:26:36 -0700604 ":simulcast_test_utility",
ehmaldonado36268652017-01-19 08:27:11 -0800605 ":video_codecs_test_framework",
606 ":video_coding",
607 ":video_coding_utility",
608 ":webrtc_h264",
609 ":webrtc_vp8",
610 ":webrtc_vp9",
mbonadei1140f972017-04-26 03:38:35 -0700611 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -0800612 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100613 "../../:typedefs",
ehmaldonado36268652017-01-19 08:27:11 -0800614 "../../api:video_frame_api",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100615 "../../api:video_frame_api_i420",
ilnikd60d06a2017-04-05 03:02:20 -0700616 "../../api/video_codecs:video_codecs_api",
ehmaldonado36268652017-01-19 08:27:11 -0800617 "../../common_video:common_video",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100618 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700619 "../../rtc_base:rtc_base",
620 "../../rtc_base:rtc_base_approved",
Bjorn Tereliusa194e582017-10-25 13:07:09 +0200621 "../../rtc_base:rtc_numerics",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700622 "../../rtc_base:rtc_task_queue",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100623 "../../system_wrappers",
624 "../../system_wrappers:field_trial_api",
625 "../../system_wrappers:metrics_api",
ehmaldonado36268652017-01-19 08:27:11 -0800626 "../../system_wrappers:metrics_default",
ehmaldonado36268652017-01-19 08:27:11 -0800627 "../../test:field_trial",
628 "../../test:test_support",
629 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800630 "../../test:video_test_support",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100631 "../rtp_rtcp:rtp_rtcp_format",
ehmaldonado36268652017-01-19 08:27:11 -0800632 "//testing/gmock",
633 ]
634 if (rtc_build_libvpx) {
635 deps += [ rtc_libvpx_dir ]
636 }
637 if (is_win) {
638 cflags = [
639 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
640 "/wd4373", # virtual function override.
641 ]
642 }
643
644 # TODO(jschuh): bugs.webrtc.org/1348: fix this warning.
645 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
646 if (!build_with_chromium && is_clang) {
647 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
648 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
649 }
650 }
kjellanderfb114242016-06-13 00:19:48 -0700651}