OLD | NEW |
1 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license | 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 | 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 | 5 # tree. An additional intellectual property rights grant can be found |
6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
8 | 8 |
9 import("//build/config/linux/pkg_config.gni") | 9 import("//build/config/linux/pkg_config.gni") |
10 import("../webrtc.gni") | 10 import("../webrtc.gni") |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 config("rtc_media_warnings_config") { | 26 config("rtc_media_warnings_config") { |
27 # GN orders flags on a target before flags from configs. The default config | 27 # GN orders flags on a target before flags from configs. The default config |
28 # adds these flags so to cancel them out they need to come from a config and | 28 # adds these flags so to cancel them out they need to come from a config and |
29 # cannot be on the target directly. | 29 # cannot be on the target directly. |
30 if (!is_win) { | 30 if (!is_win) { |
31 cflags = [ "-Wno-deprecated-declarations" ] | 31 cflags = [ "-Wno-deprecated-declarations" ] |
32 } | 32 } |
33 } | 33 } |
34 | 34 |
35 rtc_static_library("rtc_media_base") { | 35 rtc_source_set("rtc_media_base_audio") { |
| 36 sources = [ |
| 37 "base/audiosource.h", |
| 38 ] |
| 39 deps = [ |
| 40 "../api/audio_codecs:audio_codecs_api", |
| 41 ] |
| 42 } |
| 43 |
| 44 rtc_source_set("rtc_media_base_video") { |
| 45 deps = [ |
| 46 "../api:video_frame_api", |
| 47 "../common_video:common_video", |
| 48 ] |
| 49 } |
| 50 |
| 51 # This target is used to build WebRTC without audio and video support but it |
| 52 # contains more than just datachannel related classes. |
| 53 # TODO(zhihuang): Split this target further into a target containing only |
| 54 # datachannel related classes and a target containing common classes for media |
| 55 # base. |
| 56 rtc_source_set("rtc_media_base_data") { |
36 # TODO(kjellander): Remove (bugs.webrtc.org/6828) | 57 # TODO(kjellander): Remove (bugs.webrtc.org/6828) |
37 # Enabling GN check triggers cyclic dependency error: | 58 # Enabling GN check triggers cyclic dependency error: |
38 # //webrtc/media:rtc_media_base -> | 59 # //webrtc/media:rtc_media_base_data -> |
39 # //webrtc/pc:rtc_pc -> | 60 # //webrtc/pc:rtc_pc_base -> |
40 # //webrtc/media:media -> | 61 # //webrtc/media:rtc_data -> |
41 # //webrtc/media:rtc_media_base | 62 # //webrtc/media:rtc_media_base_data |
42 check_includes = false | 63 check_includes = false |
43 defines = [] | 64 defines = [] |
44 libs = [] | 65 libs = [] |
45 deps = [] | 66 deps = [] |
46 sources = [ | 67 sources = [ |
47 "base/adaptedvideotracksource.cc", | 68 "base/adaptedvideotracksource.cc", |
48 "base/adaptedvideotracksource.h", | 69 "base/adaptedvideotracksource.h", |
49 "base/audiosource.h", | |
50 "base/codec.cc", | 70 "base/codec.cc", |
51 "base/codec.h", | 71 "base/codec.h", |
52 "base/cryptoparams.h", | 72 "base/cryptoparams.h", |
53 "base/device.h", | 73 "base/device.h", |
| 74 "base/h264_profile_level_id.cc", |
| 75 "base/h264_profile_level_id.h", |
54 "base/mediachannel.h", | 76 "base/mediachannel.h", |
55 "base/mediaconstants.cc", | 77 "base/mediaconstants.cc", |
56 "base/mediaconstants.h", | 78 "base/mediaconstants.h", |
57 "base/mediaengine.cc", | 79 "base/mediaengine.cc", |
58 "base/mediaengine.h", | 80 "base/mediaengine.h", |
59 "base/rtpdataengine.cc", | 81 "base/rtpdataengine.cc", |
60 "base/rtpdataengine.h", | 82 "base/rtpdataengine.h", |
61 "base/rtputils.cc", | 83 "base/rtputils.cc", |
62 "base/rtputils.h", | 84 "base/rtputils.h", |
63 "base/streamparams.cc", | 85 "base/streamparams.cc", |
(...skipping 27 matching lines...) Expand all Loading... |
91 "$rtc_libyuv_dir", | 113 "$rtc_libyuv_dir", |
92 ] | 114 ] |
93 } else { | 115 } else { |
94 # Need to add a directory normally exported by libyuv. | 116 # Need to add a directory normally exported by libyuv. |
95 include_dirs += [ "$rtc_libyuv_dir/include" ] | 117 include_dirs += [ "$rtc_libyuv_dir/include" ] |
96 } | 118 } |
97 | 119 |
98 deps += [ | 120 deps += [ |
99 "..:webrtc_common", | 121 "..:webrtc_common", |
100 "../api:libjingle_peerconnection_api", | 122 "../api:libjingle_peerconnection_api", |
101 "../api:video_frame_api", | |
102 "../api/audio_codecs:audio_codecs_api", | |
103 "../api/audio_codecs:builtin_audio_encoder_factory", | |
104 "../base:rtc_base", | 123 "../base:rtc_base", |
105 "../base:rtc_base_approved", | 124 "../base:rtc_base_approved", |
106 "../call:call_interfaces", | 125 "../call:call_interfaces", |
107 "../common_video:common_video", | |
108 "../p2p", | 126 "../p2p", |
109 ] | 127 ] |
110 | 128 |
111 if (is_nacl) { | 129 if (is_nacl) { |
112 deps += [ "//native_client_sdk/src/libraries/nacl_io" ] | 130 deps += [ "//native_client_sdk/src/libraries/nacl_io" ] |
113 } | 131 } |
114 } | 132 } |
115 | 133 |
116 rtc_static_library("rtc_media") { | 134 rtc_source_set("rtc_media_base") { |
117 # TODO(kjellander): Remove (bugs.webrtc.org/6828) | 135 public_deps = [ |
118 # Enabling GN check triggers cyclic dependency error: | 136 ":rtc_media_base_audio", |
119 # //webrtc/media:media -> | 137 ":rtc_media_base_data", |
120 # //webrtc/media:rtc_media -> | 138 ":rtc_media_base_video", |
121 # //webrtc/pc:rtc_pc -> | 139 ] |
122 # //webrtc/media:media | 140 } |
123 check_includes = false | 141 |
| 142 rtc_static_library("rtc_audio_video") { |
124 defines = [] | 143 defines = [] |
125 libs = [] | 144 libs = [] |
126 deps = [] | 145 deps = [] |
127 sources = [ | 146 sources = [ |
128 "engine/adm_helpers.cc", | 147 "engine/adm_helpers.cc", |
129 "engine/adm_helpers.h", | 148 "engine/adm_helpers.h", |
130 "engine/apm_helpers.cc", | 149 "engine/apm_helpers.cc", |
131 "engine/apm_helpers.h", | 150 "engine/apm_helpers.h", |
132 "engine/internaldecoderfactory.cc", | 151 "engine/internaldecoderfactory.cc", |
133 "engine/internaldecoderfactory.h", | 152 "engine/internaldecoderfactory.h", |
(...skipping 15 matching lines...) Expand all Loading... |
149 "engine/webrtcvideocapturer.h", | 168 "engine/webrtcvideocapturer.h", |
150 "engine/webrtcvideocapturerfactory.cc", | 169 "engine/webrtcvideocapturerfactory.cc", |
151 "engine/webrtcvideocapturerfactory.h", | 170 "engine/webrtcvideocapturerfactory.h", |
152 "engine/webrtcvideodecoderfactory.h", | 171 "engine/webrtcvideodecoderfactory.h", |
153 "engine/webrtcvideoencoderfactory.h", | 172 "engine/webrtcvideoencoderfactory.h", |
154 "engine/webrtcvideoengine2.cc", | 173 "engine/webrtcvideoengine2.cc", |
155 "engine/webrtcvideoengine2.h", | 174 "engine/webrtcvideoengine2.h", |
156 "engine/webrtcvoe.h", | 175 "engine/webrtcvoe.h", |
157 "engine/webrtcvoiceengine.cc", | 176 "engine/webrtcvoiceengine.cc", |
158 "engine/webrtcvoiceengine.h", | 177 "engine/webrtcvoiceengine.h", |
159 "sctp/sctptransportinternal.h", | |
160 ] | 178 ] |
161 | 179 |
162 if (rtc_enable_sctp) { | |
163 sources += [ | |
164 "sctp/sctptransport.cc", | |
165 "sctp/sctptransport.h", | |
166 ] | |
167 } | |
168 | |
169 configs += [ ":rtc_media_warnings_config" ] | 180 configs += [ ":rtc_media_warnings_config" ] |
170 | 181 |
171 if (!build_with_chromium && is_clang) { | 182 if (!build_with_chromium && is_clang) { |
172 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 183 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
173 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 184 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
174 } | 185 } |
175 | 186 |
176 if (is_win) { | 187 if (is_win) { |
177 cflags = [ | 188 cflags = [ |
178 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. | 189 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. |
(...skipping 18 matching lines...) Expand all Loading... |
197 if (rtc_build_libyuv) { | 208 if (rtc_build_libyuv) { |
198 deps += [ "$rtc_libyuv_dir" ] | 209 deps += [ "$rtc_libyuv_dir" ] |
199 public_deps = [ | 210 public_deps = [ |
200 "$rtc_libyuv_dir", | 211 "$rtc_libyuv_dir", |
201 ] | 212 ] |
202 } else { | 213 } else { |
203 # Need to add a directory normally exported by libyuv. | 214 # Need to add a directory normally exported by libyuv. |
204 include_dirs += [ "$rtc_libyuv_dir/include" ] | 215 include_dirs += [ "$rtc_libyuv_dir/include" ] |
205 } | 216 } |
206 | 217 |
207 if (rtc_enable_sctp && rtc_build_usrsctp) { | |
208 include_dirs += [ | |
209 # TODO(jiayl): move this into the public_configs of | |
210 # //third_party/usrsctp/BUILD.gn. | |
211 "//third_party/usrsctp/usrsctplib", | |
212 ] | |
213 deps += [ "//third_party/usrsctp" ] | |
214 } | |
215 | |
216 public_configs = [] | 218 public_configs = [] |
217 if (build_with_chromium) { | 219 if (build_with_chromium) { |
218 deps += [ "../modules/video_capture:video_capture" ] | 220 deps += [ "../modules/video_capture:video_capture" ] |
219 } else { | 221 } else { |
220 public_configs += [ ":rtc_media_defines_config" ] | 222 public_configs += [ ":rtc_media_defines_config" ] |
221 deps += [ "../modules/video_capture:video_capture_internal_impl" ] | 223 deps += [ "../modules/video_capture:video_capture_internal_impl" ] |
222 } | 224 } |
223 deps += [ | 225 deps += [ |
224 ":rtc_media_base", | 226 ":rtc_media_base_audio", |
| 227 ":rtc_media_base_data", |
| 228 ":rtc_media_base_video", |
| 229 "..:video_stream_api", |
225 "..:webrtc_common", | 230 "..:webrtc_common", |
226 "../api:call_api", | 231 "../api:call_api", |
| 232 "../api:libjingle_peerconnection_api", |
227 "../api:transport_api", | 233 "../api:transport_api", |
228 "../api:video_frame_api", | 234 "../api:video_frame_api", |
229 "../api/audio_codecs:audio_codecs_api", | 235 "../api/audio_codecs:audio_codecs_api", |
230 "../api/audio_codecs:builtin_audio_decoder_factory", | 236 "../api/audio_codecs:builtin_audio_decoder_factory", |
| 237 "../api/audio_codecs:builtin_audio_encoder_factory", |
231 "../api/video_codecs:video_codecs_api", | 238 "../api/video_codecs:video_codecs_api", |
232 "../base:rtc_base", | 239 "../base:rtc_base", |
233 "../base:rtc_base_approved", | 240 "../base:rtc_base_approved", |
| 241 "../base:rtc_task_queue", |
234 "../call", | 242 "../call", |
235 "../common_video:common_video", | 243 "../common_video:common_video", |
236 "../modules/audio_coding:rent_a_codec", | 244 "../modules/audio_coding:rent_a_codec", |
237 "../modules/audio_device:audio_device", | 245 "../modules/audio_device:audio_device", |
238 "../modules/audio_mixer:audio_mixer_impl", | 246 "../modules/audio_mixer:audio_mixer_impl", |
239 "../modules/audio_processing:audio_processing", | 247 "../modules/audio_processing:audio_processing", |
240 "../modules/video_capture:video_capture_module", | 248 "../modules/video_capture:video_capture_module", |
241 "../modules/video_coding", | 249 "../modules/video_coding", |
242 "../modules/video_coding:webrtc_h264", | 250 "../modules/video_coding:webrtc_h264", |
243 "../modules/video_coding:webrtc_vp8", | 251 "../modules/video_coding:webrtc_vp8", |
244 "../modules/video_coding:webrtc_vp9", | 252 "../modules/video_coding:webrtc_vp9", |
245 "../p2p:rtc_p2p", | 253 "../p2p:rtc_p2p", |
| 254 "../pc:rtc_pc_base", |
246 "../system_wrappers", | 255 "../system_wrappers", |
247 "../video", | 256 "../video", |
248 "../voice_engine", | 257 "../voice_engine", |
249 ] | 258 ] |
250 } | 259 } |
251 | 260 |
| 261 rtc_static_library("rtc_data") { |
| 262 defines = [] |
| 263 deps = [] |
| 264 |
| 265 if (rtc_enable_sctp) { |
| 266 sources = [ |
| 267 "sctp/sctptransport.cc", |
| 268 "sctp/sctptransport.h", |
| 269 "sctp/sctptransportinternal.h", |
| 270 ] |
| 271 } |
| 272 |
| 273 configs += [ ":rtc_media_warnings_config" ] |
| 274 |
| 275 if (!build_with_chromium && is_clang) { |
| 276 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 277 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 278 } |
| 279 |
| 280 if (is_win) { |
| 281 cflags = [ |
| 282 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. |
| 283 "/wd4267", # conversion from "size_t" to "int", possible loss of data. |
| 284 "/wd4389", # signed/unsigned mismatch. |
| 285 ] |
| 286 } |
| 287 |
| 288 if (rtc_enable_sctp && rtc_build_usrsctp) { |
| 289 include_dirs = [ |
| 290 # TODO(jiayl): move this into the public_configs of |
| 291 # //third_party/usrsctp/BUILD.gn. |
| 292 "//third_party/usrsctp/usrsctplib", |
| 293 ] |
| 294 deps += [ "//third_party/usrsctp" ] |
| 295 } |
| 296 |
| 297 deps += [ |
| 298 ":rtc_media_base_data", |
| 299 "..:webrtc_common", |
| 300 "../api:call_api", |
| 301 "../api:transport_api", |
| 302 "../base:rtc_base", |
| 303 "../base:rtc_base_approved", |
| 304 "../p2p:rtc_p2p", |
| 305 "../system_wrappers", |
| 306 ] |
| 307 } |
| 308 |
| 309 rtc_source_set("rtc_media") { |
| 310 public_deps = [ |
| 311 ":rtc_audio_video", |
| 312 ":rtc_data", |
| 313 ] |
| 314 } |
| 315 |
252 if (rtc_include_tests) { | 316 if (rtc_include_tests) { |
253 config("rtc_unittest_main_config") { | 317 config("rtc_unittest_main_config") { |
254 # GN orders flags on a target before flags from configs. The default config | 318 # GN orders flags on a target before flags from configs. The default config |
255 # adds -Wall, and this flag have to be after -Wall -- so they need to | 319 # adds -Wall, and this flag have to be after -Wall -- so they need to |
256 # come from a config and can"t be on the target directly. | 320 # come from a config and can"t be on the target directly. |
257 if (is_clang && is_ios) { | 321 if (is_clang && is_ios) { |
258 cflags = [ "-Wno-unused-variable" ] | 322 cflags = [ "-Wno-unused-variable" ] |
259 } | 323 } |
260 } | 324 } |
261 | 325 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 "../modules/video_coding:video_coding_utility", | 521 "../modules/video_coding:video_coding_utility", |
458 "../modules/video_coding:webrtc_vp8", | 522 "../modules/video_coding:webrtc_vp8", |
459 "../p2p:p2p_test_utils", | 523 "../p2p:p2p_test_utils", |
460 "../system_wrappers:metrics_default", | 524 "../system_wrappers:metrics_default", |
461 "../test:audio_codec_mocks", | 525 "../test:audio_codec_mocks", |
462 "../test:test_support", | 526 "../test:test_support", |
463 "../voice_engine:voice_engine", | 527 "../voice_engine:voice_engine", |
464 ] | 528 ] |
465 } | 529 } |
466 } | 530 } |
OLD | NEW |