blob: 3d3a3af342994638753e5d38548ddf0d3b2f7003 [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
kjellanderb62dbbe2016-09-23 00:38:52 -0700114rtc_static_library("video_coding_utility") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000115 sources = [
Erik Språng08127a92016-11-16 16:41:30 +0100116 "utility/default_video_bitrate_allocator.cc",
117 "utility/default_video_bitrate_allocator.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000118 "utility/frame_dropper.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100119 "utility/frame_dropper.h",
sprang3911c262016-04-15 01:24:14 -0700120 "utility/ivf_file_writer.cc",
121 "utility/ivf_file_writer.h",
kthelgason194f40a2016-09-14 02:14:58 -0700122 "utility/moving_average.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100123 "utility/moving_average.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000124 "utility/quality_scaler.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100125 "utility/quality_scaler.h",
jackychen98d8cf52015-05-21 11:12:02 -0700126 "utility/vp8_header_parser.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100127 "utility/vp8_header_parser.h",
jianj20acdf22017-05-24 10:00:16 -0700128 "utility/vp9_uncompressed_header_parser.cc",
129 "utility/vp9_uncompressed_header_parser.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000130 ]
131
kjellandere40a7ee2016-10-16 23:56:12 -0700132 if (!build_with_chromium && is_clang) {
133 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700134 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000135 }
136
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200137 deps = [
mbonadei1140f972017-04-26 03:38:35 -0700138 "..:module_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800139 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -0700140 "../../api:optional",
ilnikd60d06a2017-04-05 03:02:20 -0700141 "../../api/video_codecs:video_codecs_api",
perkj4e417b22016-07-14 23:35:55 -0700142 "../../common_video",
kjellandera8d8aad2017-03-08 05:42:26 -0800143 "../../modules/rtp_rtcp:rtp_rtcp",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700144 "../../rtc_base:rtc_base_approved",
145 "../../rtc_base:rtc_numerics",
146 "../../rtc_base:rtc_task_queue",
147 "../../rtc_base:sequenced_task_checker",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200148 "../../system_wrappers",
149 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000150}
151
kjellanderb62dbbe2016-09-23 00:38:52 -0700152rtc_static_library("webrtc_h264") {
Zeke Chin71f6f442015-06-29 14:34:58 -0700153 sources = [
154 "codecs/h264/h264.cc",
155 "codecs/h264/include/h264.h",
156 ]
157
kjellandere40a7ee2016-10-16 23:56:12 -0700158 if (!build_with_chromium && is_clang) {
159 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700160 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Zeke Chin71f6f442015-06-29 14:34:58 -0700161 }
162
hbosbab934b2016-01-27 01:36:03 -0800163 defines = []
Zeke Chin71f6f442015-06-29 14:34:58 -0700164 deps = [
ehmaldonado36df2d72016-12-08 09:56:16 -0800165 ":video_coding_utility",
magjed21d110f2017-02-28 00:28:04 -0800166 "../../media:rtc_media_base",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700167 "../../rtc_base:rtc_base_approved",
Zeke Chin71f6f442015-06-29 14:34:58 -0700168 "../../system_wrappers",
169 ]
hbosa9a1d2a2016-01-11 10:19:02 -0800170
hbos902c03e2016-01-21 03:34:40 -0800171 if (rtc_use_h264) {
hbos9dc59282016-02-03 05:09:37 -0800172 defines += [ "WEBRTC_USE_H264" ]
hbosc5a39c22016-02-02 02:26:05 -0800173 if (rtc_initialize_ffmpeg) {
174 defines += [ "WEBRTC_INITIALIZE_FFMPEG" ]
175 }
hbosbab934b2016-01-27 01:36:03 -0800176 sources += [
177 "codecs/h264/h264_decoder_impl.cc",
178 "codecs/h264/h264_decoder_impl.h",
179 "codecs/h264/h264_encoder_impl.cc",
180 "codecs/h264/h264_encoder_impl.h",
181 ]
hbosa9a1d2a2016-01-11 10:19:02 -0800182 deps += [
kjellanderf6b55092016-02-07 23:04:26 -0800183 "../../common_video",
hta9aa96882016-12-06 05:36:03 -0800184 "../../media:rtc_media_base",
hbosa9a1d2a2016-01-11 10:19:02 -0800185 "//third_party/ffmpeg:ffmpeg",
186 "//third_party/openh264:encoder",
187 ]
188 }
Zeke Chin71f6f442015-06-29 14:34:58 -0700189}
190
kjellanderb62dbbe2016-09-23 00:38:52 -0700191rtc_static_library("webrtc_i420") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000192 sources = [
Henrik Kjellandera74c08d2015-10-22 12:23:11 +0200193 "codecs/i420/i420.cc",
194 "codecs/i420/include/i420.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000195 ]
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" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000200 }
201
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200202 deps = [
ehmaldonado36df2d72016-12-08 09:56:16 -0800203 "../..:webrtc_common",
ehmaldonado36df2d72016-12-08 09:56:16 -0800204 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700205 "../../rtc_base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200206 "../../system_wrappers",
207 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000208}
209
kjellanderb62dbbe2016-09-23 00:38:52 -0700210rtc_static_library("webrtc_vp8") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000211 sources = [
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000212 "codecs/vp8/default_temporal_layers.cc",
213 "codecs/vp8/default_temporal_layers.h",
pbos@webrtc.org9115cde2014-12-09 10:36:40 +0000214 "codecs/vp8/include/vp8.h",
215 "codecs/vp8/include/vp8_common_types.h",
pbos@webrtc.org9115cde2014-12-09 10:36:40 +0000216 "codecs/vp8/screenshare_layers.cc",
217 "codecs/vp8/screenshare_layers.h",
kjellandera8d8aad2017-03-08 05:42:26 -0800218 "codecs/vp8/simulcast_rate_allocator.cc",
219 "codecs/vp8/simulcast_rate_allocator.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000220 "codecs/vp8/temporal_layers.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000221 "codecs/vp8/vp8_impl.cc",
222 "codecs/vp8/vp8_impl.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000223 ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000224
kjellander8f4419b2016-06-02 02:09:52 -0700225 # TODO(jschuh): Bug 1348: fix this warning.
226 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
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
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000233 deps = [
234 ":video_coding_utility",
mbonadei1140f972017-04-26 03:38:35 -0700235 "..:module_api",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000236 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -0700237 "../../api:optional",
ilnikd60d06a2017-04-05 03:02:20 -0700238 "../../api/video_codecs:video_codecs_api",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000239 "../../common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700240 "../../rtc_base:rtc_base_approved",
asaperssone5d02f92017-08-09 23:37:05 -0700241 "../../rtc_base:rtc_numerics",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700242 "../../rtc_base:sequenced_task_checker",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000243 "../../system_wrappers",
244 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000245 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200246 deps += [ rtc_libvpx_dir ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000247 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000248}
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000249
kjellanderb62dbbe2016-09-23 00:38:52 -0700250rtc_static_library("webrtc_vp9") {
phoglund33603522016-10-05 06:52:22 -0700251 if (rtc_libvpx_build_vp9) {
252 sources = [
253 "codecs/vp9/include/vp9.h",
254 "codecs/vp9/screenshare_layers.cc",
255 "codecs/vp9/screenshare_layers.h",
256 "codecs/vp9/vp9_frame_buffer_pool.cc",
257 "codecs/vp9/vp9_frame_buffer_pool.h",
258 "codecs/vp9/vp9_impl.cc",
259 "codecs/vp9/vp9_impl.h",
260 ]
261 } else {
262 sources = [
263 "codecs/vp9/vp9_noop.cc",
264 ]
265 }
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000266
kjellandere40a7ee2016-10-16 23:56:12 -0700267 if (!build_with_chromium && is_clang) {
268 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700269 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000270 }
271
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000272 deps = [
273 ":video_coding_utility",
mbonadei1140f972017-04-26 03:38:35 -0700274 "..:module_api",
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000275 "../../common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700276 "../../rtc_base:rtc_base_approved",
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000277 "../../system_wrappers",
278 ]
279 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200280 deps += [ rtc_libvpx_dir ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000281 }
282}
kjellanderfb114242016-06-13 00:19:48 -0700283
284if (rtc_include_tests) {
magjed73c0eb52017-08-07 06:55:28 -0700285 if (is_ios || is_mac) {
kthelgason36d658d2017-08-24 05:43:45 -0700286 rtc_static_library("codec_test_objc") {
magjed73c0eb52017-08-07 06:55:28 -0700287 sources = [
288 "codecs/test/objc_codec_h264_test.h",
289 "codecs/test/objc_codec_h264_test.mm",
290 ]
291 deps = [
292 "../../api:video_frame_api",
293 "../../api/video_codecs:video_codecs_api",
294 "../../media:rtc_audio_video",
295 "../../modules:module_api",
kthelgason36d658d2017-08-24 05:43:45 -0700296 "../../sdk:common_objc",
297 "../../sdk:peerconnection_objc",
298 "../../sdk:peerconnectionfactory_objc",
299 "../../sdk:videotoolbox_objc",
300 "../../sdk:videotracksource_objc",
magjed73c0eb52017-08-07 06:55:28 -0700301 ]
302
303 if (!build_with_chromium && is_clang) {
304 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
305 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
306 }
307 }
308 }
309
magjed6cc25612017-07-10 03:26:36 -0700310 rtc_source_set("simulcast_test_utility") {
311 testonly = true
312 sources = [
313 "codecs/vp8/simulcast_test_utility.h",
314 ]
315
316 if (!build_with_chromium && is_clang) {
317 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
318 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
319 }
320
321 deps = [
322 ":video_coding",
323 ":webrtc_vp8",
324 "../../api:video_frame_api",
magjed6cc25612017-07-10 03:26:36 -0700325 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700326 "../../rtc_base:rtc_base_approved",
magjed6cc25612017-07-10 03:26:36 -0700327 "../../test:test_support",
328 ]
329 }
330
ehmaldonado38a21322016-09-02 04:10:34 -0700331 rtc_source_set("video_codecs_test_framework") {
kjellanderfb114242016-06-13 00:19:48 -0700332 testonly = true
333 sources = [
334 "codecs/test/mock/mock_packet_manipulator.h",
335 "codecs/test/packet_manipulator.cc",
336 "codecs/test/packet_manipulator.h",
337 "codecs/test/predictive_packet_manipulator.cc",
338 "codecs/test/predictive_packet_manipulator.h",
339 "codecs/test/stats.cc",
340 "codecs/test/stats.h",
sakalb8102e02017-03-06 03:52:55 -0800341 "codecs/test/video_codec_test.cc",
342 "codecs/test/video_codec_test.h",
kjellanderfb114242016-06-13 00:19:48 -0700343 "codecs/test/videoprocessor.cc",
344 "codecs/test/videoprocessor.h",
345 ]
346
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" ]
kjellanderfb114242016-06-13 00:19:48 -0700350 }
351
352 deps = [
ehmaldonado36df2d72016-12-08 09:56:16 -0800353 ":video_coding",
354 ":video_coding_utility",
kjellandera8d8aad2017-03-08 05:42:26 -0800355 ":webrtc_vp8",
ehmaldonado36df2d72016-12-08 09:56:16 -0800356 "../..:webrtc_common",
ilnikd60d06a2017-04-05 03:02:20 -0700357 "../../api/video_codecs:video_codecs_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800358 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700359 "../../rtc_base:rtc_base_approved",
brandtrc8c59052017-08-21 06:44:16 -0700360 "../../rtc_base:rtc_task_queue",
361 "../../rtc_base:sequenced_task_checker",
ehmaldonado36df2d72016-12-08 09:56:16 -0800362 "../../system_wrappers:system_wrappers",
kjellanderfb114242016-06-13 00:19:48 -0700363 "../../test:test_support",
sakalb8102e02017-03-06 03:52:55 -0800364 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800365 "../../test:video_test_support",
kjellanderfb114242016-06-13 00:19:48 -0700366 ]
367 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800368
brandtrdf232992017-09-07 07:50:06 -0700369 video_coding_modules_tests_resources = [
370 "../../../resources/foreman_128x96.yuv",
371 "../../../resources/foreman_160x120.yuv",
372 "../../../resources/foreman_176x144.yuv",
373 "../../../resources/foreman_320x240.yuv",
374 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800375
brandtrdf232992017-09-07 07:50:06 -0700376 if (is_ios || is_mac) {
377 bundle_data("video_coding_modules_tests_resources_bundle_data") {
378 testonly = true
379 sources = video_coding_modules_tests_resources
380 outputs = [
381 "{{bundle_resources_dir}}/{{source_file_part}}",
brandtr6bb8e0e2017-02-20 04:35:52 -0800382 ]
brandtr12a47f62017-09-01 00:10:27 -0700383 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800384 }
385
386 rtc_source_set("video_coding_modules_tests") {
387 testonly = true
388
kjellandere0629c02017-04-25 04:04:50 -0700389 # Skip restricting visibility on mobile platforms since the tests on those
390 # gets additional generated targets which would require many lines here to
391 # cover (which would be confusing to read and hard to maintain).
392 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700393 visibility = [ "..:modules_tests" ]
kjellandere0629c02017-04-25 04:04:50 -0700394 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800395 sources = [
sakalb8102e02017-03-06 03:52:55 -0800396 "codecs/h264/test/h264_impl_unittest.cc",
brandtrdf232992017-09-07 07:50:06 -0700397 "codecs/test/videoprocessor_integrationtest.cc",
398 "codecs/test/videoprocessor_integrationtest.h",
brandtr12a47f62017-09-01 00:10:27 -0700399 "codecs/test/videoprocessor_integrationtest_libvpx.cc",
400 "codecs/test/videoprocessor_integrationtest_openh264.cc",
brandtrdf232992017-09-07 07:50:06 -0700401 "codecs/test/videoprocessor_integrationtest_parameterized.cc",
brandtr6bb8e0e2017-02-20 04:35:52 -0800402 "codecs/vp8/test/vp8_impl_unittest.cc",
sakal7adadb12017-02-23 02:54:57 -0800403 "codecs/vp9/test/vp9_impl_unittest.cc",
brandtr6bb8e0e2017-02-20 04:35:52 -0800404 ]
405
406 deps = [
sakalb8102e02017-03-06 03:52:55 -0800407 ":video_codecs_test_framework",
brandtrdf232992017-09-07 07:50:06 -0700408 ":video_coding",
409 ":video_coding_utility",
sakalb8102e02017-03-06 03:52:55 -0800410 ":webrtc_h264",
brandtr6bb8e0e2017-02-20 04:35:52 -0800411 ":webrtc_vp8",
sakal7adadb12017-02-23 02:54:57 -0800412 ":webrtc_vp9",
brandtrdf232992017-09-07 07:50:06 -0700413 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -0700414 "../../api:optional",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800415 "../../api:video_frame_api",
brandtrdf232992017-09-07 07:50:06 -0700416 "../../common_video",
417 "../../media:rtc_audio_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700418 "../../rtc_base:rtc_base_approved",
brandtrdf232992017-09-07 07:50:06 -0700419 "../../system_wrappers",
asapersson142fcc92017-08-17 08:58:54 -0700420 "../../test:field_trial",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800421 "../../test:test_support",
422 "../../test:video_test_common",
brandtrdf232992017-09-07 07:50:06 -0700423 "../../test:video_test_support",
ehmaldonado656610f2017-02-06 02:21:11 -0800424 "../video_capture",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800425 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800426
brandtrdf232992017-09-07 07:50:06 -0700427 data = video_coding_modules_tests_resources
brandtr6bb8e0e2017-02-20 04:35:52 -0800428
429 if (is_android) {
brandtrdf232992017-09-07 07:50:06 -0700430 sources += [
431 "codecs/test/android_test_initializer.cc",
432 "codecs/test/android_test_initializer.h",
433 "codecs/test/videoprocessor_integrationtest_mediacodec.cc",
brandtr6bb8e0e2017-02-20 04:35:52 -0800434 ]
435
brandtrdf232992017-09-07 07:50:06 -0700436 deps += [
437 "../../sdk/android:libjingle_peerconnection_jni",
438 "//base",
439 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800440 }
441
442 if (is_ios || is_mac) {
magjed73c0eb52017-08-07 06:55:28 -0700443 deps += [
kthelgason36d658d2017-08-24 05:43:45 -0700444 ":codec_test_objc",
brandtrdf232992017-09-07 07:50:06 -0700445 ":video_coding_modules_tests_resources_bundle_data",
446 "../../media:rtc_media_base",
447 "../../sdk:videotoolbox_objc",
magjed73c0eb52017-08-07 06:55:28 -0700448 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800449 }
450
brandtrdf232992017-09-07 07:50:06 -0700451 if (rtc_use_h264) {
452 defines = [ "WEBRTC_USE_H264" ]
453 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800454
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800455 if (!build_with_chromium && is_clang) {
456 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
457 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
458 }
459 }
460
ehmaldonado36268652017-01-19 08:27:11 -0800461 rtc_source_set("video_coding_unittests") {
462 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700463
464 # Skip restricting visibility on mobile platforms since the tests on those
465 # gets additional generated targets which would require many lines here to
466 # cover (which would be confusing to read and hard to maintain).
467 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700468 visibility = [ "..:modules_unittests" ]
kjellandere0629c02017-04-25 04:04:50 -0700469 }
ehmaldonado36268652017-01-19 08:27:11 -0800470 sources = [
471 "codecs/test/packet_manipulator_unittest.cc",
472 "codecs/test/stats_unittest.cc",
473 "codecs/test/videoprocessor_unittest.cc",
474 "codecs/vp8/default_temporal_layers_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800475 "codecs/vp8/screenshare_layers_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800476 "codecs/vp8/simulcast_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800477 "decoding_state_unittest.cc",
478 "frame_buffer2_unittest.cc",
ilnik04f4d122017-06-19 07:18:55 -0700479 "generic_encoder_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800480 "h264_sprop_parameter_sets_unittest.cc",
481 "h264_sps_pps_tracker_unittest.cc",
482 "histogram_unittest.cc",
483 "include/mock/mock_vcm_callbacks.h",
484 "jitter_buffer_unittest.cc",
485 "jitter_estimator_tests.cc",
486 "nack_module_unittest.cc",
487 "protection_bitrate_calculator_unittest.cc",
488 "receiver_unittest.cc",
489 "rtp_frame_reference_finder_unittest.cc",
490 "sequence_number_util_unittest.cc",
491 "session_info_unittest.cc",
492 "test/stream_generator.cc",
493 "test/stream_generator.h",
494 "timing_unittest.cc",
495 "utility/default_video_bitrate_allocator_unittest.cc",
496 "utility/frame_dropper_unittest.cc",
497 "utility/ivf_file_writer_unittest.cc",
498 "utility/moving_average_unittest.cc",
499 "utility/quality_scaler_unittest.cc",
500 "utility/simulcast_rate_allocator_unittest.cc",
sprang429600d2017-01-26 06:12:26 -0800501 "video_codec_initializer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800502 "video_packet_buffer_unittest.cc",
503 "video_receiver_unittest.cc",
504 "video_sender_unittest.cc",
505 ]
506 if (rtc_libvpx_build_vp9) {
507 sources += [ "codecs/vp9/vp9_screenshare_layers_unittest.cc" ]
508 }
509 if (rtc_use_h264) {
510 sources += [ "codecs/h264/h264_encoder_impl_unittest.cc" ]
511 }
512 deps = [
magjed6cc25612017-07-10 03:26:36 -0700513 ":simulcast_test_utility",
ehmaldonado36268652017-01-19 08:27:11 -0800514 ":video_codecs_test_framework",
515 ":video_coding",
516 ":video_coding_utility",
517 ":webrtc_h264",
518 ":webrtc_vp8",
519 ":webrtc_vp9",
mbonadei1140f972017-04-26 03:38:35 -0700520 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -0800521 "../..:webrtc_common",
522 "../../api:video_frame_api",
ilnikd60d06a2017-04-05 03:02:20 -0700523 "../../api/video_codecs:video_codecs_api",
ehmaldonado36268652017-01-19 08:27:11 -0800524 "../../common_video:common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700525 "../../rtc_base:rtc_base",
526 "../../rtc_base:rtc_base_approved",
527 "../../rtc_base:rtc_task_queue",
ehmaldonado36268652017-01-19 08:27:11 -0800528 "../../system_wrappers:metrics_default",
529 "../../system_wrappers:system_wrappers",
530 "../../test:field_trial",
531 "../../test:test_support",
532 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800533 "../../test:video_test_support",
ehmaldonado36268652017-01-19 08:27:11 -0800534 "../rtp_rtcp:rtp_rtcp",
535 "//testing/gmock",
536 ]
537 if (rtc_build_libvpx) {
538 deps += [ rtc_libvpx_dir ]
539 }
540 if (is_win) {
541 cflags = [
542 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
543 "/wd4373", # virtual function override.
544 ]
545 }
546
547 # TODO(jschuh): bugs.webrtc.org/1348: fix this warning.
548 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
549 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 }
kjellanderfb114242016-06-13 00:19:48 -0700554}