blob: 550f9f9fa03fe60a6145e704c3ed214910144f5d [file] [log] [blame]
kjellanderc76dc952016-06-03 03:09:32 -07001# Copyright (c) 2016 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
9import("//build/config/linux/pkg_config.gni")
mbonadei9aa3f0a2017-01-24 06:58:22 -080010import("../webrtc.gni")
kjellanderc76dc952016-06-03 03:09:32 -070011
12group("media") {
Dan Minor9c686132018-01-15 10:20:00 -050013 deps = []
14 if (!build_with_mozilla) {
15 deps += [
16 ":rtc_media",
17 ":rtc_media_base",
18 ]
19 }
kjellanderc76dc952016-06-03 03:09:32 -070020}
21
22config("rtc_media_defines_config") {
Fredrik Solenberge1dcce22019-02-05 12:43:03 +010023 defines = [ "HAVE_WEBRTC_VIDEO" ]
kjellanderc76dc952016-06-03 03:09:32 -070024}
25
Mirko Bonadei86d053c2019-10-17 21:32:04 +020026rtc_library("rtc_h264_profile_id") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000027 visibility = [ "*" ]
zhihuang130ca7e2017-06-21 01:02:59 -070028 sources = [
29 "base/h264_profile_level_id.cc",
30 "base/h264_profile_level_id.h",
31 ]
32
zhihuang130ca7e2017-06-21 01:02:59 -070033 deps = [
34 "..:webrtc_common",
Artem Titov94b57c02019-03-21 13:35:10 +010035 "../rtc_base",
Fredrik Solenbergf693bfa2018-12-11 12:22:10 +010036 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -070037 "../rtc_base:rtc_base_approved",
Mirko Bonadei276827c2018-10-16 14:13:50 +020038 "../rtc_base/system:rtc_export",
Danil Chapovalov00c71832018-06-15 15:58:38 +020039 "//third_party/abseil-cpp/absl/types:optional",
zhihuang130ca7e2017-06-21 01:02:59 -070040 ]
41}
42
Niels Möller6daa2782018-01-23 10:37:42 +010043rtc_source_set("rtc_media_config") {
44 visibility = [ "*" ]
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +010045 sources = [ "base/media_config.h" ]
Niels Möller6daa2782018-01-23 10:37:42 +010046}
47
Mirko Bonadei86d053c2019-10-17 21:32:04 +020048rtc_library("rtc_vp9_profile") {
Emircan Uysalerf73d40f2018-12-04 11:00:52 -050049 visibility = [ "*" ]
Emircan Uysaler98badbc2018-06-28 10:59:02 -070050 sources = [
51 "base/vp9_profile.cc",
52 "base/vp9_profile.h",
53 ]
54
55 deps = [
56 "..:webrtc_common",
57 "../api/video_codecs:video_codecs_api",
58 "../rtc_base:rtc_base_approved",
Mirko Bonadei66e76792019-04-02 11:33:59 +020059 "../rtc_base/system:rtc_export",
Emircan Uysaler98badbc2018-06-28 10:59:02 -070060 "//third_party/abseil-cpp/absl/types:optional",
61 ]
62}
63
Johannes Kronc8f31342019-12-19 15:05:20 +010064rtc_library("rtc_sdp_fmtp_utils") {
65 visibility = [ "*" ]
66 sources = [
67 "base/sdp_fmtp_utils.cc",
68 "base/sdp_fmtp_utils.h",
69 ]
70
71 deps = [
72 "../api/video_codecs:video_codecs_api",
73 "../rtc_base:stringutils",
74 "//third_party/abseil-cpp/absl/types:optional",
75 ]
76}
77
Mirko Bonadei86d053c2019-10-17 21:32:04 +020078rtc_library("rtc_media_base") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000079 visibility = [ "*" ]
kjellanderc76dc952016-06-03 03:09:32 -070080 defines = []
81 libs = []
Patrik Höglunda8005cf2017-12-13 16:05:42 +010082 deps = [
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +020083 ":rtc_h264_profile_id",
84 ":rtc_media_config",
85 ":rtc_vp9_profile",
86 "..:webrtc_common",
Yves Gerey3e707812018-11-28 16:47:49 +010087 "../api:array_view",
Niels Möllera6fe2612018-01-19 11:28:54 +010088 "../api:audio_options_api",
Marina Cioceae77912b2020-02-27 16:16:55 +010089 "../api:frame_transformer_interface",
Niels Möllere942b142019-09-17 14:30:41 +020090 "../api:media_stream_interface",
Mirko Bonadeifcfeefe2019-09-10 10:51:23 +020091 "../api:rtc_error",
Niels Möller6dcd4dc2019-08-26 10:45:28 +020092 "../api:rtp_parameters",
Mirko Bonadeid9708072019-01-25 20:26:48 +010093 "../api:scoped_refptr",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +020094 "../api/audio_codecs:audio_codecs_api",
Mirko Bonadeieaaaf412019-09-13 14:42:15 +020095 "../api/crypto:frame_decryptor_interface",
96 "../api/crypto:frame_encryptor_interface",
97 "../api/crypto:options",
Patrik Höglund56d94522019-11-18 15:53:32 +010098 "../api/transport:stun_types",
Niels Möller65f17ca2019-09-12 13:59:36 +020099 "../api/transport/media:media_transport_interface",
Niels Möllera8370302019-09-02 15:16:49 +0200100 "../api/transport/rtp:rtp_source",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200101 "../api/video:video_bitrate_allocation",
Jonas Orelanda3aa9bd2019-04-17 07:38:40 +0200102 "../api/video:video_bitrate_allocator_factory",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200103 "../api/video:video_frame",
104 "../api/video:video_frame_i420",
Chen Xing5d24b162019-06-10 12:59:38 +0200105 "../api/video:video_rtp_headers",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200106 "../api/video_codecs:video_codecs_api",
107 "../call:call_interfaces",
Markus Handell32565f62019-12-04 10:58:17 +0100108 "../call:video_stream_api",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200109 "../common_video",
110 "../modules/audio_processing:audio_processing_statistics",
Henrik Boström87e3f9d2019-05-27 10:44:24 +0200111 "../modules/rtp_rtcp:rtp_rtcp_format",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200112 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100113 "../rtc_base:checks",
Tommi8d2c5a82018-03-19 11:12:48 +0100114 "../rtc_base:rtc_base_approved",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200115 "../rtc_base:rtc_base_approved",
Tommi8d2c5a82018-03-19 11:12:48 +0100116 "../rtc_base:rtc_task_queue",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100117 "../rtc_base:sanitizer",
Patrik Höglund3e113432017-12-15 14:40:10 +0100118 "../rtc_base:stringutils",
Sebastian Janssonb55015e2019-04-09 13:44:04 +0200119 "../rtc_base/synchronization:sequence_checker",
Niels Möllere8e4dc42019-06-11 14:04:16 +0200120 "../rtc_base/system:file_wrapper",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200121 "../rtc_base/system:rtc_export",
122 "../rtc_base/third_party/sigslot",
Åsa Persson3f7e0ed2019-10-18 15:03:13 +0200123 "../system_wrappers:field_trial",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200124 "//third_party/abseil-cpp/absl/algorithm:container",
125 "//third_party/abseil-cpp/absl/strings",
126 "//third_party/abseil-cpp/absl/types:optional",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100127 ]
kjellanderc76dc952016-06-03 03:09:32 -0700128 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800129 "base/adapted_video_track_source.cc",
130 "base/adapted_video_track_source.h",
131 "base/audio_source.h",
kjellanderc76dc952016-06-03 03:09:32 -0700132 "base/codec.cc",
133 "base/codec.h",
Ruslan Burakov493a6502019-02-27 15:32:48 +0100134 "base/delayable.h",
Steve Anton10542f22019-01-11 09:11:00 -0800135 "base/media_channel.cc",
136 "base/media_channel.h",
137 "base/media_constants.cc",
138 "base/media_constants.h",
139 "base/media_engine.cc",
140 "base/media_engine.h",
141 "base/rid_description.cc",
142 "base/rid_description.h",
143 "base/rtp_data_engine.cc",
144 "base/rtp_data_engine.h",
145 "base/rtp_utils.cc",
146 "base/rtp_utils.h",
147 "base/stream_params.cc",
148 "base/stream_params.h",
149 "base/turn_utils.cc",
150 "base/turn_utils.h",
151 "base/video_adapter.cc",
152 "base/video_adapter.h",
153 "base/video_broadcaster.cc",
154 "base/video_broadcaster.h",
Steve Anton10542f22019-01-11 09:11:00 -0800155 "base/video_common.cc",
156 "base/video_common.h",
157 "base/video_source_base.cc",
158 "base/video_source_base.h",
magjed0928a3c2016-11-25 00:40:18 -0800159 ]
magjed0928a3c2016-11-25 00:40:18 -0800160}
161
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200162rtc_library("rtc_constants") {
magjed0928a3c2016-11-25 00:40:18 -0800163 defines = []
164 libs = []
Anders Carlssona114c882018-01-04 15:10:22 +0100165 deps = []
magjed0928a3c2016-11-25 00:40:18 -0800166 sources = [
mallikarjun829deda482017-11-20 17:48:13 +0530167 "engine/constants.cc",
charujain66748462017-09-14 13:53:02 -0700168 "engine/constants.h",
Anders Carlssona114c882018-01-04 15:10:22 +0100169 ]
170}
171
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200172rtc_library("rtc_simulcast_encoder_adapter") {
Jonathan Yu9a5da492018-10-19 00:51:18 -0700173 visibility = [ "*" ]
174 defines = []
175 libs = []
176 sources = [
177 "engine/simulcast_encoder_adapter.cc",
178 "engine/simulcast_encoder_adapter.h",
179 ]
180 deps = [
Rasmus Brandt5cad55b2019-12-19 09:47:11 +0100181 ":rtc_media_base",
Elad Alon8f01c4e2019-06-28 15:19:43 +0200182 "../api:fec_controller_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100183 "../api:scoped_refptr",
Erik Språngf93eda12019-01-16 17:10:57 +0100184 "../api/video:video_codec_constants",
Yves Gerey3e707812018-11-28 16:47:49 +0100185 "../api/video:video_frame",
Jonathan Yu9a5da492018-10-19 00:51:18 -0700186 "../api/video:video_frame_i420",
Chen Xing5d24b162019-06-10 12:59:38 +0200187 "../api/video:video_rtp_headers",
Erik Språngf4e0c292019-10-01 18:50:03 +0200188 "../api/video_codecs:rtc_software_fallback_wrappers",
Jonathan Yu9a5da492018-10-19 00:51:18 -0700189 "../api/video_codecs:video_codecs_api",
Markus Handell32565f62019-12-04 10:58:17 +0100190 "../call:video_stream_api",
Jonathan Yu9a5da492018-10-19 00:51:18 -0700191 "../modules/video_coding:video_codec_interface",
192 "../modules/video_coding:video_coding_utility",
193 "../rtc_base:checks",
194 "../rtc_base:rtc_base_approved",
Erik Språng7f24fb92019-02-13 10:49:37 +0100195 "../rtc_base/experiments:rate_control_settings",
Sebastian Janssonb55015e2019-04-09 13:44:04 +0200196 "../rtc_base/synchronization:sequence_checker",
Mirko Bonadei66e76792019-04-02 11:33:59 +0200197 "../rtc_base/system:rtc_export",
Jonathan Yu9a5da492018-10-19 00:51:18 -0700198 "../system_wrappers",
199 "../system_wrappers:field_trial",
200 "//third_party/abseil-cpp/absl/types:optional",
Jonathan Yu9a5da492018-10-19 00:51:18 -0700201 ]
Jonathan Yu9a5da492018-10-19 00:51:18 -0700202}
203
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200204rtc_library("rtc_encoder_simulcast_proxy") {
Florent Castellie7862cc2018-12-06 13:38:24 +0100205 visibility = [ "*" ]
206 defines = []
207 libs = []
208 sources = [
209 "engine/encoder_simulcast_proxy.cc",
210 "engine/encoder_simulcast_proxy.h",
211 ]
212 deps = [
213 ":rtc_simulcast_encoder_adapter",
Florent Castellie7862cc2018-12-06 13:38:24 +0100214 "../api/video:video_bitrate_allocation",
215 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +0200216 "../api/video:video_rtp_headers",
Florent Castellie7862cc2018-12-06 13:38:24 +0100217 "../api/video_codecs:video_codecs_api",
218 "../modules/video_coding:video_codec_interface",
Mirko Bonadei66e76792019-04-02 11:33:59 +0200219 "../rtc_base/system:rtc_export",
Florent Castellie7862cc2018-12-06 13:38:24 +0100220 ]
Florent Castellie7862cc2018-12-06 13:38:24 +0100221}
222
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200223rtc_library("rtc_internal_video_codecs") {
Per Kjellandera0f5f602018-01-10 15:57:32 +0000224 visibility = [ "*" ]
Karl Wiberg7ba22b82018-04-27 04:31:53 +0200225 allow_poison = [ "software_video_codecs" ]
Anders Carlssona114c882018-01-04 15:10:22 +0100226 defines = []
227 libs = []
Patrik Höglund99175c62018-01-08 11:05:10 +0100228 deps = [
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200229 ":rtc_constants",
Florent Castellie7862cc2018-12-06 13:38:24 +0100230 ":rtc_encoder_simulcast_proxy",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100231 ":rtc_h264_profile_id",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200232 ":rtc_media_base",
Jonathan Yu9a5da492018-10-19 00:51:18 -0700233 ":rtc_simulcast_encoder_adapter",
Yves Gerey3e707812018-11-28 16:47:49 +0100234 "../:webrtc_common",
235 "../api/video:encoded_image",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200236 "../api/video:video_bitrate_allocation",
Yves Gerey3e707812018-11-28 16:47:49 +0100237 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 12:59:38 +0200238 "../api/video:video_rtp_headers",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200239 "../api/video_codecs:rtc_software_fallback_wrappers",
240 "../api/video_codecs:video_codecs_api",
241 "../call:call_interfaces",
242 "../call:video_stream_api",
243 "../modules:module_api",
Patrik Höglund99175c62018-01-08 11:05:10 +0100244 "../modules/video_coding:video_codec_interface",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200245 "../modules/video_coding:webrtc_h264",
246 "../modules/video_coding:webrtc_multiplex",
247 "../modules/video_coding:webrtc_vp8",
248 "../modules/video_coding:webrtc_vp9",
Danil Chapovalovc46385c2020-03-11 10:45:57 +0100249 "../modules/video_coding/codecs/av1:libaom_av1_decoder",
Danil Chapovalov4553f452020-04-01 18:15:32 +0200250 "../modules/video_coding/codecs/av1:libaom_av1_encoder",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200251 "../rtc_base:checks",
252 "../rtc_base:deprecation",
253 "../rtc_base:rtc_base_approved",
254 "../rtc_base/system:rtc_export",
255 "../test:fake_video_codecs",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200256 "//third_party/abseil-cpp/absl/strings",
Patrik Höglund99175c62018-01-08 11:05:10 +0100257 ]
Anders Carlssona114c882018-01-04 15:10:22 +0100258 sources = [
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -0500259 "engine/fake_video_codec_factory.cc",
260 "engine/fake_video_codec_factory.h",
Steve Anton10542f22019-01-11 09:11:00 -0800261 "engine/internal_decoder_factory.cc",
262 "engine/internal_decoder_factory.h",
263 "engine/internal_encoder_factory.cc",
264 "engine/internal_encoder_factory.h",
265 "engine/multiplex_codec_factory.cc",
266 "engine/multiplex_codec_factory.h",
Jonathan Yu327b7532018-10-24 17:21:36 -0700267
268 # TODO(bugs.webrtc.org/7925): stop exporting this header once downstream
Florent Castellie7862cc2018-12-06 13:38:24 +0100269 # targets depend on :rtc_encoder_simulcast_proxy directly.
270 "engine/encoder_simulcast_proxy.h",
Anders Carlssona114c882018-01-04 15:10:22 +0100271 ]
Anders Carlssona114c882018-01-04 15:10:22 +0100272}
273
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200274rtc_library("rtc_audio_video") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000275 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100276 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Anders Carlssona114c882018-01-04 15:10:22 +0100277 defines = []
278 libs = []
279 deps = [
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200280 ":rtc_constants",
281 ":rtc_media_base",
282 "..:webrtc_common",
283 "../api:call_api",
284 "../api:libjingle_peerconnection_api",
Florent Castellib05ca4b2020-03-05 13:39:55 +0100285 "../api:media_stream_interface",
Niels Möller6dcd4dc2019-08-26 10:45:28 +0200286 "../api:rtp_parameters",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100287 "../api:scoped_refptr",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200288 "../api:transport_api",
Danil Chapovalov85b8ce22019-05-31 15:51:04 +0200289 "../api/audio:audio_mixer_api",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200290 "../api/audio_codecs:audio_codecs_api",
Danil Chapovalov4c7112a2019-03-27 18:51:45 +0100291 "../api/task_queue",
Mirko Bonadei738bfa72019-09-17 14:47:38 +0200292 "../api/transport:bitrate_settings",
Niels Möller65f17ca2019-09-12 13:59:36 +0200293 "../api/transport:datagram_transport_interface",
294 "../api/transport/media:media_transport_interface",
Niels Möllera8370302019-09-02 15:16:49 +0200295 "../api/transport/rtp:rtp_source",
Elad Alon80f53b72019-10-11 16:19:43 +0200296 "../api/units:data_rate",
Yves Gerey3e707812018-11-28 16:47:49 +0100297 "../api/video:video_bitrate_allocation",
Jiawei Ouc2ebe212018-11-08 10:02:56 -0800298 "../api/video:video_bitrate_allocator_factory",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200299 "../api/video:video_codec_constants",
300 "../api/video:video_frame",
301 "../api/video:video_frame_i420",
Chen Xing5d24b162019-06-10 12:59:38 +0200302 "../api/video:video_rtp_headers",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200303 "../api/video_codecs:rtc_software_fallback_wrappers",
304 "../api/video_codecs:video_codecs_api",
305 "../call",
306 "../call:call_interfaces",
307 "../call:video_stream_api",
308 "../common_video",
309 "../modules/audio_device",
310 "../modules/audio_device:audio_device_impl",
311 "../modules/audio_mixer:audio_mixer_impl",
Alessio Bazzicab768e882018-11-07 14:29:54 +0000312 "../modules/audio_processing:api",
Artem Titov94b57c02019-03-21 13:35:10 +0100313 "../modules/audio_processing/aec_dump",
Sam Zackrisson41478c72019-10-15 10:10:26 +0200314 "../modules/audio_processing/agc:gain_control_interface",
Artem Titov94b57c02019-03-21 13:35:10 +0100315 "../modules/video_coding",
Patrik Höglunda97af1f2018-01-16 10:11:40 +0100316 "../modules/video_coding:video_codec_interface",
Sergio Garcia Murillo43800f92018-06-21 16:16:38 +0200317 "../modules/video_coding:video_coding_utility",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200318 "../rtc_base",
Jonas Olssonabbe8412018-04-03 13:40:05 +0200319 "../rtc_base:audio_format_to_string",
Anders Carlssona114c882018-01-04 15:10:22 +0100320 "../rtc_base:checks",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200321 "../rtc_base:rtc_task_queue",
322 "../rtc_base:stringutils",
Erik Språngd7ee76c2019-08-02 16:32:24 +0200323 "../rtc_base/experiments:experimental_screenshare_settings",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200324 "../rtc_base/experiments:field_trial_parser",
Elad Alon80f53b72019-10-11 16:19:43 +0200325 "../rtc_base/experiments:min_video_bitrate_experiment",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200326 "../rtc_base/experiments:normalize_simulcast_size_experiment",
Rasmus Brandt2b9317a2019-10-30 13:01:46 +0100327 "../rtc_base/experiments:rate_control_settings",
Mirko Bonadei276827c2018-10-16 14:13:50 +0200328 "../rtc_base/system:rtc_export",
Artem Titova76af0c2018-07-23 17:38:12 +0200329 "../rtc_base/third_party/base64",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200330 "../system_wrappers",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200331 "../system_wrappers:field_trial",
332 "../system_wrappers:metrics",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200333 "//third_party/abseil-cpp/absl/algorithm:container",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200334 "//third_party/abseil-cpp/absl/strings",
335 "//third_party/abseil-cpp/absl/types:optional",
Anders Carlssona114c882018-01-04 15:10:22 +0100336 ]
337
338 sources = [
339 "engine/adm_helpers.cc",
340 "engine/adm_helpers.h",
Steve Anton10542f22019-01-11 09:11:00 -0800341 "engine/null_webrtc_video_engine.h",
Anders Carlssona114c882018-01-04 15:10:22 +0100342 "engine/payload_type_mapper.cc",
343 "engine/payload_type_mapper.h",
Anders Carlssondd8c1652018-01-30 10:32:13 +0100344 "engine/simulcast.cc",
345 "engine/simulcast.h",
Jonas Oreland6d835922019-03-18 10:59:40 +0100346 "engine/unhandled_packets_buffer.cc",
347 "engine/unhandled_packets_buffer.h",
Steve Anton10542f22019-01-11 09:11:00 -0800348 "engine/webrtc_media_engine.cc",
349 "engine/webrtc_media_engine.h",
Steve Anton10542f22019-01-11 09:11:00 -0800350 "engine/webrtc_video_engine.cc",
351 "engine/webrtc_video_engine.h",
352 "engine/webrtc_voice_engine.cc",
353 "engine/webrtc_voice_engine.h",
kjellanderc76dc952016-06-03 03:09:32 -0700354 ]
355
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700356 public_configs = []
Niels Möller85818772019-04-09 08:24:58 +0200357 if (!build_with_chromium) {
kjellanderc76dc952016-06-03 03:09:32 -0700358 public_configs += [ ":rtc_media_defines_config" ]
359 deps += [ "../modules/video_capture:video_capture_internal_impl" ]
360 }
aleloi048cbdd2017-05-29 02:56:27 -0700361 if (rtc_enable_protobuf) {
362 deps += [ "../modules/audio_processing/aec_dump:aec_dump_impl" ]
363 } else {
364 deps += [ "../modules/audio_processing/aec_dump:null_aec_dump_factory" ]
365 }
kjellanderc76dc952016-06-03 03:09:32 -0700366}
kjellander82a94492016-06-12 22:12:01 -0700367
Danil Chapovalov4844c5f2019-04-10 14:10:10 +0200368# Heavy but optional helper for unittests and webrtc users who prefer to use
369# defaults factories or do not worry about extra dependencies and binary size.
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200370rtc_library("rtc_media_engine_defaults") {
Danil Chapovalov4844c5f2019-04-10 14:10:10 +0200371 visibility = [ "*" ]
372 allow_poison = [
373 "audio_codecs",
Danil Chapovalov41300af2019-07-10 12:44:43 +0200374 "default_task_queue",
Danil Chapovalov4844c5f2019-04-10 14:10:10 +0200375 "software_video_codecs",
376 ]
377 sources = [
378 "engine/webrtc_media_engine_defaults.cc",
379 "engine/webrtc_media_engine_defaults.h",
380 ]
381 deps = [
382 ":rtc_audio_video",
383 "../api/audio_codecs:builtin_audio_decoder_factory",
384 "../api/audio_codecs:builtin_audio_encoder_factory",
385 "../api/task_queue:default_task_queue_factory",
386 "../api/video:builtin_video_bitrate_allocator_factory",
387 "../api/video_codecs:builtin_video_decoder_factory",
388 "../api/video_codecs:builtin_video_encoder_factory",
389 "../modules/audio_processing:api",
390 "../rtc_base:checks",
Ken MacKay831ce5f2019-12-02 10:26:34 -0800391 "../rtc_base/system:rtc_export",
Danil Chapovalov4844c5f2019-04-10 14:10:10 +0200392 ]
393}
394
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200395rtc_library("rtc_data") {
Seth Hampson66d6c3b2019-08-30 09:02:46 -0700396 defines = [
397 # "SCTP_DEBUG" # Uncomment for SCTP debugging.
398 ]
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200399 deps = [
400 ":rtc_media_base",
401 "..:webrtc_common",
402 "../api:call_api",
403 "../api:transport_api",
404 "../p2p:rtc_p2p",
405 "../rtc_base",
406 "../rtc_base:rtc_base_approved",
407 "../rtc_base/third_party/sigslot",
408 "../system_wrappers",
409 "//third_party/abseil-cpp/absl/algorithm:container",
Danil Chapovalov5740f3e2019-10-10 11:12:15 +0200410 "//third_party/abseil-cpp/absl/base:core_headers",
Seth Hampson66d6c3b2019-08-30 09:02:46 -0700411 "//third_party/abseil-cpp/absl/types:optional",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200412 ]
zhihuang38ede132017-06-15 12:52:32 -0700413
414 if (rtc_enable_sctp) {
415 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800416 "sctp/sctp_transport.cc",
417 "sctp/sctp_transport.h",
418 "sctp/sctp_transport_internal.h",
zhihuang38ede132017-06-15 12:52:32 -0700419 ]
Kári Tristan Helgason4d3e24a2017-12-01 15:26:41 +0100420 } else {
421 # libtool on mac does not like empty targets.
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100422 sources = [ "sctp/noop.cc" ]
zhihuang38ede132017-06-15 12:52:32 -0700423 }
424
zhihuang38ede132017-06-15 12:52:32 -0700425 if (rtc_enable_sctp && rtc_build_usrsctp) {
426 include_dirs = [
427 # TODO(jiayl): move this into the public_configs of
428 # //third_party/usrsctp/BUILD.gn.
429 "//third_party/usrsctp/usrsctplib",
430 ]
431 deps += [ "//third_party/usrsctp" ]
432 }
zhihuang38ede132017-06-15 12:52:32 -0700433}
434
435rtc_source_set("rtc_media") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000436 visibility = [ "*" ]
Anders Carlsson45340ca2019-01-14 14:23:23 +0100437 allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
Mirko Bonadei75baa492018-01-11 17:07:30 +0100438 deps = [
zhihuang38ede132017-06-15 12:52:32 -0700439 ":rtc_audio_video",
440 ":rtc_data",
441 ]
442}
443
kjellander82a94492016-06-12 22:12:01 -0700444if (rtc_include_tests) {
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200445 rtc_library("rtc_media_tests_utils") {
kjellander82a94492016-06-12 22:12:01 -0700446 testonly = true
447
Anders Carlsson5f2bb622018-05-14 09:48:06 +0200448 defines = []
kjellandera2ef4f92017-03-06 06:04:55 -0800449 deps = [
Mirko Bonadei75baa492018-01-11 17:07:30 +0100450 ":rtc_audio_video",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200451 ":rtc_internal_video_codecs",
452 ":rtc_media",
453 ":rtc_media_base",
Jonathan Yu9a5da492018-10-19 00:51:18 -0700454 ":rtc_simulcast_encoder_adapter",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200455 "../api:call_api",
Elad Alon8f01c4e2019-06-28 15:19:43 +0200456 "../api:fec_controller_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100457 "../api:scoped_refptr",
Yves Gerey3e707812018-11-28 16:47:49 +0100458 "../api/video:encoded_image",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200459 "../api/video:video_bitrate_allocation",
460 "../api/video:video_frame",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200461 "../api/video:video_frame_i420",
Chen Xing5d24b162019-06-10 12:59:38 +0200462 "../api/video:video_rtp_headers",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200463 "../api/video_codecs:video_codecs_api",
464 "../call:call_interfaces",
465 "../call:mock_rtp_interfaces",
aleloi440b6d92017-08-22 05:43:23 -0700466 "../call:video_stream_api",
Artem Titov94b57c02019-03-21 13:35:10 +0100467 "../common_video",
468 "../modules/audio_processing",
Alessio Bazzicab768e882018-11-07 14:29:54 +0000469 "../modules/audio_processing:api",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100470 "../modules/rtp_rtcp:rtp_rtcp_format",
Patrik Höglund99175c62018-01-08 11:05:10 +0100471 "../modules/video_coding:video_codec_interface",
charujaincb728ea2017-09-18 03:08:08 -0700472 "../modules/video_coding:video_coding_utility",
kjellandera2ef4f92017-03-06 06:04:55 -0800473 "../p2p:rtc_p2p",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200474 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100475 "../rtc_base:checks",
Mirko Bonadeie3abb812018-11-23 13:15:08 +0100476 "../rtc_base:gunit_helpers",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200477 "../rtc_base:rtc_base_approved",
Tommi8d2c5a82018-03-19 11:12:48 +0100478 "../rtc_base:rtc_task_queue",
Patrik Höglund3e113432017-12-15 14:40:10 +0100479 "../rtc_base:stringutils",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200480 "../rtc_base/third_party/sigslot",
481 "../test:test_support",
482 "//testing/gtest",
Steve Anton2c9ebef2019-01-28 17:27:58 -0800483 "//third_party/abseil-cpp/absl/algorithm:container",
Yves Gerey69807e82018-10-30 22:23:02 +0100484 "//third_party/abseil-cpp/absl/strings",
kjellandera2ef4f92017-03-06 06:04:55 -0800485 ]
kjellander82a94492016-06-12 22:12:01 -0700486 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800487 "base/fake_frame_source.cc",
488 "base/fake_frame_source.h",
489 "base/fake_media_engine.cc",
490 "base/fake_media_engine.h",
491 "base/fake_network_interface.h",
492 "base/fake_rtp.cc",
493 "base/fake_rtp.h",
Steve Anton10542f22019-01-11 09:11:00 -0800494 "base/fake_video_renderer.cc",
495 "base/fake_video_renderer.h",
496 "base/test_utils.cc",
497 "base/test_utils.h",
498 "engine/fake_webrtc_call.cc",
499 "engine/fake_webrtc_call.h",
500 "engine/fake_webrtc_video_engine.cc",
501 "engine/fake_webrtc_video_engine.h",
kjellander82a94492016-06-12 22:12:01 -0700502 ]
kjellander82a94492016-06-12 22:12:01 -0700503 }
504
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700505 rtc_media_unittests_resources = [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200506 "../resources/media/captured-320x240-2s-48.frames",
507 "../resources/media/faces.1280x720_P420.yuv",
Rasmus Brandt5cad55b2019-12-19 09:47:11 +0100508 "../resources/media/faces_I400.jpg",
509 "../resources/media/faces_I411.jpg",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200510 "../resources/media/faces_I420.jpg",
511 "../resources/media/faces_I422.jpg",
512 "../resources/media/faces_I444.jpg",
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700513 ]
kjellander32c4a202016-08-30 02:53:49 -0700514
515 if (is_ios) {
516 bundle_data("rtc_media_unittests_bundle_data") {
517 testonly = true
518 sources = rtc_media_unittests_resources
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100519 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
kjellander32c4a202016-08-30 02:53:49 -0700520 }
521 }
522
ehmaldonado38a21322016-09-02 04:10:34 -0700523 rtc_test("rtc_media_unittests") {
kjellander82a94492016-06-12 22:12:01 -0700524 testonly = true
525
johan073ece42016-08-26 02:59:47 -0700526 defines = []
kjellandera2ef4f92017-03-06 06:04:55 -0800527 deps = [
Mirko Bonadei75baa492018-01-11 17:07:30 +0100528 ":rtc_audio_video",
Anders Carlssona114c882018-01-04 15:10:22 +0100529 ":rtc_constants",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100530 ":rtc_data",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200531 ":rtc_encoder_simulcast_proxy",
532 ":rtc_internal_video_codecs",
533 ":rtc_media",
534 ":rtc_media_base",
Danil Chapovalov4844c5f2019-04-10 14:10:10 +0200535 ":rtc_media_engine_defaults",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200536 ":rtc_media_tests_utils",
Johannes Kronc8f31342019-12-19 15:05:20 +0100537 ":rtc_sdp_fmtp_utils",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200538 ":rtc_simulcast_encoder_adapter",
539 ":rtc_vp9_profile",
Yves Gerey3e707812018-11-28 16:47:49 +0100540 "../:webrtc_common",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200541 "../api:create_simulcast_test_fixture_api",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200542 "../api:libjingle_peerconnection_api",
543 "../api:mock_video_bitrate_allocator",
544 "../api:mock_video_bitrate_allocator_factory",
545 "../api:mock_video_codec_factory",
Erik Språng9e79e6b2019-04-25 16:01:03 +0200546 "../api:mock_video_encoder",
Niels Möller6dcd4dc2019-08-26 10:45:28 +0200547 "../api:rtp_parameters",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100548 "../api:scoped_refptr",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200549 "../api:simulcast_test_fixture_api",
550 "../api/audio_codecs:builtin_audio_decoder_factory",
551 "../api/audio_codecs:builtin_audio_encoder_factory",
Danil Chapovalov83bbe912019-08-07 12:24:53 +0200552 "../api/rtc_event_log",
Danil Chapovalov4c7112a2019-03-27 18:51:45 +0100553 "../api/task_queue",
554 "../api/task_queue:default_task_queue_factory",
Danil Chapovalov99b71df2018-10-26 15:57:48 +0200555 "../api/test/video:function_video_factory",
Erik Språng014dd3c2019-11-28 13:44:25 +0100556 "../api/transport:field_trial_based_config",
Niels Möller65f17ca2019-09-12 13:59:36 +0200557 "../api/transport/media:media_transport_interface",
Jonas Oreland49ac5952018-09-26 16:04:32 +0200558 "../api/units:time_delta",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200559 "../api/video:builtin_video_bitrate_allocator_factory",
560 "../api/video:video_bitrate_allocation",
561 "../api/video:video_frame",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200562 "../api/video:video_frame_i420",
Chen Xing5d24b162019-06-10 12:59:38 +0200563 "../api/video:video_rtp_headers",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200564 "../api/video_codecs:builtin_video_decoder_factory",
565 "../api/video_codecs:builtin_video_encoder_factory",
566 "../api/video_codecs:video_codecs_api",
567 "../audio",
568 "../call:call_interfaces",
569 "../common_video",
Johannes Kron3e983682020-03-29 22:17:00 +0200570 "../media:rtc_h264_profile_id",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200571 "../modules/audio_device:mock_audio_device",
572 "../modules/audio_processing",
Alessio Bazzicab768e882018-11-07 14:29:54 +0000573 "../modules/audio_processing:api",
Patrik Höglund62139292017-12-19 16:44:45 +0100574 "../modules/audio_processing:mocks",
Åsa Persson23cd45a2018-07-03 10:40:40 +0200575 "../modules/rtp_rtcp",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200576 "../modules/video_coding:simulcast_test_fixture_impl",
Patrik Höglund99175c62018-01-08 11:05:10 +0100577 "../modules/video_coding:video_codec_interface",
Johannes Kron3e983682020-03-29 22:17:00 +0200578 "../modules/video_coding:webrtc_h264",
Sergio Garcia Murillo43800f92018-06-21 16:16:38 +0200579 "../modules/video_coding:webrtc_vp8",
Danil Chapovalovc46385c2020-03-11 10:45:57 +0100580 "../modules/video_coding/codecs/av1:libaom_av1_decoder",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200581 "../p2p:p2p_test_utils",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200582 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100583 "../rtc_base:checks",
Mirko Bonadeie3abb812018-11-23 13:15:08 +0100584 "../rtc_base:gunit_helpers",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200585 "../rtc_base:rtc_base_approved",
Mirko Bonadeie3abb812018-11-23 13:15:08 +0100586 "../rtc_base:rtc_base_tests_utils",
Tommi8d2c5a82018-03-19 11:12:48 +0100587 "../rtc_base:rtc_task_queue",
Patrik Höglund3e113432017-12-15 14:40:10 +0100588 "../rtc_base:stringutils",
Elad Alon80f53b72019-10-11 16:19:43 +0200589 "../rtc_base/experiments:min_video_bitrate_experiment",
Artem Titov94b57c02019-03-21 13:35:10 +0100590 "../rtc_base/third_party/sigslot",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200591 "../test:audio_codec_mocks",
Markus Handell32565f62019-12-04 10:58:17 +0100592 "../test:fake_video_codecs",
kjellandera2ef4f92017-03-06 06:04:55 -0800593 "../test:field_trial",
Tommi25eb47c2019-08-29 16:39:05 +0200594 "../test:rtp_test_utils",
Niels Möller04a3cc12019-05-21 13:01:58 +0200595 "../test:test_main",
Danil Chapovalov6fe6b5a2019-04-10 12:50:24 +0200596 "../test:test_support",
597 "../test:video_test_common",
598 "//third_party/abseil-cpp/absl/algorithm:container",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200599 "//third_party/abseil-cpp/absl/memory",
Yves Gerey69807e82018-10-30 22:23:02 +0100600 "//third_party/abseil-cpp/absl/strings",
Niels Möller04a3cc12019-05-21 13:01:58 +0200601 "//third_party/abseil-cpp/absl/types:optional",
kjellandera2ef4f92017-03-06 06:04:55 -0800602 ]
kjellander82a94492016-06-12 22:12:01 -0700603 sources = [
604 "base/codec_unittest.cc",
Markus Handell0357b3e2020-03-16 13:40:51 +0100605 "base/media_engine_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -0800606 "base/rtp_data_engine_unittest.cc",
607 "base/rtp_utils_unittest.cc",
Johannes Kronc8f31342019-12-19 15:05:20 +0100608 "base/sdp_fmtp_utils_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -0800609 "base/stream_params_unittest.cc",
610 "base/turn_utils_unittest.cc",
611 "base/video_adapter_unittest.cc",
612 "base/video_broadcaster_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -0800613 "base/video_common_unittest.cc",
Florent Castellie7862cc2018-12-06 13:38:24 +0100614 "engine/encoder_simulcast_proxy_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -0800615 "engine/internal_decoder_factory_unittest.cc",
616 "engine/multiplex_codec_factory_unittest.cc",
617 "engine/null_webrtc_video_engine_unittest.cc",
ossuc54071d2016-08-17 02:45:41 -0700618 "engine/payload_type_mapper_unittest.cc",
magjed6cc25612017-07-10 03:26:36 -0700619 "engine/simulcast_encoder_adapter_unittest.cc",
Åsa Persson31cb8f92018-06-27 10:44:56 +0200620 "engine/simulcast_unittest.cc",
Jonas Oreland6d835922019-03-18 10:59:40 +0100621 "engine/unhandled_packets_buffer_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -0800622 "engine/webrtc_media_engine_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -0800623 "engine/webrtc_video_engine_unittest.cc",
kjellander82a94492016-06-12 22:12:01 -0700624 ]
625
oprypin45197522017-06-22 01:47:20 -0700626 # TODO(kthelgason): Reenable this test on iOS.
627 # See bugs.webrtc.org/5569
628 if (!is_ios) {
Steve Anton10542f22019-01-11 09:11:00 -0800629 sources += [ "engine/webrtc_voice_engine_unittest.cc" ]
oprypin45197522017-06-22 01:47:20 -0700630 }
631
deadbeef40610e22016-12-22 10:53:38 -0800632 if (rtc_enable_sctp) {
Yura Yarosheviche114fb62019-10-25 12:48:11 +0300633 sources += [
634 "sctp/sctp_transport_reliability_unittest.cc",
635 "sctp/sctp_transport_unittest.cc",
636 ]
deadbeef40610e22016-12-22 10:53:38 -0800637 }
638
ossu11bfc532017-02-16 05:37:06 -0800639 if (rtc_opus_support_120ms_ptime) {
640 defines += [ "WEBRTC_OPUS_SUPPORT_120MS_PTIME=1" ]
641 } else {
642 defines += [ "WEBRTC_OPUS_SUPPORT_120MS_PTIME=0" ]
643 }
644
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700645 data = rtc_media_unittests_resources
646
kjellander82a94492016-06-12 22:12:01 -0700647 if (is_android) {
648 deps += [ "//testing/android/native_test:native_test_support" ]
kjellander28a0ffd2016-08-24 07:48:42 -0700649 shard_timeout = 900
650 }
kjellander32c4a202016-08-30 02:53:49 -0700651
652 if (is_ios) {
653 deps += [ ":rtc_media_unittests_bundle_data" ]
kjellander82a94492016-06-12 22:12:01 -0700654 }
kjellander82a94492016-06-12 22:12:01 -0700655 }
656}