kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 1 | # 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 | |
| 9 | import("//build/config/linux/pkg_config.gni") |
mbonadei | 9aa3f0a | 2017-01-24 06:58:22 -0800 | [diff] [blame] | 10 | import("../webrtc.gni") |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 11 | |
| 12 | group("media") { |
Dan Minor | 9c68613 | 2018-01-15 10:20:00 -0500 | [diff] [blame] | 13 | deps = [] |
| 14 | if (!build_with_mozilla) { |
| 15 | deps += [ |
| 16 | ":rtc_media", |
| 17 | ":rtc_media_base", |
| 18 | ] |
| 19 | } |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 20 | } |
| 21 | |
| 22 | config("rtc_media_defines_config") { |
| 23 | defines = [ |
| 24 | "HAVE_WEBRTC_VIDEO", |
| 25 | "HAVE_WEBRTC_VOICE", |
| 26 | ] |
| 27 | } |
| 28 | |
zhihuang | 38ede13 | 2017-06-15 12:52:32 -0700 | [diff] [blame] | 29 | config("rtc_media_warnings_config") { |
| 30 | # GN orders flags on a target before flags from configs. The default config |
| 31 | # adds these flags so to cancel them out they need to come from a config and |
| 32 | # cannot be on the target directly. |
| 33 | if (!is_win) { |
| 34 | cflags = [ "-Wno-deprecated-declarations" ] |
| 35 | } |
| 36 | } |
| 37 | |
zhihuang | 130ca7e | 2017-06-21 01:02:59 -0700 | [diff] [blame] | 38 | rtc_source_set("rtc_h264_profile_id") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 39 | visibility = [ "*" ] |
zhihuang | 130ca7e | 2017-06-21 01:02:59 -0700 | [diff] [blame] | 40 | sources = [ |
| 41 | "base/h264_profile_level_id.cc", |
| 42 | "base/h264_profile_level_id.h", |
| 43 | ] |
| 44 | |
| 45 | if (!build_with_chromium && is_clang) { |
| 46 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 47 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 48 | } |
| 49 | |
| 50 | deps = [ |
| 51 | "..:webrtc_common", |
kwiberg | 84f6a3f | 2017-09-05 08:43:13 -0700 | [diff] [blame] | 52 | "../api:optional", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 53 | "../rtc_base:rtc_base", |
| 54 | "../rtc_base:rtc_base_approved", |
zhihuang | 130ca7e | 2017-06-21 01:02:59 -0700 | [diff] [blame] | 55 | ] |
| 56 | } |
| 57 | |
Niels Möller | 6daa278 | 2018-01-23 10:37:42 +0100 | [diff] [blame] | 58 | rtc_source_set("rtc_media_config") { |
| 59 | visibility = [ "*" ] |
| 60 | sources = [ |
| 61 | "base/mediaconfig.h", |
| 62 | ] |
| 63 | } |
| 64 | |
zhihuang | ab97e18 | 2017-06-22 01:28:59 -0700 | [diff] [blame] | 65 | rtc_static_library("rtc_media_base") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 66 | visibility = [ "*" ] |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 67 | defines = [] |
| 68 | libs = [] |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 69 | deps = [ |
Niels Möller | a6fe261 | 2018-01-19 11:28:54 +0100 | [diff] [blame] | 70 | "../api:audio_options_api", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 71 | "../rtc_base:checks", |
Tommi | 8d2c5a8 | 2018-03-19 11:12:48 +0100 | [diff] [blame] | 72 | "../rtc_base:rtc_base_approved", |
| 73 | "../rtc_base:rtc_task_queue", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 74 | "../rtc_base:sanitizer", |
Tommi | 1829af6 | 2018-02-06 09:29:17 +0100 | [diff] [blame] | 75 | "../rtc_base:sequenced_task_checker", |
Patrik Höglund | 3e11343 | 2017-12-15 14:40:10 +0100 | [diff] [blame] | 76 | "../rtc_base:stringutils", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 77 | ] |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 78 | sources = [ |
nisse | 6f5a6c3 | 2016-09-22 01:25:59 -0700 | [diff] [blame] | 79 | "base/adaptedvideotracksource.cc", |
| 80 | "base/adaptedvideotracksource.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 81 | "base/audiosource.h", |
| 82 | "base/codec.cc", |
| 83 | "base/codec.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 84 | "base/cryptoparams.h", |
| 85 | "base/device.h", |
Paulina Hensman | 11b34f4 | 2018-04-09 14:24:52 +0200 | [diff] [blame] | 86 | "base/mediachannel.cc", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 87 | "base/mediachannel.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 88 | "base/mediaconstants.cc", |
| 89 | "base/mediaconstants.h", |
| 90 | "base/mediaengine.cc", |
| 91 | "base/mediaengine.h", |
| 92 | "base/rtpdataengine.cc", |
| 93 | "base/rtpdataengine.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 94 | "base/rtputils.cc", |
| 95 | "base/rtputils.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 96 | "base/streamparams.cc", |
| 97 | "base/streamparams.h", |
| 98 | "base/turnutils.cc", |
| 99 | "base/turnutils.h", |
| 100 | "base/videoadapter.cc", |
| 101 | "base/videoadapter.h", |
| 102 | "base/videobroadcaster.cc", |
| 103 | "base/videobroadcaster.h", |
| 104 | "base/videocapturer.cc", |
| 105 | "base/videocapturer.h", |
| 106 | "base/videocapturerfactory.h", |
| 107 | "base/videocommon.cc", |
| 108 | "base/videocommon.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 109 | "base/videosourcebase.cc", |
| 110 | "base/videosourcebase.h", |
magjed | 0928a3c | 2016-11-25 00:40:18 -0800 | [diff] [blame] | 111 | ] |
| 112 | |
magjed | 0928a3c | 2016-11-25 00:40:18 -0800 | [diff] [blame] | 113 | if (!build_with_chromium && is_clang) { |
| 114 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 115 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 116 | } |
| 117 | |
magjed | 0928a3c | 2016-11-25 00:40:18 -0800 | [diff] [blame] | 118 | deps += [ |
Mirko Bonadei | 75baa49 | 2018-01-11 17:07:30 +0100 | [diff] [blame] | 119 | ":rtc_h264_profile_id", |
Niels Möller | 6daa278 | 2018-01-23 10:37:42 +0100 | [diff] [blame] | 120 | ":rtc_media_config", |
magjed | 0928a3c | 2016-11-25 00:40:18 -0800 | [diff] [blame] | 121 | "..:webrtc_common", |
kjellander | a2ef4f9 | 2017-03-06 06:04:55 -0800 | [diff] [blame] | 122 | "../api:libjingle_peerconnection_api", |
Patrik Höglund | aba85d1 | 2017-11-28 15:46:08 +0100 | [diff] [blame] | 123 | "../api:optional", |
Patrik Höglund | aba85d1 | 2017-11-28 15:46:08 +0100 | [diff] [blame] | 124 | "../api/audio_codecs:audio_codecs_api", |
Niels Möller | c6ce9c5 | 2018-05-11 11:15:30 +0200 | [diff] [blame^] | 125 | "../api/video:video_frame", |
| 126 | "../api/video:video_frame_i420", |
Patrik Höglund | aba85d1 | 2017-11-28 15:46:08 +0100 | [diff] [blame] | 127 | "../api/video_codecs:video_codecs_api", |
| 128 | "../call:call_interfaces", |
| 129 | "../call:video_stream_api", |
Patrik Höglund | be214a2 | 2018-01-04 12:14:35 +0100 | [diff] [blame] | 130 | "../common_video", |
Patrik Höglund | aba85d1 | 2017-11-28 15:46:08 +0100 | [diff] [blame] | 131 | "../modules/audio_processing:audio_processing_statistics", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 132 | "../rtc_base:rtc_base", |
| 133 | "../rtc_base:rtc_base_approved", |
Patrik Höglund | aba85d1 | 2017-11-28 15:46:08 +0100 | [diff] [blame] | 134 | "../system_wrappers:field_trial_api", |
magjed | 0928a3c | 2016-11-25 00:40:18 -0800 | [diff] [blame] | 135 | ] |
kjellander | 8a11663 | 2017-04-21 05:17:08 -0700 | [diff] [blame] | 136 | |
Dan Minor | 9c68613 | 2018-01-15 10:20:00 -0500 | [diff] [blame] | 137 | if (!build_with_mozilla) { |
| 138 | deps += [ "../p2p" ] |
| 139 | } |
| 140 | |
kjellander | 8a11663 | 2017-04-21 05:17:08 -0700 | [diff] [blame] | 141 | if (is_nacl) { |
| 142 | deps += [ "//native_client_sdk/src/libraries/nacl_io" ] |
| 143 | } |
magjed | 0928a3c | 2016-11-25 00:40:18 -0800 | [diff] [blame] | 144 | } |
| 145 | |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 146 | rtc_static_library("rtc_constants") { |
magjed | 0928a3c | 2016-11-25 00:40:18 -0800 | [diff] [blame] | 147 | defines = [] |
| 148 | libs = [] |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 149 | deps = [] |
magjed | 0928a3c | 2016-11-25 00:40:18 -0800 | [diff] [blame] | 150 | sources = [ |
mallikarjun82 | 9deda48 | 2017-11-20 17:48:13 +0530 | [diff] [blame] | 151 | "engine/constants.cc", |
charujain | 6674846 | 2017-09-14 13:53:02 -0700 | [diff] [blame] | 152 | "engine/constants.h", |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 153 | ] |
| 154 | } |
| 155 | |
| 156 | rtc_static_library("rtc_internal_video_codecs") { |
Per Kjellander | a0f5f60 | 2018-01-10 15:57:32 +0000 | [diff] [blame] | 157 | visibility = [ "*" ] |
Karl Wiberg | 7ba22b8 | 2018-04-27 04:31:53 +0200 | [diff] [blame] | 158 | allow_poison = [ "software_video_codecs" ] |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 159 | defines = [] |
| 160 | libs = [] |
Patrik Höglund | 99175c6 | 2018-01-08 11:05:10 +0100 | [diff] [blame] | 161 | deps = [ |
Mirko Bonadei | 75baa49 | 2018-01-11 17:07:30 +0100 | [diff] [blame] | 162 | ":rtc_h264_profile_id", |
Patrik Höglund | 99175c6 | 2018-01-08 11:05:10 +0100 | [diff] [blame] | 163 | "../modules/video_coding:video_codec_interface", |
| 164 | ] |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 165 | sources = [ |
Magnus Jedvert | 07e0d01 | 2017-10-31 11:24:54 +0100 | [diff] [blame] | 166 | "engine/convert_legacy_video_factory.cc", |
| 167 | "engine/convert_legacy_video_factory.h", |
magjed | dd40702 | 2016-12-01 00:27:27 -0800 | [diff] [blame] | 168 | "engine/internaldecoderfactory.cc", |
| 169 | "engine/internaldecoderfactory.h", |
magjed | 509e4fe | 2016-11-18 01:34:11 -0800 | [diff] [blame] | 170 | "engine/internalencoderfactory.cc", |
| 171 | "engine/internalencoderfactory.h", |
Emircan Uysaler | d7ae3c3 | 2018-01-25 13:01:09 -0800 | [diff] [blame] | 172 | "engine/multiplexcodecfactory.cc", |
| 173 | "engine/multiplexcodecfactory.h", |
andersc | 063f0c0 | 2017-09-11 11:50:51 -0700 | [diff] [blame] | 174 | "engine/scopedvideodecoder.cc", |
| 175 | "engine/scopedvideodecoder.h", |
magjed | 3f89758 | 2017-08-28 08:05:42 -0700 | [diff] [blame] | 176 | "engine/scopedvideoencoder.cc", |
| 177 | "engine/scopedvideoencoder.h", |
magjed | 6cc2561 | 2017-07-10 03:26:36 -0700 | [diff] [blame] | 178 | "engine/simulcast_encoder_adapter.cc", |
| 179 | "engine/simulcast_encoder_adapter.h", |
Ilya Nikolaevskiy | c22a3a6 | 2017-10-25 10:04:54 +0200 | [diff] [blame] | 180 | "engine/vp8_encoder_simulcast_proxy.cc", |
| 181 | "engine/vp8_encoder_simulcast_proxy.h", |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 182 | "engine/webrtcvideodecoderfactory.h", |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 183 | "engine/webrtcvideoencoderfactory.h", |
| 184 | ] |
| 185 | |
| 186 | configs += [ ":rtc_media_warnings_config" ] |
| 187 | |
| 188 | if (!build_with_chromium && is_clang) { |
| 189 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 190 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 191 | } |
| 192 | |
| 193 | if (is_win) { |
| 194 | cflags = [ |
| 195 | "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. |
| 196 | "/wd4267", # conversion from "size_t" to "int", possible loss of data. |
| 197 | "/wd4389", # signed/unsigned mismatch. |
| 198 | ] |
| 199 | } |
| 200 | |
| 201 | include_dirs = [] |
| 202 | |
| 203 | public_configs = [] |
| 204 | deps += [ |
| 205 | ":rtc_constants", |
| 206 | ":rtc_media_base", |
Anders Carlsson | dd8c165 | 2018-01-30 10:32:13 +0100 | [diff] [blame] | 207 | ":rtc_software_fallback_wrappers", |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 208 | "..:webrtc_common", |
Niels Möller | c6ce9c5 | 2018-05-11 11:15:30 +0200 | [diff] [blame^] | 209 | "../api/video:video_frame_i420", |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 210 | "../api/video_codecs:video_codecs_api", |
| 211 | "../call:call_interfaces", |
| 212 | "../call:video_stream_api", |
| 213 | "../modules/video_coding:webrtc_h264", |
Emircan Uysaler | d7ae3c3 | 2018-01-25 13:01:09 -0800 | [diff] [blame] | 214 | "../modules/video_coding:webrtc_multiplex", |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 215 | "../modules/video_coding:webrtc_vp8", |
| 216 | "../modules/video_coding:webrtc_vp8_helpers", |
| 217 | "../modules/video_coding:webrtc_vp9", |
| 218 | "../rtc_base:checks", |
| 219 | "../rtc_base:rtc_base_approved", |
| 220 | "../rtc_base:sequenced_task_checker", |
| 221 | "../system_wrappers", |
| 222 | "../system_wrappers:field_trial_api", |
| 223 | "../system_wrappers:metrics_api", |
| 224 | "//third_party/libyuv", |
| 225 | ] |
| 226 | } |
| 227 | |
Anders Carlsson | dd8c165 | 2018-01-30 10:32:13 +0100 | [diff] [blame] | 228 | rtc_static_library("rtc_software_fallback_wrappers") { |
| 229 | sources = [ |
| 230 | "engine/videodecodersoftwarefallbackwrapper.cc", |
| 231 | "engine/videodecodersoftwarefallbackwrapper.h", |
| 232 | "engine/videoencodersoftwarefallbackwrapper.cc", |
| 233 | "engine/videoencodersoftwarefallbackwrapper.h", |
| 234 | ] |
| 235 | |
| 236 | configs += [ ":rtc_media_warnings_config" ] |
| 237 | |
| 238 | if (!build_with_chromium && is_clang) { |
| 239 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 240 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 241 | } |
| 242 | |
| 243 | deps = [ |
| 244 | ":rtc_h264_profile_id", |
| 245 | ":rtc_media_base", |
| 246 | "../api/video_codecs:video_codecs_api", |
| 247 | "../modules/video_coding:video_codec_interface", |
| 248 | "../rtc_base:checks", |
| 249 | "../rtc_base:rtc_base_approved", |
Sami Kalliomäki | 99f52f8 | 2018-02-23 09:05:49 +0100 | [diff] [blame] | 250 | "../rtc_base/system:fallthrough", |
Anders Carlsson | dd8c165 | 2018-01-30 10:32:13 +0100 | [diff] [blame] | 251 | "../system_wrappers:field_trial_api", |
| 252 | ] |
| 253 | } |
| 254 | |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 255 | rtc_static_library("rtc_audio_video") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 256 | visibility = [ "*" ] |
Anders Carlsson | 1f433e4 | 2018-04-24 16:39:05 +0200 | [diff] [blame] | 257 | allow_poison = [ |
| 258 | "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove. |
| 259 | "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove. |
| 260 | ] |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 261 | defines = [] |
| 262 | libs = [] |
| 263 | deps = [ |
Mirko Bonadei | ca913b0 | 2018-01-26 15:11:40 +0100 | [diff] [blame] | 264 | "../modules/audio_processing/aec_dump:aec_dump", |
Patrik Höglund | a97af1f | 2018-01-16 10:11:40 +0100 | [diff] [blame] | 265 | "../modules/video_coding:video_codec_interface", |
Patrik Höglund | 99175c6 | 2018-01-08 11:05:10 +0100 | [diff] [blame] | 266 | "../modules/video_coding:video_coding", |
Jonas Olsson | abbe841 | 2018-04-03 13:40:05 +0200 | [diff] [blame] | 267 | "../rtc_base:audio_format_to_string", |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 268 | "../rtc_base:checks", |
| 269 | ] |
| 270 | |
| 271 | sources = [ |
| 272 | "engine/adm_helpers.cc", |
| 273 | "engine/adm_helpers.h", |
| 274 | "engine/apm_helpers.cc", |
| 275 | "engine/apm_helpers.h", |
| 276 | "engine/nullwebrtcvideoengine.h", |
| 277 | "engine/payload_type_mapper.cc", |
| 278 | "engine/payload_type_mapper.h", |
Anders Carlsson | dd8c165 | 2018-01-30 10:32:13 +0100 | [diff] [blame] | 279 | "engine/simulcast.cc", |
| 280 | "engine/simulcast.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 281 | "engine/webrtcmediaengine.cc", |
| 282 | "engine/webrtcmediaengine.h", |
| 283 | "engine/webrtcvideocapturer.cc", |
| 284 | "engine/webrtcvideocapturer.h", |
| 285 | "engine/webrtcvideocapturerfactory.cc", |
| 286 | "engine/webrtcvideocapturerfactory.h", |
Anders Carlsson | dd8c165 | 2018-01-30 10:32:13 +0100 | [diff] [blame] | 287 | "engine/webrtcvideodecoderfactory.cc", |
| 288 | "engine/webrtcvideodecoderfactory.h", |
| 289 | "engine/webrtcvideoencoderfactory.cc", |
| 290 | "engine/webrtcvideoencoderfactory.h", |
eladalon | f184138 | 2017-06-12 01:16:46 -0700 | [diff] [blame] | 291 | "engine/webrtcvideoengine.cc", |
| 292 | "engine/webrtcvideoengine.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 293 | "engine/webrtcvoiceengine.cc", |
| 294 | "engine/webrtcvoiceengine.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 295 | ] |
| 296 | |
zhihuang | 38ede13 | 2017-06-15 12:52:32 -0700 | [diff] [blame] | 297 | configs += [ ":rtc_media_warnings_config" ] |
deadbeef | 40610e2 | 2016-12-22 10:53:38 -0800 | [diff] [blame] | 298 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 299 | if (!build_with_chromium && is_clang) { |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 300 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
kjellander | 660312b | 2016-09-26 06:11:53 -0700 | [diff] [blame] | 301 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 302 | } |
| 303 | |
| 304 | if (is_win) { |
| 305 | cflags = [ |
| 306 | "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. |
| 307 | "/wd4267", # conversion from "size_t" to "int", possible loss of data. |
| 308 | "/wd4389", # signed/unsigned mismatch. |
| 309 | ] |
| 310 | } |
| 311 | |
peah | 1bcfce5 | 2016-08-26 07:16:04 -0700 | [diff] [blame] | 312 | if (rtc_enable_intelligibility_enhancer) { |
| 313 | defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ] |
| 314 | } else { |
| 315 | defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ] |
| 316 | } |
| 317 | |
minyue | 2e03c66 | 2017-02-01 17:31:11 -0800 | [diff] [blame] | 318 | if (rtc_opus_support_120ms_ptime) { |
| 319 | defines += [ "WEBRTC_OPUS_SUPPORT_120MS_PTIME=1" ] |
| 320 | } else { |
| 321 | defines += [ "WEBRTC_OPUS_SUPPORT_120MS_PTIME=0" ] |
| 322 | } |
| 323 | |
kjellander | ec5c906 | 2016-08-19 01:07:30 -0700 | [diff] [blame] | 324 | include_dirs = [] |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 325 | |
ehmaldonado | e9cc686 | 2016-09-05 06:10:18 -0700 | [diff] [blame] | 326 | public_configs = [] |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 327 | if (build_with_chromium) { |
| 328 | deps += [ "../modules/video_capture:video_capture" ] |
| 329 | } else { |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 330 | public_configs += [ ":rtc_media_defines_config" ] |
| 331 | deps += [ "../modules/video_capture:video_capture_internal_impl" ] |
| 332 | } |
aleloi | 048cbdd | 2017-05-29 02:56:27 -0700 | [diff] [blame] | 333 | if (rtc_enable_protobuf) { |
| 334 | deps += [ "../modules/audio_processing/aec_dump:aec_dump_impl" ] |
| 335 | } else { |
| 336 | deps += [ "../modules/audio_processing/aec_dump:null_aec_dump_factory" ] |
| 337 | } |
Anders Carlsson | dd8c165 | 2018-01-30 10:32:13 +0100 | [diff] [blame] | 338 | if (rtc_use_builtin_sw_codecs) { |
| 339 | deps += [ ":rtc_internal_video_codecs" ] |
| 340 | } |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 341 | deps += [ |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 342 | ":rtc_constants", |
magjed | 0928a3c | 2016-11-25 00:40:18 -0800 | [diff] [blame] | 343 | ":rtc_media_base", |
Anders Carlsson | dd8c165 | 2018-01-30 10:32:13 +0100 | [diff] [blame] | 344 | ":rtc_software_fallback_wrappers", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 345 | "..:webrtc_common", |
kjellander | a69d973 | 2016-08-31 07:33:05 -0700 | [diff] [blame] | 346 | "../api:call_api", |
zhihuang | 38ede13 | 2017-06-15 12:52:32 -0700 | [diff] [blame] | 347 | "../api:libjingle_peerconnection_api", |
kwiberg | 84f6a3f | 2017-09-05 08:43:13 -0700 | [diff] [blame] | 348 | "../api:optional", |
aleloi | a8eb756 | 2016-11-28 07:02:13 -0800 | [diff] [blame] | 349 | "../api:transport_api", |
kjellander | a2ef4f9 | 2017-03-06 06:04:55 -0800 | [diff] [blame] | 350 | "../api/audio_codecs:audio_codecs_api", |
Niels Möller | c6ce9c5 | 2018-05-11 11:15:30 +0200 | [diff] [blame^] | 351 | "../api/video:video_frame", |
| 352 | "../api/video:video_frame_i420", |
ilnik | d60d06a | 2017-04-05 03:02:20 -0700 | [diff] [blame] | 353 | "../api/video_codecs:video_codecs_api", |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 354 | "../call", |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 355 | "../call:call_interfaces", |
aleloi | 440b6d9 | 2017-08-22 05:43:23 -0700 | [diff] [blame] | 356 | "../call:video_stream_api", |
kjellander | a2ef4f9 | 2017-03-06 06:04:55 -0800 | [diff] [blame] | 357 | "../common_video:common_video", |
kjellander | a2ef4f9 | 2017-03-06 06:04:55 -0800 | [diff] [blame] | 358 | "../modules/audio_device:audio_device", |
Paulina Hensman | 7bd79a0 | 2018-03-15 12:44:12 +0100 | [diff] [blame] | 359 | "../modules/audio_device:audio_device_impl", |
aleloi | 10111bc | 2016-11-17 06:48:48 -0800 | [diff] [blame] | 360 | "../modules/audio_mixer:audio_mixer_impl", |
kjellander | a2ef4f9 | 2017-03-06 06:04:55 -0800 | [diff] [blame] | 361 | "../modules/audio_processing:audio_processing", |
| 362 | "../modules/video_capture:video_capture_module", |
zhihuang | 38ede13 | 2017-06-15 12:52:32 -0700 | [diff] [blame] | 363 | "../pc:rtc_pc_base", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 364 | "../rtc_base:rtc_base", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 365 | "../rtc_base:rtc_task_queue", |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 366 | "../rtc_base:stringutils", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 367 | "../system_wrappers", |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 368 | "../system_wrappers:field_trial_api", |
| 369 | "../system_wrappers:metrics_api", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 370 | ] |
| 371 | } |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 372 | |
zhihuang | 38ede13 | 2017-06-15 12:52:32 -0700 | [diff] [blame] | 373 | rtc_static_library("rtc_data") { |
| 374 | defines = [] |
| 375 | deps = [] |
| 376 | |
| 377 | if (rtc_enable_sctp) { |
| 378 | sources = [ |
| 379 | "sctp/sctptransport.cc", |
| 380 | "sctp/sctptransport.h", |
| 381 | "sctp/sctptransportinternal.h", |
| 382 | ] |
Kári Tristan Helgason | 4d3e24a | 2017-12-01 15:26:41 +0100 | [diff] [blame] | 383 | } else { |
| 384 | # libtool on mac does not like empty targets. |
| 385 | sources = [ |
Mirko Bonadei | 6c8e666 | 2017-12-13 07:40:54 +0100 | [diff] [blame] | 386 | "sctp/noop.cc", |
Kári Tristan Helgason | 4d3e24a | 2017-12-01 15:26:41 +0100 | [diff] [blame] | 387 | ] |
zhihuang | 38ede13 | 2017-06-15 12:52:32 -0700 | [diff] [blame] | 388 | } |
| 389 | |
| 390 | configs += [ ":rtc_media_warnings_config" ] |
| 391 | |
| 392 | if (!build_with_chromium && is_clang) { |
| 393 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 394 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 395 | } |
| 396 | |
| 397 | if (is_win) { |
| 398 | cflags = [ |
| 399 | "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. |
| 400 | "/wd4267", # conversion from "size_t" to "int", possible loss of data. |
| 401 | "/wd4389", # signed/unsigned mismatch. |
| 402 | ] |
| 403 | } |
| 404 | |
| 405 | if (rtc_enable_sctp && rtc_build_usrsctp) { |
| 406 | include_dirs = [ |
| 407 | # TODO(jiayl): move this into the public_configs of |
| 408 | # //third_party/usrsctp/BUILD.gn. |
| 409 | "//third_party/usrsctp/usrsctplib", |
| 410 | ] |
| 411 | deps += [ "//third_party/usrsctp" ] |
| 412 | } |
| 413 | |
| 414 | deps += [ |
| 415 | ":rtc_media_base", |
| 416 | "..:webrtc_common", |
| 417 | "../api:call_api", |
| 418 | "../api:transport_api", |
zhihuang | 38ede13 | 2017-06-15 12:52:32 -0700 | [diff] [blame] | 419 | "../p2p:rtc_p2p", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 420 | "../rtc_base:rtc_base", |
| 421 | "../rtc_base:rtc_base_approved", |
zhihuang | 38ede13 | 2017-06-15 12:52:32 -0700 | [diff] [blame] | 422 | "../system_wrappers", |
| 423 | ] |
| 424 | } |
| 425 | |
| 426 | rtc_source_set("rtc_media") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 427 | visibility = [ "*" ] |
Anders Carlsson | 1f433e4 | 2018-04-24 16:39:05 +0200 | [diff] [blame] | 428 | allow_poison = [ |
| 429 | "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove. |
| 430 | "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove. |
| 431 | ] |
Mirko Bonadei | 75baa49 | 2018-01-11 17:07:30 +0100 | [diff] [blame] | 432 | deps = [ |
zhihuang | 38ede13 | 2017-06-15 12:52:32 -0700 | [diff] [blame] | 433 | ":rtc_audio_video", |
| 434 | ":rtc_data", |
| 435 | ] |
| 436 | } |
| 437 | |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 438 | if (rtc_include_tests) { |
| 439 | config("rtc_unittest_main_config") { |
| 440 | # GN orders flags on a target before flags from configs. The default config |
| 441 | # adds -Wall, and this flag have to be after -Wall -- so they need to |
| 442 | # come from a config and can"t be on the target directly. |
| 443 | if (is_clang && is_ios) { |
| 444 | cflags = [ "-Wno-unused-variable" ] |
| 445 | } |
| 446 | } |
| 447 | |
mbonadei | 9087d49 | 2017-04-25 00:35:35 -0700 | [diff] [blame] | 448 | rtc_source_set("rtc_media_tests_utils") { |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 449 | testonly = true |
| 450 | |
kjellander | ec5c906 | 2016-08-19 01:07:30 -0700 | [diff] [blame] | 451 | include_dirs = [] |
kjellander | a2ef4f9 | 2017-03-06 06:04:55 -0800 | [diff] [blame] | 452 | deps = [ |
Mirko Bonadei | 75baa49 | 2018-01-11 17:07:30 +0100 | [diff] [blame] | 453 | ":rtc_audio_video", |
Patrik Höglund | be214a2 | 2018-01-04 12:14:35 +0100 | [diff] [blame] | 454 | "../api:libjingle_peerconnection_api", |
Niels Möller | c6ce9c5 | 2018-05-11 11:15:30 +0200 | [diff] [blame^] | 455 | "../api/video:video_frame_i420", |
aleloi | 440b6d9 | 2017-08-22 05:43:23 -0700 | [diff] [blame] | 456 | "../call:video_stream_api", |
Patrik Höglund | be214a2 | 2018-01-04 12:14:35 +0100 | [diff] [blame] | 457 | "../common_video:common_video", |
kjellander | a2ef4f9 | 2017-03-06 06:04:55 -0800 | [diff] [blame] | 458 | "../modules/audio_coding:rent_a_codec", |
| 459 | "../modules/audio_processing:audio_processing", |
Mirko Bonadei | b5728d9 | 2017-12-06 07:51:33 +0100 | [diff] [blame] | 460 | "../modules/rtp_rtcp:rtp_rtcp_format", |
Patrik Höglund | 99175c6 | 2018-01-08 11:05:10 +0100 | [diff] [blame] | 461 | "../modules/video_coding:video_codec_interface", |
charujain | cb728ea | 2017-09-18 03:08:08 -0700 | [diff] [blame] | 462 | "../modules/video_coding:video_coding_utility", |
kjellander | a2ef4f9 | 2017-03-06 06:04:55 -0800 | [diff] [blame] | 463 | "../p2p:rtc_p2p", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 464 | "../rtc_base:checks", |
Tommi | 8d2c5a8 | 2018-03-19 11:12:48 +0100 | [diff] [blame] | 465 | "../rtc_base:rtc_task_queue", |
Patrik Höglund | 3e11343 | 2017-12-15 14:40:10 +0100 | [diff] [blame] | 466 | "../rtc_base:stringutils", |
kjellander | a2ef4f9 | 2017-03-06 06:04:55 -0800 | [diff] [blame] | 467 | ] |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 468 | sources = [ |
Niels Möller | a6cc0f9 | 2018-02-12 17:14:55 +0100 | [diff] [blame] | 469 | "base/fakeframesource.cc", |
| 470 | "base/fakeframesource.h", |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 471 | "base/fakemediaengine.h", |
| 472 | "base/fakenetworkinterface.h", |
jbauch | 5869f50 | 2017-06-29 12:31:36 -0700 | [diff] [blame] | 473 | "base/fakertp.cc", |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 474 | "base/fakertp.h", |
Tommi | 1829af6 | 2018-02-06 09:29:17 +0100 | [diff] [blame] | 475 | "base/fakevideocapturer.cc", |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 476 | "base/fakevideocapturer.h", |
| 477 | "base/fakevideorenderer.h", |
| 478 | "base/testutils.cc", |
| 479 | "base/testutils.h", |
| 480 | "engine/fakewebrtccall.cc", |
| 481 | "engine/fakewebrtccall.h", |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 482 | "engine/fakewebrtcdeviceinfo.h", |
| 483 | "engine/fakewebrtcvcmfactory.h", |
| 484 | "engine/fakewebrtcvideocapturemodule.h", |
Anders Carlsson | 6753795 | 2018-05-03 11:28:29 +0200 | [diff] [blame] | 485 | "engine/fakewebrtcvideoengine.cc", |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 486 | "engine/fakewebrtcvideoengine.h", |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 487 | ] |
| 488 | |
ehmaldonado | 7a2ce0b | 2016-09-05 01:35:44 -0700 | [diff] [blame] | 489 | configs += [ ":rtc_unittest_main_config" ] |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 490 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 491 | if (!build_with_chromium && is_clang) { |
| 492 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 493 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 494 | } |
| 495 | |
| 496 | deps += [ |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 497 | ":rtc_internal_video_codecs", |
kjellander | a2ef4f9 | 2017-03-06 06:04:55 -0800 | [diff] [blame] | 498 | ":rtc_media", |
| 499 | ":rtc_media_base", |
| 500 | "..:webrtc_common", |
| 501 | "../api:call_api", |
Niels Möller | c6ce9c5 | 2018-05-11 11:15:30 +0200 | [diff] [blame^] | 502 | "../api/video:video_frame", |
ilnik | d60d06a | 2017-04-05 03:02:20 -0700 | [diff] [blame] | 503 | "../api/video_codecs:video_codecs_api", |
kjellander | a2ef4f9 | 2017-03-06 06:04:55 -0800 | [diff] [blame] | 504 | "../call:call_interfaces", |
Sebastian Jansson | 8f83b42 | 2018-02-21 13:07:13 +0100 | [diff] [blame] | 505 | "../call:mock_rtp_interfaces", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 506 | "../rtc_base:rtc_base", |
| 507 | "../rtc_base:rtc_base_approved", |
| 508 | "../rtc_base:rtc_base_tests_utils", |
Tommi | 6856156 | 2018-02-13 19:47:50 +0100 | [diff] [blame] | 509 | "../rtc_base:rtc_task_queue_for_test", |
kjellander | a2ef4f9 | 2017-03-06 06:04:55 -0800 | [diff] [blame] | 510 | "../test:test_support", |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 511 | "//testing/gtest", |
| 512 | ] |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 513 | } |
| 514 | |
| 515 | config("rtc_media_unittests_config") { |
| 516 | # GN orders flags on a target before flags from configs. The default config |
| 517 | # adds -Wall, and this flag have to be after -Wall -- so they need to |
| 518 | # come from a config and can"t be on the target directly. |
| 519 | # TODO(kjellander): Make the code compile without disabling these flags. |
| 520 | # See https://bugs.webrtc.org/3307. |
| 521 | if (is_clang && is_win) { |
ehmaldonado | d02fe4b | 2016-08-26 13:31:24 -0700 | [diff] [blame] | 522 | cflags = [ |
| 523 | # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6266 |
| 524 | # for -Wno-sign-compare |
| 525 | "-Wno-sign-compare", |
ehmaldonado | d02fe4b | 2016-08-26 13:31:24 -0700 | [diff] [blame] | 526 | ] |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 527 | } |
| 528 | if (!is_win) { |
| 529 | cflags = [ "-Wno-sign-compare" ] |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 530 | } |
| 531 | } |
| 532 | |
ehmaldonado | 3a7f35b | 2016-09-14 05:10:01 -0700 | [diff] [blame] | 533 | rtc_media_unittests_resources = [ |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 534 | "../resources/media/captured-320x240-2s-48.frames", |
| 535 | "../resources/media/faces.1280x720_P420.yuv", |
| 536 | "../resources/media/faces_I420.jpg", |
| 537 | "../resources/media/faces_I422.jpg", |
| 538 | "../resources/media/faces_I444.jpg", |
| 539 | "../resources/media/faces_I411.jpg", |
| 540 | "../resources/media/faces_I400.jpg", |
ehmaldonado | 3a7f35b | 2016-09-14 05:10:01 -0700 | [diff] [blame] | 541 | ] |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame] | 542 | |
| 543 | if (is_ios) { |
| 544 | bundle_data("rtc_media_unittests_bundle_data") { |
| 545 | testonly = true |
| 546 | sources = rtc_media_unittests_resources |
| 547 | outputs = [ |
| 548 | "{{bundle_resources_dir}}/{{source_file_part}}", |
| 549 | ] |
| 550 | } |
| 551 | } |
| 552 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 553 | rtc_test("rtc_media_unittests") { |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 554 | testonly = true |
| 555 | |
johan | 073ece4 | 2016-08-26 02:59:47 -0700 | [diff] [blame] | 556 | defines = [] |
kjellander | a2ef4f9 | 2017-03-06 06:04:55 -0800 | [diff] [blame] | 557 | deps = [ |
Mirko Bonadei | 75baa49 | 2018-01-11 17:07:30 +0100 | [diff] [blame] | 558 | ":rtc_audio_video", |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 559 | ":rtc_constants", |
Mirko Bonadei | 75baa49 | 2018-01-11 17:07:30 +0100 | [diff] [blame] | 560 | ":rtc_data", |
Niels Möller | c6ce9c5 | 2018-05-11 11:15:30 +0200 | [diff] [blame^] | 561 | "../api/video:video_frame_i420", |
Patrik Höglund | 6213929 | 2017-12-19 16:44:45 +0100 | [diff] [blame] | 562 | "../modules/audio_processing:mocks", |
Patrik Höglund | 99175c6 | 2018-01-08 11:05:10 +0100 | [diff] [blame] | 563 | "../modules/video_coding:video_codec_interface", |
kjellander | a2ef4f9 | 2017-03-06 06:04:55 -0800 | [diff] [blame] | 564 | "../pc:rtc_pc", |
Mirko Bonadei | e51f785 | 2017-12-06 11:23:19 +0100 | [diff] [blame] | 565 | "../pc:rtc_pc_base", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 566 | "../rtc_base:checks", |
Tommi | 8d2c5a8 | 2018-03-19 11:12:48 +0100 | [diff] [blame] | 567 | "../rtc_base:rtc_task_queue", |
Patrik Höglund | 3e11343 | 2017-12-15 14:40:10 +0100 | [diff] [blame] | 568 | "../rtc_base:stringutils", |
kjellander | a2ef4f9 | 2017-03-06 06:04:55 -0800 | [diff] [blame] | 569 | "../test:field_trial", |
| 570 | ] |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 571 | sources = [ |
| 572 | "base/codec_unittest.cc", |
| 573 | "base/rtpdataengine_unittest.cc", |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 574 | "base/rtputils_unittest.cc", |
| 575 | "base/streamparams_unittest.cc", |
| 576 | "base/turnutils_unittest.cc", |
| 577 | "base/videoadapter_unittest.cc", |
| 578 | "base/videobroadcaster_unittest.cc", |
| 579 | "base/videocapturer_unittest.cc", |
| 580 | "base/videocommon_unittest.cc", |
solenberg | 76377c5 | 2017-02-21 00:54:31 -0800 | [diff] [blame] | 581 | "engine/apm_helpers_unittest.cc", |
magjed | dd40702 | 2016-12-01 00:27:27 -0800 | [diff] [blame] | 582 | "engine/internaldecoderfactory_unittest.cc", |
Emircan Uysaler | d7ae3c3 | 2018-01-25 13:01:09 -0800 | [diff] [blame] | 583 | "engine/multiplexcodecfactory_unittest.cc", |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 584 | "engine/nullwebrtcvideoengine_unittest.cc", |
ossu | c54071d | 2016-08-17 02:45:41 -0700 | [diff] [blame] | 585 | "engine/payload_type_mapper_unittest.cc", |
magjed | 6cc2561 | 2017-07-10 03:26:36 -0700 | [diff] [blame] | 586 | "engine/simulcast_encoder_adapter_unittest.cc", |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 587 | "engine/simulcast_unittest.cc", |
magjed | f6acc2a | 2016-11-22 01:43:03 -0800 | [diff] [blame] | 588 | "engine/videodecodersoftwarefallbackwrapper_unittest.cc", |
magjed | 614d5b7 | 2016-11-15 06:30:54 -0800 | [diff] [blame] | 589 | "engine/videoencodersoftwarefallbackwrapper_unittest.cc", |
Ilya Nikolaevskiy | c22a3a6 | 2017-10-25 10:04:54 +0200 | [diff] [blame] | 590 | "engine/vp8_encoder_simulcast_proxy_unittest.cc", |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 591 | "engine/webrtcmediaengine_unittest.cc", |
| 592 | "engine/webrtcvideocapturer_unittest.cc", |
noahric | be850e1 | 2017-01-20 01:07:26 -0800 | [diff] [blame] | 593 | "engine/webrtcvideoencoderfactory_unittest.cc", |
eladalon | f184138 | 2017-06-12 01:16:46 -0700 | [diff] [blame] | 594 | "engine/webrtcvideoengine_unittest.cc", |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 595 | ] |
| 596 | |
oprypin | 4519752 | 2017-06-22 01:47:20 -0700 | [diff] [blame] | 597 | # TODO(kthelgason): Reenable this test on iOS. |
| 598 | # See bugs.webrtc.org/5569 |
| 599 | if (!is_ios) { |
| 600 | sources += [ "engine/webrtcvoiceengine_unittest.cc" ] |
| 601 | } |
| 602 | |
deadbeef | 40610e2 | 2016-12-22 10:53:38 -0800 | [diff] [blame] | 603 | if (rtc_enable_sctp) { |
deadbeef | 953c2ce | 2017-01-09 14:53:41 -0800 | [diff] [blame] | 604 | sources += [ "sctp/sctptransport_unittest.cc" ] |
deadbeef | 40610e2 | 2016-12-22 10:53:38 -0800 | [diff] [blame] | 605 | } |
| 606 | |
ehmaldonado | 7a2ce0b | 2016-09-05 01:35:44 -0700 | [diff] [blame] | 607 | configs += [ ":rtc_media_unittests_config" ] |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 608 | |
johan | 073ece4 | 2016-08-26 02:59:47 -0700 | [diff] [blame] | 609 | if (rtc_use_h264) { |
| 610 | defines += [ "WEBRTC_USE_H264" ] |
| 611 | } |
ossu | 11bfc53 | 2017-02-16 05:37:06 -0800 | [diff] [blame] | 612 | |
| 613 | if (rtc_opus_support_120ms_ptime) { |
| 614 | defines += [ "WEBRTC_OPUS_SUPPORT_120MS_PTIME=1" ] |
| 615 | } else { |
| 616 | defines += [ "WEBRTC_OPUS_SUPPORT_120MS_PTIME=0" ] |
| 617 | } |
| 618 | |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 619 | if (is_win) { |
| 620 | cflags = [ |
| 621 | "/wd4245", # conversion from int to size_t, signed/unsigned mismatch. |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 622 | "/wd4389", # signed/unsigned mismatch. |
| 623 | ] |
| 624 | } |
| 625 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 626 | if (!build_with_chromium && is_clang) { |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 627 | suppressed_configs += [ |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 628 | "//build/config/clang:extra_warnings", |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 629 | |
| 630 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 631 | "//build/config/clang:find_bad_constructs", |
| 632 | ] |
| 633 | } |
| 634 | |
ehmaldonado | 3a7f35b | 2016-09-14 05:10:01 -0700 | [diff] [blame] | 635 | data = rtc_media_unittests_resources |
| 636 | |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 637 | if (is_android) { |
| 638 | deps += [ "//testing/android/native_test:native_test_support" ] |
kjellander | 28a0ffd | 2016-08-24 07:48:42 -0700 | [diff] [blame] | 639 | shard_timeout = 900 |
| 640 | } |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame] | 641 | |
| 642 | if (is_ios) { |
| 643 | deps += [ ":rtc_media_unittests_bundle_data" ] |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 644 | } |
| 645 | |
| 646 | deps += [ |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 647 | ":rtc_internal_video_codecs", |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 648 | ":rtc_media", |
kjellander | a2ef4f9 | 2017-03-06 06:04:55 -0800 | [diff] [blame] | 649 | ":rtc_media_base", |
mbonadei | 9087d49 | 2017-04-25 00:35:35 -0700 | [diff] [blame] | 650 | ":rtc_media_tests_utils", |
Anders Carlsson | dd8c165 | 2018-01-30 10:32:13 +0100 | [diff] [blame] | 651 | ":rtc_software_fallback_wrappers", |
Seth Hampson | 24722b3 | 2017-12-22 09:36:42 -0800 | [diff] [blame] | 652 | "../api:libjingle_peerconnection_api", |
Emircan Uysaler | dbcac7f | 2017-10-30 23:10:12 -0700 | [diff] [blame] | 653 | "../api:mock_video_codec_factory", |
kjellander | a2ef4f9 | 2017-03-06 06:04:55 -0800 | [diff] [blame] | 654 | "../api/audio_codecs:builtin_audio_decoder_factory", |
ossu | eb1fde4 | 2017-05-02 06:46:30 -0700 | [diff] [blame] | 655 | "../api/audio_codecs:builtin_audio_encoder_factory", |
Niels Möller | c6ce9c5 | 2018-05-11 11:15:30 +0200 | [diff] [blame^] | 656 | "../api/video:video_frame", |
ilnik | d60d06a | 2017-04-05 03:02:20 -0700 | [diff] [blame] | 657 | "../api/video_codecs:video_codecs_api", |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 658 | "../audio", |
kjellander | a2ef4f9 | 2017-03-06 06:04:55 -0800 | [diff] [blame] | 659 | "../call:call_interfaces", |
| 660 | "../common_video:common_video", |
| 661 | "../logging:rtc_event_log_api", |
Qingsi Wang | 970b088 | 2018-02-01 11:04:46 -0800 | [diff] [blame] | 662 | "../logging:rtc_event_log_impl_base", |
aleloi | 5de52fd | 2016-11-10 01:05:34 -0800 | [diff] [blame] | 663 | "../modules/audio_device:mock_audio_device", |
kjellander | a2ef4f9 | 2017-03-06 06:04:55 -0800 | [diff] [blame] | 664 | "../modules/audio_processing:audio_processing", |
magjed | 6cc2561 | 2017-07-10 03:26:36 -0700 | [diff] [blame] | 665 | "../modules/video_coding:simulcast_test_utility", |
kjellander | a2ef4f9 | 2017-03-06 06:04:55 -0800 | [diff] [blame] | 666 | "../modules/video_coding:video_coding_utility", |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 667 | "../modules/video_coding:webrtc_vp8_helpers", |
deadbeef | 59edb92 | 2017-04-18 15:49:09 -0700 | [diff] [blame] | 668 | "../p2p:p2p_test_utils", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 669 | "../rtc_base:rtc_base", |
| 670 | "../rtc_base:rtc_base_approved", |
| 671 | "../rtc_base:rtc_base_tests_main", |
| 672 | "../rtc_base:rtc_base_tests_utils", |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 673 | "../system_wrappers:metrics_default", |
Ilya Nikolaevskiy | 2ffe3e8 | 2018-01-17 19:57:24 +0000 | [diff] [blame] | 674 | "../system_wrappers:runtime_enabled_features_default", |
kwiberg | 37e99fd | 2017-04-10 05:15:48 -0700 | [diff] [blame] | 675 | "../test:audio_codec_mocks", |
kjellander | a2ef4f9 | 2017-03-06 06:04:55 -0800 | [diff] [blame] | 676 | "../test:test_support", |
Ilya Nikolaevskiy | c22a3a6 | 2017-10-25 10:04:54 +0200 | [diff] [blame] | 677 | "../test:video_test_common", |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 678 | ] |
| 679 | } |
| 680 | } |