blob: 84681ee085d6c8beecc2516fefbc06b60933840b [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
philipeld5a272f2018-02-21 14:30:34 +010011rtc_static_library("encoded_frame") {
12 visibility = [ "*" ]
13 sources = [
14 "encoded_frame.cc",
15 "encoded_frame.h",
16 ]
17 deps = [
Yves Gerey3e707812018-11-28 16:47:49 +010018 ":codec_globals_headers",
philipeld5a272f2018-02-21 14:30:34 +010019 ":video_codec_interface",
20 "../../:webrtc_common",
Niels Möller4dc66c52018-10-05 14:17:58 +020021 "../../api/video:encoded_image",
Yves Gerey3e707812018-11-28 16:47:49 +010022 "../../api/video:video_frame",
Niels Möllerc6ce9c52018-05-11 11:15:30 +020023 "../../api/video:video_frame_i420",
philipeld5a272f2018-02-21 14:30:34 +010024 "../../modules:module_api",
25 "../../modules:module_api_public",
philipeld5a272f2018-02-21 14:30:34 +010026 "../../rtc_base:checks",
27 "../../rtc_base:rtc_base_approved",
28 "../../rtc_base/experiments:alr_experiment",
“Michaelf9fc1712018-08-27 10:08:58 -050029 "../../rtc_base/experiments:rtt_mult_experiment",
philipeld5a272f2018-02-21 14:30:34 +010030 "../../system_wrappers:system_wrappers",
Danil Chapovalov0040b662018-06-18 10:48:16 +020031 "//third_party/abseil-cpp/absl/types:optional",
Yves Gerey3e707812018-11-28 16:47:49 +010032 "//third_party/abseil-cpp/absl/types:variant",
philipeld5a272f2018-02-21 14:30:34 +010033 ]
34
35 if (!build_with_chromium && is_clang) {
36 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
37 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
38 }
39}
40
Ilya Nikolaevskiy8643b782018-06-07 16:15:40 +020041rtc_static_library("nack_module") {
42 visibility = [ "*" ]
43 sources = [
44 "histogram.cc",
45 "histogram.h",
46 "nack_module.cc",
47 "nack_module.h",
48 ]
49
Ilya Nikolaevskiy8643b782018-06-07 16:15:40 +020050 if (!build_with_chromium && is_clang) {
51 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
52 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
53 }
54
55 deps = [
56 ":packet",
57 "..:module_api",
58 "../../rtc_base:checks",
59 "../../rtc_base:rtc_base_approved",
60 "../../rtc_base:rtc_numerics",
61 "../../system_wrappers",
Ying Wang0367d1a2018-11-02 14:51:15 +010062 "../../system_wrappers:field_trial",
Ilya Nikolaevskiy8643b782018-06-07 16:15:40 +020063 "../utility:utility",
64 ]
65}
66
67rtc_static_library("packet") {
68 visibility = [ "*" ]
69 sources = [
70 "packet.cc",
71 "packet.h",
72 ]
73 deps = [
74 "..:module_api",
Yves Gerey3e707812018-11-28 16:47:49 +010075 "../../:webrtc_common",
76 "../../api:libjingle_peerconnection_api",
philipel2837edc2018-10-02 13:55:47 +020077 "../rtp_rtcp:rtp_rtcp_format",
Yves Gerey3e707812018-11-28 16:47:49 +010078 "../rtp_rtcp:rtp_video_header",
79 "//third_party/abseil-cpp/absl/types:optional",
Ilya Nikolaevskiy8643b782018-06-07 16:15:40 +020080 ]
81}
82
kjellanderb62dbbe2016-09-23 00:38:52 -070083rtc_static_library("video_coding") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000084 visibility = [ "*" ]
Mirko Bonadei17f48782018-09-28 08:51:10 +020085 deps = [
Yves Gerey3e707812018-11-28 16:47:49 +010086 "..:module_fec_api",
87 "../../api:libjingle_peerconnection_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +010088 "../../api:scoped_refptr",
Yves Gerey3e707812018-11-28 16:47:49 +010089 "../../api/video:encoded_image",
90 "../../api/video:video_bitrate_allocation",
91 "../../api/video:video_bitrate_allocator_factory",
Mirko Bonadei17f48782018-09-28 08:51:10 +020092 "../../system_wrappers:field_trial",
93 "../../system_wrappers:metrics",
Yves Gerey3e707812018-11-28 16:47:49 +010094 "../rtp_rtcp:rtp_video_header",
95 "//third_party/abseil-cpp/absl/memory",
Mirko Bonadei17f48782018-09-28 08:51:10 +020096 ]
Anders Carlssondd8c1652018-01-30 10:32:13 +010097
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000098 sources = [
Henrik Kjellander2557b862015-11-18 22:00:21 +010099 "codec_timer.cc",
100 "codec_timer.h",
Niels Möllerf9063782018-02-20 16:09:48 +0100101 "decoder_database.cc",
102 "decoder_database.h",
Henrik Kjellander2557b862015-11-18 22:00:21 +0100103 "decoding_state.cc",
104 "decoding_state.h",
Niels Möllerf9063782018-02-20 16:09:48 +0100105 "encoder_database.cc",
106 "encoder_database.h",
Ying Wang3b790f32018-01-19 17:58:57 +0100107 "fec_controller_default.cc",
108 "fec_controller_default.h",
brandtr71b1c1f2017-01-12 06:16:24 -0800109 "fec_rate_table.h",
Henrik Kjellander2557b862015-11-18 22:00:21 +0100110 "frame_buffer.cc",
111 "frame_buffer.h",
philipelbe7a9e52016-05-19 12:19:35 +0200112 "frame_buffer2.cc",
113 "frame_buffer2.h",
philipelc707ab72016-04-01 02:01:54 -0700114 "frame_object.cc",
115 "frame_object.h",
Lu Liu352314a2018-02-21 19:38:59 +0000116 "generic_decoder.cc",
Henrik Kjellander2557b862015-11-18 22:00:21 +0100117 "generic_decoder.h",
118 "generic_encoder.cc",
119 "generic_encoder.h",
johanb0a11112016-12-08 03:57:17 -0800120 "h264_sprop_parameter_sets.cc",
121 "h264_sprop_parameter_sets.h",
philipel34852cf2016-11-03 04:03:01 -0700122 "h264_sps_pps_tracker.cc",
123 "h264_sps_pps_tracker.h",
Erik Språng08127a92016-11-16 16:41:30 +0100124 "include/video_codec_initializer.h",
Ying Wang3b790f32018-01-19 17:58:57 +0100125 "include/video_coding.h",
Henrik Kjellander2557b862015-11-18 22:00:21 +0100126 "inter_frame_delay.cc",
127 "inter_frame_delay.h",
128 "internal_defines.h",
129 "jitter_buffer.cc",
130 "jitter_buffer.h",
131 "jitter_buffer_common.h",
132 "jitter_estimator.cc",
133 "jitter_estimator.h",
134 "media_opt_util.cc",
135 "media_opt_util.h",
philipelc707ab72016-04-01 02:01:54 -0700136 "packet_buffer.cc",
137 "packet_buffer.h",
Henrik Kjellander2557b862015-11-18 22:00:21 +0100138 "receiver.cc",
139 "receiver.h",
philipel02447bc2016-05-13 06:01:03 -0700140 "rtp_frame_reference_finder.cc",
141 "rtp_frame_reference_finder.h",
Henrik Kjellander2557b862015-11-18 22:00:21 +0100142 "rtt_filter.cc",
143 "rtt_filter.h",
144 "session_info.cc",
145 "session_info.h",
146 "timestamp_map.cc",
147 "timestamp_map.h",
148 "timing.cc",
149 "timing.h",
Erik Språng08127a92016-11-16 16:41:30 +0100150 "video_codec_initializer.cc",
Henrik Kjellander2557b862015-11-18 22:00:21 +0100151 "video_coding_impl.cc",
152 "video_coding_impl.h",
153 "video_receiver.cc",
154 "video_sender.cc",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +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
Anders Carlssondd8c1652018-01-30 10:32:13 +0100162 deps += [
Rasmus Brandt88f080a2017-11-02 14:28:06 +0100163 ":codec_globals_headers",
philipeld5a272f2018-02-21 14:30:34 +0100164 ":encoded_frame",
Ilya Nikolaevskiy8643b782018-06-07 16:15:40 +0200165 ":packet",
Patrik Höglund99175c62018-01-08 11:05:10 +0100166 ":video_codec_interface",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000167 ":video_coding_utility",
Sergey Silkin86684962018-03-28 19:32:37 +0200168 ":webrtc_vp9_helpers",
mbonadei1140f972017-04-26 03:38:35 -0700169 "..:module_api",
Ilya Nikolaevskiy76f2a852017-11-16 14:33:53 +0100170 "..:module_api_public",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000171 "../..:webrtc_common",
Ying Wang3b790f32018-01-19 17:58:57 +0100172 "../../api:fec_controller_api",
Erik Språngd96b2752018-12-13 11:23:27 +0100173 "../../api/units:data_rate",
Jiawei Ouc2ebe212018-11-08 10:02:56 -0800174 "../../api/video:builtin_video_bitrate_allocator_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200175 "../../api/video:encoded_frame",
Jiawei Ou4206a0a2018-07-20 15:49:43 -0700176 "../../api/video:video_bitrate_allocator",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200177 "../../api/video:video_frame",
178 "../../api/video:video_frame_i420",
Patrik Höglund99175c62018-01-08 11:05:10 +0100179 "../../api/video_codecs:video_codecs_api",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000180 "../../common_video",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100181 "../../rtc_base:checks",
Niels Möller689983f2018-11-07 16:36:22 +0100182 "../../rtc_base:deprecation",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700183 "../../rtc_base:rtc_base",
184 "../../rtc_base:rtc_base_approved",
185 "../../rtc_base:rtc_numerics",
186 "../../rtc_base:rtc_task_queue",
187 "../../rtc_base:sequenced_task_checker",
Sebastian Janssoncabe3832018-01-12 10:54:18 +0100188 "../../rtc_base/experiments:alr_experiment",
Erik Språngb1e031a2018-11-01 11:20:49 +0100189 "../../rtc_base/experiments:jitter_upper_bound_experiment",
“Michaelf9fc1712018-08-27 10:08:58 -0500190 "../../rtc_base/experiments:rtt_mult_experiment",
Karl Wiberg80ba3332018-02-05 10:33:35 +0100191 "../../rtc_base/system:fallthrough",
Artem Titova76af0c2018-07-23 17:38:12 +0200192 "../../rtc_base/third_party/base64",
Karl Wiberg76b7f512018-03-22 15:29:03 +0100193 "../../rtc_base/time:timestamp_extrapolator",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000194 "../../system_wrappers",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100195 "../rtp_rtcp:rtp_rtcp_format",
ehmaldonado36df2d72016-12-08 09:56:16 -0800196 "../utility:utility",
Elad Alon69321dd2019-01-10 15:02:54 +0100197 "//third_party/abseil-cpp/absl/container:inlined_vector",
Danil Chapovalov0040b662018-06-18 10:48:16 +0200198 "//third_party/abseil-cpp/absl/types:optional",
philipel1a4746a2018-07-09 15:52:29 +0200199 "//third_party/abseil-cpp/absl/types:variant",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000200 ]
201}
202
Patrik Höglund99175c62018-01-08 11:05:10 +0100203rtc_source_set("video_codec_interface") {
Patrik Höglunda2ac1b42018-01-15 16:01:43 +0100204 visibility = [ "*" ]
Patrik Höglund99175c62018-01-08 11:05:10 +0100205 sources = [
206 "include/video_codec_interface.h",
207 "include/video_coding_defines.h",
208 "include/video_error_codes.h",
Niels Möllerbe682d42018-03-27 08:31:45 +0200209 "video_coding_defines.cc",
Patrik Höglund99175c62018-01-08 11:05:10 +0100210 ]
211 deps = [
212 "..:module_api",
Patrik Höglund99175c62018-01-08 11:05:10 +0100213 "../..:webrtc_common",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200214 "../../api/video:video_frame",
Patrik Höglund99175c62018-01-08 11:05:10 +0100215 "../../api/video_codecs:video_codecs_api",
216 "../../common_video:common_video",
Yves Gerey3e707812018-11-28 16:47:49 +0100217 "//third_party/abseil-cpp/absl/types:optional",
Patrik Höglund99175c62018-01-08 11:05:10 +0100218 ]
219}
220
charujaincb728ea2017-09-18 03:08:08 -0700221rtc_source_set("mock_headers") {
222 testonly = true
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000223 sources = [
charujaincb728ea2017-09-18 03:08:08 -0700224 "include/mock/mock_video_codec_interface.h",
225 ]
226 deps = [
Patrik Höglund99175c62018-01-08 11:05:10 +0100227 ":video_codec_interface",
charujaincb728ea2017-09-18 03:08:08 -0700228 ":video_coding_utility",
229 "../..:webrtc_common",
230 "../../test:test_support",
231 ]
232}
233
234rtc_source_set("codec_globals_headers") {
Danil Chapovalov5c250102018-10-03 14:54:43 +0200235 visibility = [ "*" ]
charujaincb728ea2017-09-18 03:08:08 -0700236 sources = [
237 "codecs/h264/include/h264_globals.h",
238 "codecs/interface/common_constants.h",
239 "codecs/vp8/include/vp8_globals.h",
240 "codecs/vp9/include/vp9_globals.h",
241 ]
philipel1a4746a2018-07-09 15:52:29 +0200242
243 deps = [
244 "../../rtc_base:checks",
245 ]
charujaincb728ea2017-09-18 03:08:08 -0700246}
247
248rtc_source_set("video_coding_utility") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000249 visibility = [ "*" ]
charujaincb728ea2017-09-18 03:08:08 -0700250 sources = [
Ilya Nikolaevskiy13717842019-01-14 13:24:22 +0100251 "utility/decoded_frames_history.cc",
252 "utility/decoded_frames_history.h",
Erik Språng08127a92016-11-16 16:41:30 +0100253 "utility/default_video_bitrate_allocator.cc",
254 "utility/default_video_bitrate_allocator.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000255 "utility/frame_dropper.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100256 "utility/frame_dropper.h",
Sergey Silkinae3144c2018-08-29 01:05:26 +0200257 "utility/framerate_controller.cc",
258 "utility/framerate_controller.h",
sprang3911c262016-04-15 01:24:14 -0700259 "utility/ivf_file_writer.cc",
260 "utility/ivf_file_writer.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000261 "utility/quality_scaler.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100262 "utility/quality_scaler.h",
Sergio Garcia Murillo43800f92018-06-21 16:16:38 +0200263 "utility/simulcast_rate_allocator.cc",
264 "utility/simulcast_rate_allocator.h",
265 "utility/simulcast_utility.cc",
266 "utility/simulcast_utility.h",
jackychen98d8cf52015-05-21 11:12:02 -0700267 "utility/vp8_header_parser.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100268 "utility/vp8_header_parser.h",
jianj20acdf22017-05-24 10:00:16 -0700269 "utility/vp9_uncompressed_header_parser.cc",
270 "utility/vp9_uncompressed_header_parser.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000271 ]
272
kjellandere40a7ee2016-10-16 23:56:12 -0700273 if (!build_with_chromium && is_clang) {
274 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700275 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000276 }
277
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200278 deps = [
Patrik Höglund99175c62018-01-08 11:05:10 +0100279 ":video_codec_interface",
mbonadei1140f972017-04-26 03:38:35 -0700280 "..:module_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800281 "../..:webrtc_common",
Ilya Nikolaevskiy13717842019-01-14 13:24:22 +0100282 "../../api/video:encoded_frame",
Niels Möller4dc66c52018-10-05 14:17:58 +0200283 "../../api/video:encoded_image",
Yves Gerey3e707812018-11-28 16:47:49 +0100284 "../../api/video:video_bitrate_allocation",
Jiawei Ou4206a0a2018-07-20 15:49:43 -0700285 "../../api/video:video_bitrate_allocator",
ilnikd60d06a2017-04-05 03:02:20 -0700286 "../../api/video_codecs:video_codecs_api",
perkj4e417b22016-07-14 23:35:55 -0700287 "../../common_video",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100288 "../../modules/rtp_rtcp",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100289 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700290 "../../rtc_base:rtc_base_approved",
291 "../../rtc_base:rtc_numerics",
292 "../../rtc_base:rtc_task_queue",
293 "../../rtc_base:sequenced_task_checker",
Åsa Perssona945aee2018-04-24 16:53:25 +0200294 "../../rtc_base/experiments:quality_scaling_experiment",
Erik Språng2c58ba12019-01-23 16:53:18 +0100295 "../../rtc_base/experiments:rate_control_settings",
Niels Möllera12c42a2018-07-25 16:05:48 +0200296 "../../rtc_base/system:arch",
Niels Möllerb7edf692019-02-08 16:40:53 +0100297 "../../rtc_base/system:file_wrapper",
Sebastian Janssonecb68972019-01-18 10:30:54 +0100298 "../../rtc_base/task_utils:repeating_task",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200299 "../../system_wrappers",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200300 "../../system_wrappers:field_trial",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100301 "../rtp_rtcp:rtp_rtcp_format",
Danil Chapovalov0040b662018-06-18 10:48:16 +0200302 "//third_party/abseil-cpp/absl/types:optional",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200303 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000304}
305
kjellanderb62dbbe2016-09-23 00:38:52 -0700306rtc_static_library("webrtc_h264") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000307 visibility = [ "*" ]
Zeke Chin71f6f442015-06-29 14:34:58 -0700308 sources = [
309 "codecs/h264/h264.cc",
310 "codecs/h264/include/h264.h",
311 ]
312
kjellandere40a7ee2016-10-16 23:56:12 -0700313 if (!build_with_chromium && is_clang) {
314 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700315 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Zeke Chin71f6f442015-06-29 14:34:58 -0700316 }
317
hbosbab934b2016-01-27 01:36:03 -0800318 defines = []
Zeke Chin71f6f442015-06-29 14:34:58 -0700319 deps = [
Patrik Höglund99175c62018-01-08 11:05:10 +0100320 ":video_codec_interface",
ehmaldonado36df2d72016-12-08 09:56:16 -0800321 ":video_coding_utility",
Yves Gerey3e707812018-11-28 16:47:49 +0100322 "../../:webrtc_common",
Emircan Uysalerd4c16b12018-07-23 17:55:25 -0700323 "../../api/video:video_frame",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200324 "../../api/video:video_frame_i420",
Magnus Jedvert849b3ae2017-09-29 17:54:09 +0200325 "../../api/video_codecs:video_codecs_api",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100326 "../../media:rtc_h264_profile_id",
magjed21d110f2017-02-28 00:28:04 -0800327 "../../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100328 "../../rtc_base:checks",
Patrik Höglund76df0df2017-12-19 11:50:21 +0100329 "../../rtc_base:rtc_base",
Mirko Bonadei276827c2018-10-16 14:13:50 +0200330 "../../rtc_base/system:rtc_export",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200331 "../../system_wrappers:metrics",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200332 "//third_party/abseil-cpp/absl/memory",
Niels Möller039743e2018-10-23 10:07:25 +0200333 "//third_party/abseil-cpp/absl/strings",
Yves Gerey3e707812018-11-28 16:47:49 +0100334 "//third_party/abseil-cpp/absl/types:optional",
Sergio Garcia Murillo43800f92018-06-21 16:16:38 +0200335 "//third_party/libyuv",
Zeke Chin71f6f442015-06-29 14:34:58 -0700336 ]
hbosa9a1d2a2016-01-11 10:19:02 -0800337
hbos902c03e2016-01-21 03:34:40 -0800338 if (rtc_use_h264) {
Mirko Bonadeiee0a85c2019-01-15 10:47:18 +0100339 assert(!(is_win && !is_clang), "See: bugs.webrtc.org/9213#c13.")
hbosbab934b2016-01-27 01:36:03 -0800340 sources += [
Emircan Uysalerd4c16b12018-07-23 17:55:25 -0700341 "codecs/h264/h264_color_space.cc",
342 "codecs/h264/h264_color_space.h",
hbosbab934b2016-01-27 01:36:03 -0800343 "codecs/h264/h264_decoder_impl.cc",
344 "codecs/h264/h264_decoder_impl.h",
345 "codecs/h264/h264_encoder_impl.cc",
346 "codecs/h264/h264_encoder_impl.h",
347 ]
hbosa9a1d2a2016-01-11 10:19:02 -0800348 deps += [
kjellanderf6b55092016-02-07 23:04:26 -0800349 "../../common_video",
hbosa9a1d2a2016-01-11 10:19:02 -0800350 "//third_party/ffmpeg:ffmpeg",
351 "//third_party/openh264:encoder",
352 ]
Oleh Prypin2b82ee72018-01-15 09:44:18 +0100353
Dan Minor9c686132018-01-15 10:20:00 -0500354 if (!build_with_mozilla) {
355 deps += [ "../../media:rtc_media_base" ]
356 }
hbosa9a1d2a2016-01-11 10:19:02 -0800357 }
Zeke Chin71f6f442015-06-29 14:34:58 -0700358}
359
Emircan Uysalerd7ae3c32018-01-25 13:01:09 -0800360rtc_static_library("webrtc_multiplex") {
Emircan Uysalerdbcac7f2017-10-30 23:10:12 -0700361 sources = [
Tarek Hefny77c8e652018-08-15 10:19:32 -0700362 "codecs/multiplex/augmented_video_frame_buffer.cc",
363 "codecs/multiplex/include/augmented_video_frame_buffer.h",
Emircan Uysalerd7ae3c32018-01-25 13:01:09 -0800364 "codecs/multiplex/include/multiplex_decoder_adapter.h",
Emircan Uysalerd7ae3c32018-01-25 13:01:09 -0800365 "codecs/multiplex/include/multiplex_encoder_adapter.h",
366 "codecs/multiplex/multiplex_decoder_adapter.cc",
367 "codecs/multiplex/multiplex_encoded_image_packer.cc",
Emircan Uysalered425d12018-09-06 15:35:55 -0700368 "codecs/multiplex/multiplex_encoded_image_packer.h",
Emircan Uysalerd7ae3c32018-01-25 13:01:09 -0800369 "codecs/multiplex/multiplex_encoder_adapter.cc",
Emircan Uysalerdbcac7f2017-10-30 23:10:12 -0700370 ]
371
372 if (!build_with_chromium && is_clang) {
373 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
374 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
375 }
376
377 deps = [
Patrik Höglund99175c62018-01-08 11:05:10 +0100378 ":video_codec_interface",
Emircan Uysalerdbcac7f2017-10-30 23:10:12 -0700379 ":video_coding_utility",
380 "..:module_api",
381 "../..:webrtc_common",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100382 "../../api:scoped_refptr",
Niels Möller4dc66c52018-10-05 14:17:58 +0200383 "../../api/video:encoded_image",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200384 "../../api/video:video_frame",
385 "../../api/video:video_frame_i420",
Emircan Uysalerdbcac7f2017-10-30 23:10:12 -0700386 "../../api/video_codecs:video_codecs_api",
387 "../../common_video:common_video",
Yves Gerey3e707812018-11-28 16:47:49 +0100388 "../../rtc_base:checks",
Patrik Höglund76df0df2017-12-19 11:50:21 +0100389 "../../rtc_base:rtc_base",
Emircan Uysalerdbcac7f2017-10-30 23:10:12 -0700390 "../../system_wrappers",
Qiang Chena7c7a192018-01-24 13:36:41 -0800391 "../rtp_rtcp:rtp_rtcp_format",
Emircan Uysalerdbcac7f2017-10-30 23:10:12 -0700392 ]
393}
394
Sergio Garcia Murillo43800f92018-06-21 16:16:38 +0200395# This target includes the internal SW codec.
396rtc_static_library("webrtc_vp8") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000397 visibility = [ "*" ]
Sergio Garcia Murillo43800f92018-06-21 16:16:38 +0200398 poisonous = [ "software_video_codecs" ]
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000399 sources = [
Lu Liu65526952017-12-20 18:08:36 +0000400 "codecs/vp8/include/vp8.h",
Erik Språng5fbc0e02018-10-04 17:52:36 +0200401 "codecs/vp8/libvpx_interface.cc",
402 "codecs/vp8/libvpx_interface.h",
Sergio Garcia Murillo43800f92018-06-21 16:16:38 +0200403 "codecs/vp8/libvpx_vp8_decoder.cc",
404 "codecs/vp8/libvpx_vp8_decoder.h",
405 "codecs/vp8/libvpx_vp8_encoder.cc",
406 "codecs/vp8/libvpx_vp8_encoder.h",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100407 ]
408
Anders Carlssondd8c1652018-01-30 10:32:13 +0100409 if (!build_with_chromium && is_clang) {
410 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
411 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
412 }
413
414 deps = [
Erik Språng8abd56c2018-10-01 18:47:03 +0200415 ":codec_globals_headers",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100416 ":video_codec_interface",
417 ":video_coding_utility",
Erik Språng4529fbc2018-10-12 10:30:31 +0200418 ":webrtc_vp8_temporal_layers",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100419 "..:module_api",
420 "../..:webrtc_common",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100421 "../../api:scoped_refptr",
Niels Möller4dc66c52018-10-05 14:17:58 +0200422 "../../api/video:encoded_image",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200423 "../../api/video:video_frame",
Yves Gerey3e707812018-11-28 16:47:49 +0100424 "../../api/video:video_frame_i420",
Erik Språng4529fbc2018-10-12 10:30:31 +0200425 "../../api/video_codecs:create_vp8_temporal_layers",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100426 "../../api/video_codecs:video_codecs_api",
427 "../../common_video",
428 "../../rtc_base:checks",
429 "../../rtc_base:rtc_base_approved",
430 "../../rtc_base:rtc_numerics",
Åsa Perssonf8ba95e2018-11-02 11:38:46 +0100431 "../../rtc_base/experiments:cpu_speed_experiment",
Jiawei Ouaa7bc7e2018-12-11 14:25:25 -0800432 "../../rtc_base/experiments:field_trial_parser",
Erik Språng4b4266f2019-01-23 12:48:13 +0100433 "../../rtc_base/experiments:rate_control_settings",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100434 "../../system_wrappers",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200435 "../../system_wrappers:field_trial",
436 "../../system_wrappers:metrics",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200437 "//third_party/abseil-cpp/absl/memory",
Danil Chapovalov0040b662018-06-18 10:48:16 +0200438 "//third_party/abseil-cpp/absl/types:optional",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100439 "//third_party/libyuv",
440 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000441 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200442 deps += [ rtc_libvpx_dir ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000443 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000444}
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000445
Erik Språng4529fbc2018-10-12 10:30:31 +0200446rtc_static_library("webrtc_vp8_temporal_layers") {
447 visibility = [ "*" ]
448 sources = [
449 "codecs/vp8/default_temporal_layers.cc",
450 "codecs/vp8/default_temporal_layers.h",
451 "codecs/vp8/include/temporal_layers_checker.h",
452 "codecs/vp8/screenshare_layers.cc",
453 "codecs/vp8/screenshare_layers.h",
454 "codecs/vp8/temporal_layers.h",
455 "codecs/vp8/temporal_layers_checker.cc",
456 ]
457
458 if (!build_with_chromium && is_clang) {
459 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
460 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
461 }
462
463 deps = [
464 ":codec_globals_headers",
465 ":video_codec_interface",
466 ":video_coding_utility",
467 "..:module_api",
468 "../..:webrtc_common",
469 "../../api/video_codecs:video_codecs_api",
470 "../../rtc_base:checks",
471 "../../rtc_base:rtc_base_approved",
472 "../../rtc_base:rtc_numerics",
473 "../../system_wrappers",
474 "../../system_wrappers:field_trial",
475 "../../system_wrappers:metrics",
476 "//third_party/abseil-cpp/absl/memory",
477 "//third_party/abseil-cpp/absl/types:optional",
478 ]
479}
480
Sergey Silkin86684962018-03-28 19:32:37 +0200481# This target includes VP9 files that may be used for any VP9 codec, internal SW or external HW.
482rtc_static_library("webrtc_vp9_helpers") {
483 sources = [
484 "codecs/vp9/svc_config.cc",
485 "codecs/vp9/svc_config.h",
486 "codecs/vp9/svc_rate_allocator.cc",
487 "codecs/vp9/svc_rate_allocator.h",
488 ]
489
Sergey Silkin86684962018-03-28 19:32:37 +0200490 if (!build_with_chromium && is_clang) {
491 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
492 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
493 }
494
495 deps = [
Yves Gerey3e707812018-11-28 16:47:49 +0100496 ":codec_globals_headers",
Sergey Silkin86684962018-03-28 19:32:37 +0200497 ":video_codec_interface",
498 "../..:webrtc_common",
Yves Gerey3e707812018-11-28 16:47:49 +0100499 "../../api/video:video_bitrate_allocation",
Jiawei Ou4206a0a2018-07-20 15:49:43 -0700500 "../../api/video:video_bitrate_allocator",
Niels Möllera46bd4b2018-06-08 14:03:44 +0200501 "../../api/video_codecs:video_codecs_api",
Sergey Silkin86684962018-03-28 19:32:37 +0200502 "../../common_video",
503 "../../rtc_base:checks",
504 ]
505}
506
kjellanderb62dbbe2016-09-23 00:38:52 -0700507rtc_static_library("webrtc_vp9") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000508 visibility = [ "*" ]
Anders Carlsson1f433e42018-04-24 16:39:05 +0200509 poisonous = [ "software_video_codecs" ]
Mirko Bonadei95adedb2018-11-19 09:52:37 +0100510 sources = [
511 "codecs/vp9/include/vp9.h",
512 "codecs/vp9/vp9.cc",
513 "codecs/vp9/vp9_frame_buffer_pool.cc",
514 "codecs/vp9/vp9_frame_buffer_pool.h",
515 "codecs/vp9/vp9_impl.cc",
516 "codecs/vp9/vp9_impl.h",
517 ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000518
kjellandere40a7ee2016-10-16 23:56:12 -0700519 if (!build_with_chromium && is_clang) {
520 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700521 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000522 }
523
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000524 deps = [
Patrik Höglund99175c62018-01-08 11:05:10 +0100525 ":video_codec_interface",
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000526 ":video_coding_utility",
Sergey Silkin86684962018-03-28 19:32:37 +0200527 ":webrtc_vp9_helpers",
mbonadei1140f972017-04-26 03:38:35 -0700528 "..:module_api",
Sergey Silkin86684962018-03-28 19:32:37 +0200529 "../..:webrtc_common",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100530 "../../api:scoped_refptr",
Emircan Uysaler800787f2018-07-16 10:01:49 -0700531 "../../api/video:video_frame",
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700532 "../../api/video:video_frame_i010",
Emircan Uysaler98badbc2018-06-28 10:59:02 -0700533 "../../api/video_codecs:video_codecs_api",
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000534 "../../common_video",
Emircan Uysaler98badbc2018-06-28 10:59:02 -0700535 "../../media:rtc_media_base",
536 "../../media:rtc_vp9_profile",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100537 "../../rtc_base:checks",
Patrik Höglund76df0df2017-12-19 11:50:21 +0100538 "../../rtc_base:rtc_base",
Erik Språng4b4266f2019-01-23 12:48:13 +0100539 "../../rtc_base/experiments:rate_control_settings",
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000540 "../../system_wrappers",
Sergey Silkin390f3582018-10-01 17:13:50 +0200541 "../../system_wrappers:field_trial",
Sergey Silkind902d582018-05-18 17:31:19 +0200542 "../rtp_rtcp:rtp_rtcp_format",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200543 "//third_party/abseil-cpp/absl/memory",
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000544 ]
545 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200546 deps += [ rtc_libvpx_dir ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000547 }
548}
kjellanderfb114242016-06-13 00:19:48 -0700549
550if (rtc_include_tests) {
Rasmus Brandtf1053252018-02-05 09:52:31 +0100551 if (is_android) {
552 rtc_static_library("android_codec_factory_helper") {
magjed73c0eb52017-08-07 06:55:28 -0700553 sources = [
Rasmus Brandtf1053252018-02-05 09:52:31 +0100554 "codecs/test/android_codec_factory_helper.cc",
555 "codecs/test/android_codec_factory_helper.h",
magjed73c0eb52017-08-07 06:55:28 -0700556 ]
Rasmus Brandtf1053252018-02-05 09:52:31 +0100557
558 deps = [
559 "../../api/video_codecs:video_codecs_api",
560 "../../rtc_base:checks",
561 "../../rtc_base:rtc_base_approved",
562 "../../sdk/android:native_api_base",
563 "../../sdk/android:native_api_codecs",
564 "../../sdk/android:native_api_jni",
565 "//base",
566 ]
567 }
568 }
569
570 if (is_ios || is_mac) {
571 rtc_static_library("objc_codec_factory_helper") {
572 sources = [
573 "codecs/test/objc_codec_factory_helper.h",
574 "codecs/test/objc_codec_factory_helper.mm",
575 ]
576
magjed73c0eb52017-08-07 06:55:28 -0700577 deps = [
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200578 "../../api/video:video_frame",
magjed73c0eb52017-08-07 06:55:28 -0700579 "../../api/video_codecs:video_codecs_api",
580 "../../media:rtc_audio_video",
Rasmus Brandtf1053252018-02-05 09:52:31 +0100581 "../../media:rtc_media_base",
magjed73c0eb52017-08-07 06:55:28 -0700582 "../../modules:module_api",
Magnus Jedverte4a9e922017-12-04 14:09:40 +0100583 "../../rtc_base:rtc_base_approved",
Anders Carlsson3ff50fb2018-02-01 15:47:05 +0100584 "../../sdk:native_api",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100585 "../../sdk:peerconnectionfactory_base_objc",
Mirko Bonadei111a0d12018-02-19 09:58:00 +0100586 "../../sdk:videocodec_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100587 "../../sdk:videosource_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700588 "../../sdk:videotoolbox_objc",
magjed73c0eb52017-08-07 06:55:28 -0700589 ]
590
591 if (!build_with_chromium && is_clang) {
592 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
593 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
594 }
595 }
596 }
597
Rasmus Brandt0cedc052018-05-31 12:53:00 +0200598 rtc_source_set("simulcast_test_fixture_impl") {
magjed6cc25612017-07-10 03:26:36 -0700599 testonly = true
600 sources = [
Sergio Garcia Murillo43800f92018-06-21 16:16:38 +0200601 "utility/simulcast_test_fixture_impl.cc",
602 "utility/simulcast_test_fixture_impl.h",
magjed6cc25612017-07-10 03:26:36 -0700603 ]
604
605 if (!build_with_chromium && is_clang) {
606 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
607 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
608 }
609
610 deps = [
charujaincb728ea2017-09-18 03:08:08 -0700611 ":mock_headers",
Patrik Höglund99175c62018-01-08 11:05:10 +0100612 ":video_codec_interface",
magjed6cc25612017-07-10 03:26:36 -0700613 ":video_coding",
Sergio Garcia Murillo43800f92018-06-21 16:16:38 +0200614 ":video_coding_utility",
Rasmus Brandt0cedc052018-05-31 12:53:00 +0200615 "../../:webrtc_common",
Erik Språngc84cd952018-10-15 11:55:13 +0200616 "../../api:mock_video_decoder",
617 "../../api:mock_video_encoder",
Rasmus Brandt0cedc052018-05-31 12:53:00 +0200618 "../../api:simulcast_test_fixture_api",
Niels Möller4dc66c52018-10-05 14:17:58 +0200619 "../../api/video:encoded_image",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200620 "../../api/video:video_frame",
621 "../../api/video:video_frame_i420",
Rasmus Brandt0cedc052018-05-31 12:53:00 +0200622 "../../api/video_codecs:video_codecs_api",
magjed6cc25612017-07-10 03:26:36 -0700623 "../../common_video:common_video",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100624 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700625 "../../rtc_base:rtc_base_approved",
magjed6cc25612017-07-10 03:26:36 -0700626 "../../test:test_support",
Artem Titov1ebfb6a2019-01-03 23:49:37 +0100627 "//third_party/abseil-cpp/absl/memory:memory",
magjed6cc25612017-07-10 03:26:36 -0700628 ]
629 }
630
ehmaldonado38a21322016-09-02 04:10:34 -0700631 rtc_source_set("video_codecs_test_framework") {
kjellanderfb114242016-06-13 00:19:48 -0700632 testonly = true
633 sources = [
Rasmus Brandt98a867c2018-02-01 15:45:38 +0100634 "codecs/test/video_codec_unittest.cc",
635 "codecs/test/video_codec_unittest.h",
kjellanderfb114242016-06-13 00:19:48 -0700636 "codecs/test/videoprocessor.cc",
637 "codecs/test/videoprocessor.h",
638 ]
639
kjellandere40a7ee2016-10-16 23:56:12 -0700640 if (!build_with_chromium && is_clang) {
641 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700642 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -0700643 }
644
645 deps = [
Yves Gerey3e707812018-11-28 16:47:49 +0100646 ":codec_globals_headers",
Patrik Höglund99175c62018-01-08 11:05:10 +0100647 ":video_codec_interface",
ehmaldonado36df2d72016-12-08 09:56:16 -0800648 ":video_coding",
649 ":video_coding_utility",
Sergey Silkin86684962018-03-28 19:32:37 +0200650 ":webrtc_vp9_helpers",
Yves Gerey3e707812018-11-28 16:47:49 +0100651 "..:module_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800652 "../..:webrtc_common",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100653 "../../api:scoped_refptr",
Kári Tristan Helgason169005d2018-05-22 13:34:14 +0200654 "../../api:videocodec_test_fixture_api",
Jiawei Ouc2ebe212018-11-08 10:02:56 -0800655 "../../api/video:builtin_video_bitrate_allocator_factory",
Yves Gerey3e707812018-11-28 16:47:49 +0100656 "../../api/video:encoded_image",
657 "../../api/video:video_bitrate_allocation",
Jiawei Ou4206a0a2018-07-20 15:49:43 -0700658 "../../api/video:video_bitrate_allocator",
Yves Gerey3e707812018-11-28 16:47:49 +0100659 "../../api/video:video_bitrate_allocator_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200660 "../../api/video:video_frame",
661 "../../api/video:video_frame_i420",
ilnikd60d06a2017-04-05 03:02:20 -0700662 "../../api/video_codecs:video_codecs_api",
ehmaldonado36df2d72016-12-08 09:56:16 -0800663 "../../common_video:common_video",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100664 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700665 "../../rtc_base:rtc_base_approved",
brandtrc8c59052017-08-21 06:44:16 -0700666 "../../rtc_base:rtc_task_queue",
Rasmus Brandt8dd4db42018-05-16 09:38:42 +0200667 "../../rtc_base:rtc_task_queue_for_test",
brandtrc8c59052017-08-21 06:44:16 -0700668 "../../rtc_base:sequenced_task_checker",
kjellanderfb114242016-06-13 00:19:48 -0700669 "../../test:test_support",
sakalb8102e02017-03-06 03:52:55 -0800670 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800671 "../../test:video_test_support",
Sergey Silkin3be2a552018-01-17 15:11:44 +0100672 "../rtp_rtcp:rtp_rtcp_format",
Yves Gerey3e707812018-11-28 16:47:49 +0100673 "//third_party/abseil-cpp/absl/memory",
674 "//third_party/abseil-cpp/absl/types:optional",
Sergey Silkin10d9d592018-02-01 13:25:17 +0100675 "//third_party/libyuv",
kjellanderfb114242016-06-13 00:19:48 -0700676 ]
677 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800678
Sergey Silkin1d2b6272018-03-28 13:04:35 +0200679 video_coding_modules_tests_resources = []
Rasmus Brandtcd7da922018-04-25 12:45:16 +0200680 if (is_android) {
681 video_coding_modules_tests_resources += [
682 "../../resources/foreman_128x96.yuv",
683 "../../resources/foreman_160x120.yuv",
684 "../../resources/foreman_176x144.yuv",
685 "../../resources/foreman_240x136.yuv",
686 "../../resources/foreman_320x240.yuv",
687 "../../resources/foreman_480x272.yuv",
688 ]
689 }
Kári Tristan Helgason8eeda492018-05-16 16:46:58 +0200690 if (!is_android) {
Sergey Silkin32858972018-03-09 11:04:15 +0100691 video_coding_modules_tests_resources += [
692 "../../resources/FourPeople_1280x720_30.yuv",
693 "../../resources/ConferenceMotion_1280_720_50.yuv",
694 ]
Sergey Silkin556270c2018-02-27 15:18:18 +0100695 }
696
Sergey Silkin1d2b6272018-03-28 13:04:35 +0200697 num_video_coding_modules_tests_resources = 0
698 foreach(i, video_coding_modules_tests_resources) {
699 num_video_coding_modules_tests_resources += 1
700 }
701
702 if (num_video_coding_modules_tests_resources > 0) {
703 if (is_ios || is_mac) {
704 bundle_data("video_coding_modules_tests_resources_bundle_data") {
705 testonly = true
706 sources = video_coding_modules_tests_resources
707 outputs = [
708 "{{bundle_resources_dir}}/{{source_file_part}}",
709 ]
710 }
brandtr12a47f62017-09-01 00:10:27 -0700711 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800712 }
713
Kári Tristan Helgason9d96e922018-05-04 11:56:55 +0200714 rtc_source_set("videocodec_test_impl") {
brandtr6bb8e0e2017-02-20 04:35:52 -0800715 testonly = true
brandtr6bb8e0e2017-02-20 04:35:52 -0800716 sources = [
Kári Tristan Helgason9d96e922018-05-04 11:56:55 +0200717 "codecs/test/videocodec_test_fixture_impl.cc",
718 "codecs/test/videocodec_test_fixture_impl.h",
Kári Tristan Helgason169005d2018-05-22 13:34:14 +0200719 "codecs/test/videocodec_test_stats_impl.cc",
720 "codecs/test/videocodec_test_stats_impl.h",
brandtr6bb8e0e2017-02-20 04:35:52 -0800721 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800722 deps = [
Yves Gerey3e707812018-11-28 16:47:49 +0100723 ":codec_globals_headers",
Patrik Höglund99175c62018-01-08 11:05:10 +0100724 ":video_codec_interface",
sakalb8102e02017-03-06 03:52:55 -0800725 ":video_codecs_test_framework",
brandtrdf232992017-09-07 07:50:06 -0700726 ":video_coding_utility",
Sergey Silkin86684962018-03-28 19:32:37 +0200727 ":webrtc_vp9_helpers",
brandtrdf232992017-09-07 07:50:06 -0700728 "../..:webrtc_common",
Yves Gerey3e707812018-11-28 16:47:49 +0100729 "../../api:array_view",
Kári Tristan Helgason9d96e922018-05-04 11:56:55 +0200730 "../../api:videocodec_test_fixture_api",
Danil Chapovalov99b71df2018-10-26 15:57:48 +0200731 "../../api/test/video:function_video_factory",
Yves Gerey3e707812018-11-28 16:47:49 +0100732 "../../api/video:video_bitrate_allocation",
Mirko Bonadei34814c72018-01-11 10:13:56 +0100733 "../../api/video_codecs:video_codecs_api",
Kári Tristan Helgason169005d2018-05-22 13:34:14 +0200734 "../../call:video_stream_api",
brandtrdf232992017-09-07 07:50:06 -0700735 "../../common_video",
Kári Tristan Helgason169005d2018-05-22 13:34:14 +0200736 "../../media:rtc_audio_video",
737 "../../media:rtc_h264_profile_id",
Anders Carlssona114c882018-01-04 15:10:22 +0100738 "../../media:rtc_internal_video_codecs",
Rasmus Brandt2aae2732018-05-29 09:31:15 +0200739 "../../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100740 "../../rtc_base:checks",
Rasmus Brandt2aae2732018-05-29 09:31:15 +0200741 "../../rtc_base:rtc_base_approved",
Åsa Persson7173cf22017-10-19 12:14:09 +0200742 "../../rtc_base:rtc_base_tests_utils",
Rasmus Brandt2aae2732018-05-29 09:31:15 +0200743 "../../rtc_base:rtc_event",
Rasmus Brandt8dd4db42018-05-16 09:38:42 +0200744 "../../rtc_base:rtc_task_queue_for_test",
brandtrdf232992017-09-07 07:50:06 -0700745 "../../system_wrappers",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100746 "../../test:fileutils",
Kári Tristan Helgason169005d2018-05-22 13:34:14 +0200747 "../../test:test_common",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800748 "../../test:test_support",
Kári Tristan Helgason169005d2018-05-22 13:34:14 +0200749 "../../test:video_test_common",
brandtrdf232992017-09-07 07:50:06 -0700750 "../../test:video_test_support",
Kári Tristan Helgason169005d2018-05-22 13:34:14 +0200751 "../rtp_rtcp:rtp_rtcp_format",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200752 "//third_party/abseil-cpp/absl/memory",
Yves Gerey3e707812018-11-28 16:47:49 +0100753 "//third_party/abseil-cpp/absl/types:optional",
Kári Tristan Helgason9d96e922018-05-04 11:56:55 +0200754 ]
755 if (!build_with_chromium && is_clang) {
756 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
757 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
758 }
Kári Tristan Helgason9d96e922018-05-04 11:56:55 +0200759 }
760
761 rtc_source_set("video_coding_modules_tests") {
762 testonly = true
Johannes Kron108f20f2019-02-07 16:42:45 +0100763 defines = []
Kári Tristan Helgason9d96e922018-05-04 11:56:55 +0200764
765 sources = [
766 "codecs/h264/test/h264_impl_unittest.cc",
767 "codecs/multiplex/test/multiplex_adapter_unittest.cc",
768 "codecs/test/video_encoder_decoder_instantiation_tests.cc",
769 "codecs/test/videocodec_test_libvpx.cc",
Kári Tristan Helgason9d96e922018-05-04 11:56:55 +0200770 "codecs/test/videocodec_test_parameterized.cc",
Erik Språng5fbc0e02018-10-04 17:52:36 +0200771 "codecs/vp8/test/mock_libvpx_interface.h",
Kári Tristan Helgason9d96e922018-05-04 11:56:55 +0200772 "codecs/vp8/test/vp8_impl_unittest.cc",
773 "codecs/vp9/test/vp9_impl_unittest.cc",
774 ]
Rasmus Brandta7e48442018-05-14 17:11:49 +0200775 if (rtc_use_h264) {
776 sources += [ "codecs/test/videocodec_test_openh264.cc" ]
777 }
Kári Tristan Helgason9d96e922018-05-04 11:56:55 +0200778
779 deps = [
Erik Språngdcc02382018-10-10 14:58:46 +0200780 ":mock_headers",
Yves Gerey3e707812018-11-28 16:47:49 +0100781 ":video_codec_interface",
Kári Tristan Helgason9d96e922018-05-04 11:56:55 +0200782 ":video_codecs_test_framework",
783 ":video_coding_utility",
784 ":videocodec_test_impl",
785 ":webrtc_h264",
786 ":webrtc_multiplex",
Sergio Garcia Murillo43800f92018-06-21 16:16:38 +0200787 ":webrtc_vp8",
Kári Tristan Helgason9d96e922018-05-04 11:56:55 +0200788 ":webrtc_vp9",
789 ":webrtc_vp9_helpers",
790 "../..:webrtc_common",
791 "../../api:create_videocodec_test_fixture_api",
792 "../../api:mock_video_codec_factory",
Erik Språngc84cd952018-10-15 11:55:13 +0200793 "../../api:mock_video_decoder",
794 "../../api:mock_video_encoder",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100795 "../../api:scoped_refptr",
Kári Tristan Helgason9d96e922018-05-04 11:56:55 +0200796 "../../api:videocodec_test_fixture_api",
Danil Chapovalov99b71df2018-10-26 15:57:48 +0200797 "../../api/test/video:function_video_factory",
Yves Gerey3e707812018-11-28 16:47:49 +0100798 "../../api/video:encoded_image",
Emircan Uysaler800787f2018-07-16 10:01:49 -0700799 "../../api/video:video_frame",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200800 "../../api/video:video_frame_i420",
Anders Carlssondd3e0ab2018-06-12 11:15:56 +0200801 "../../api/video_codecs:rtc_software_fallback_wrappers",
Kári Tristan Helgason9d96e922018-05-04 11:56:55 +0200802 "../../api/video_codecs:video_codecs_api",
803 "../../common_video",
Johannes Kronf1ab9b92018-12-14 10:14:07 +0100804 "../../common_video/test:utilities",
Kári Tristan Helgason9d96e922018-05-04 11:56:55 +0200805 "../../media:rtc_h264_profile_id",
Anders Carlssonb3306882018-05-14 10:11:42 +0200806 "../../media:rtc_internal_video_codecs",
Kári Tristan Helgason9d96e922018-05-04 11:56:55 +0200807 "../../media:rtc_media_base",
Jonathan Yu9a5da492018-10-19 00:51:18 -0700808 "../../media:rtc_simulcast_encoder_adapter",
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700809 "../../media:rtc_vp9_profile",
Kári Tristan Helgason9d96e922018-05-04 11:56:55 +0200810 "../../rtc_base:rtc_base",
Sergey Silkin390f3582018-10-01 17:13:50 +0200811 "../../test:field_trial",
Kári Tristan Helgason9d96e922018-05-04 11:56:55 +0200812 "../../test:fileutils",
813 "../../test:test_support",
814 "../../test:video_test_common",
Sergey Silkind902d582018-05-18 17:31:19 +0200815 "../rtp_rtcp:rtp_rtcp_format",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200816 "//third_party/abseil-cpp/absl/memory",
Danil Chapovalov0040b662018-06-18 10:48:16 +0200817 "//third_party/abseil-cpp/absl/types:optional",
Emircan Uysaler0823eec2018-07-13 17:10:00 -0700818 "//third_party/libyuv",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800819 ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800820
brandtrdf232992017-09-07 07:50:06 -0700821 data = video_coding_modules_tests_resources
brandtr6bb8e0e2017-02-20 04:35:52 -0800822
823 if (is_android) {
Kári Tristan Helgason9d96e922018-05-04 11:56:55 +0200824 sources += [ "codecs/test/videocodec_test_mediacodec.cc" ]
Rasmus Brandt31027342017-09-29 13:48:12 +0000825
Rasmus Brandtf1053252018-02-05 09:52:31 +0100826 deps += [ ":android_codec_factory_helper" ]
brandtr6bb8e0e2017-02-20 04:35:52 -0800827 }
828
829 if (is_ios || is_mac) {
Kári Tristan Helgason9d96e922018-05-04 11:56:55 +0200830 sources += [ "codecs/test/videocodec_test_videotoolbox.cc" ]
Rasmus Brandtf7a35582017-10-24 10:16:33 +0200831
Sergey Silkin1d2b6272018-03-28 13:04:35 +0200832 deps += [ ":objc_codec_factory_helper" ]
833
834 if (num_video_coding_modules_tests_resources > 0) {
835 deps += [ ":video_coding_modules_tests_resources_bundle_data" ]
836 }
brandtr6bb8e0e2017-02-20 04:35:52 -0800837 }
838
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800839 if (!build_with_chromium && is_clang) {
840 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
841 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
842 }
Erik Språngdcc02382018-10-10 14:58:46 +0200843
844 if (rtc_build_libvpx) {
845 deps += [ rtc_libvpx_dir ]
846 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800847 }
848
ehmaldonado36268652017-01-19 08:27:11 -0800849 rtc_source_set("video_coding_unittests") {
850 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700851
ehmaldonado36268652017-01-19 08:27:11 -0800852 sources = [
Kári Tristan Helgason169005d2018-05-22 13:34:14 +0200853 "codecs/test/videocodec_test_fixture_config_unittest.cc",
854 "codecs/test/videocodec_test_stats_impl_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800855 "codecs/test/videoprocessor_unittest.cc",
856 "codecs/vp8/default_temporal_layers_unittest.cc",
Rasmus Brandt0cedc052018-05-31 12:53:00 +0200857 "codecs/vp8/libvpx_vp8_simulcast_test.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800858 "codecs/vp8/screenshare_layers_unittest.cc",
Sergey Silkin1322dbc2018-04-23 12:30:35 +0200859 "codecs/vp9/svc_config_unittest.cc",
Sergey Silkin86684962018-03-28 19:32:37 +0200860 "codecs/vp9/svc_rate_allocator_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800861 "decoding_state_unittest.cc",
Ying Wang3b790f32018-01-19 17:58:57 +0100862 "fec_controller_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800863 "frame_buffer2_unittest.cc",
ilnik04f4d122017-06-19 07:18:55 -0700864 "generic_encoder_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800865 "h264_sprop_parameter_sets_unittest.cc",
866 "h264_sps_pps_tracker_unittest.cc",
867 "histogram_unittest.cc",
868 "include/mock/mock_vcm_callbacks.h",
869 "jitter_buffer_unittest.cc",
870 "jitter_estimator_tests.cc",
871 "nack_module_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800872 "receiver_unittest.cc",
873 "rtp_frame_reference_finder_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800874 "session_info_unittest.cc",
875 "test/stream_generator.cc",
876 "test/stream_generator.h",
877 "timing_unittest.cc",
Ilya Nikolaevskiy13717842019-01-14 13:24:22 +0100878 "utility/decoded_frames_history_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800879 "utility/default_video_bitrate_allocator_unittest.cc",
880 "utility/frame_dropper_unittest.cc",
Sergey Silkinae3144c2018-08-29 01:05:26 +0200881 "utility/framerate_controller_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800882 "utility/ivf_file_writer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800883 "utility/quality_scaler_unittest.cc",
884 "utility/simulcast_rate_allocator_unittest.cc",
sprang429600d2017-01-26 06:12:26 -0800885 "video_codec_initializer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800886 "video_packet_buffer_unittest.cc",
887 "video_receiver_unittest.cc",
888 "video_sender_unittest.cc",
889 ]
ehmaldonado36268652017-01-19 08:27:11 -0800890 if (rtc_use_h264) {
Sergio Garcia Murillo43800f92018-06-21 16:16:38 +0200891 sources += [
892 "codecs/h264/h264_encoder_impl_unittest.cc",
893 "codecs/h264/h264_simulcast_unittest.cc",
894 ]
ehmaldonado36268652017-01-19 08:27:11 -0800895 }
Anders Carlssonb3306882018-05-14 10:11:42 +0200896
ehmaldonado36268652017-01-19 08:27:11 -0800897 deps = [
Sergey Silkin86684962018-03-28 19:32:37 +0200898 ":codec_globals_headers",
philipeld5a272f2018-02-21 14:30:34 +0100899 ":encoded_frame",
charujaincb728ea2017-09-18 03:08:08 -0700900 ":mock_headers",
Ilya Nikolaevskiy8643b782018-06-07 16:15:40 +0200901 ":nack_module",
902 ":packet",
Sergio Garcia Murillo43800f92018-06-21 16:16:38 +0200903 ":simulcast_test_fixture_impl",
Patrik Höglund99175c62018-01-08 11:05:10 +0100904 ":video_codec_interface",
ehmaldonado36268652017-01-19 08:27:11 -0800905 ":video_codecs_test_framework",
906 ":video_coding",
907 ":video_coding_utility",
Kári Tristan Helgason169005d2018-05-22 13:34:14 +0200908 ":videocodec_test_impl",
ehmaldonado36268652017-01-19 08:27:11 -0800909 ":webrtc_h264",
910 ":webrtc_vp8",
Erik Språng4529fbc2018-10-12 10:30:31 +0200911 ":webrtc_vp8_temporal_layers",
ehmaldonado36268652017-01-19 08:27:11 -0800912 ":webrtc_vp9",
Sergey Silkin86684962018-03-28 19:32:37 +0200913 ":webrtc_vp9_helpers",
mbonadei1140f972017-04-26 03:38:35 -0700914 "..:module_api",
Yves Gerey3e707812018-11-28 16:47:49 +0100915 "..:module_fec_api",
ehmaldonado36268652017-01-19 08:27:11 -0800916 "../..:webrtc_common",
Yves Gerey3e707812018-11-28 16:47:49 +0100917 "../../api:array_view",
Rasmus Brandt0cedc052018-05-31 12:53:00 +0200918 "../../api:create_simulcast_test_fixture_api",
Yves Gerey3e707812018-11-28 16:47:49 +0100919 "../../api:fec_controller_api",
Erik Språngc84cd952018-10-15 11:55:13 +0200920 "../../api:mock_video_decoder",
921 "../../api:mock_video_encoder",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100922 "../../api:scoped_refptr",
Rasmus Brandt0cedc052018-05-31 12:53:00 +0200923 "../../api:simulcast_test_fixture_api",
Kári Tristan Helgason169005d2018-05-22 13:34:14 +0200924 "../../api:videocodec_test_fixture_api",
Danil Chapovalov99b71df2018-10-26 15:57:48 +0200925 "../../api/test/video:function_video_factory",
Jiawei Ouc2ebe212018-11-08 10:02:56 -0800926 "../../api/video:builtin_video_bitrate_allocator_factory",
Yves Gerey3e707812018-11-28 16:47:49 +0100927 "../../api/video:video_bitrate_allocation",
Jiawei Ou4206a0a2018-07-20 15:49:43 -0700928 "../../api/video:video_bitrate_allocator",
Jiawei Ouc2ebe212018-11-08 10:02:56 -0800929 "../../api/video:video_bitrate_allocator_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200930 "../../api/video:video_frame",
931 "../../api/video:video_frame_i420",
Erik Språng4529fbc2018-10-12 10:30:31 +0200932 "../../api/video_codecs:create_vp8_temporal_layers",
ilnikd60d06a2017-04-05 03:02:20 -0700933 "../../api/video_codecs:video_codecs_api",
ehmaldonado36268652017-01-19 08:27:11 -0800934 "../../common_video:common_video",
Kári Tristan Helgason8cbb1c92018-04-13 14:25:22 +0200935 "../../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100936 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700937 "../../rtc_base:rtc_base",
938 "../../rtc_base:rtc_base_approved",
Ilya Nikolaevskiy764aeb72018-04-03 10:01:52 +0200939 "../../rtc_base:rtc_base_tests_utils",
Bjorn Tereliusa194e582017-10-25 13:07:09 +0200940 "../../rtc_base:rtc_numerics",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700941 "../../rtc_base:rtc_task_queue",
Rasmus Brandt8dd4db42018-05-16 09:38:42 +0200942 "../../rtc_base:rtc_task_queue_for_test",
Erik Språngb1e031a2018-11-01 11:20:49 +0100943 "../../rtc_base/experiments:jitter_upper_bound_experiment",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100944 "../../system_wrappers",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200945 "../../system_wrappers:field_trial",
946 "../../system_wrappers:metrics",
ehmaldonado36268652017-01-19 08:27:11 -0800947 "../../test:field_trial",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100948 "../../test:fileutils",
Rasmus Brandt0cedc052018-05-31 12:53:00 +0200949 "../../test:test_common",
ehmaldonado36268652017-01-19 08:27:11 -0800950 "../../test:test_support",
951 "../../test:video_test_common",
ehmaldonado656610f2017-02-06 02:21:11 -0800952 "../../test:video_test_support",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100953 "../rtp_rtcp:rtp_rtcp_format",
Yves Gerey3e707812018-11-28 16:47:49 +0100954 "../rtp_rtcp:rtp_video_header",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200955 "//third_party/abseil-cpp/absl/memory",
Erik Språngb1e031a2018-11-01 11:20:49 +0100956 "//third_party/abseil-cpp/absl/types:optional",
Yves Gerey3e707812018-11-28 16:47:49 +0100957 "//third_party/abseil-cpp/absl/types:variant",
ehmaldonado36268652017-01-19 08:27:11 -0800958 ]
959 if (rtc_build_libvpx) {
960 deps += [ rtc_libvpx_dir ]
961 }
ehmaldonado36268652017-01-19 08:27:11 -0800962 if (!build_with_chromium && is_clang) {
963 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
964 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
965 }
966 }
kjellanderfb114242016-06-13 00:19:48 -0700967}