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", | |
the sun
2017/06/05 14:27:15
How is base/audiosource.h dependent on audio codec
Zhi Huang
2017/06/06 03:09:51
I'll remove this.
| |
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", | |
107 "../common_video:common_video", | |
108 "../p2p", | 125 "../p2p", |
109 ] | 126 ] |
110 | 127 |
111 if (is_nacl) { | 128 if (is_nacl) { |
112 deps += [ "//native_client_sdk/src/libraries/nacl_io" ] | 129 deps += [ "//native_client_sdk/src/libraries/nacl_io" ] |
113 } | 130 } |
114 } | 131 } |
115 | 132 |
116 rtc_static_library("rtc_media") { | 133 rtc_source_set("rtc_media_base") { |
117 # TODO(kjellander): Remove (bugs.webrtc.org/6828) | 134 public_deps = [ |
118 # Enabling GN check triggers cyclic dependency error: | 135 ":rtc_media_base_audio", |
119 # //webrtc/media:media -> | 136 ":rtc_media_base_data", |
120 # //webrtc/media:rtc_media -> | 137 ":rtc_media_base_video", |
121 # //webrtc/pc:rtc_pc -> | 138 ] |
122 # //webrtc/media:media | 139 } |
123 check_includes = false | 140 |
141 rtc_static_library("rtc_audio_video") { | |
124 defines = [] | 142 defines = [] |
125 libs = [] | 143 libs = [] |
126 deps = [] | 144 deps = [] |
127 sources = [ | 145 sources = [ |
128 "engine/adm_helpers.cc", | 146 "engine/adm_helpers.cc", |
129 "engine/adm_helpers.h", | 147 "engine/adm_helpers.h", |
130 "engine/apm_helpers.cc", | 148 "engine/apm_helpers.cc", |
131 "engine/apm_helpers.h", | 149 "engine/apm_helpers.h", |
132 "engine/internaldecoderfactory.cc", | 150 "engine/internaldecoderfactory.cc", |
133 "engine/internaldecoderfactory.h", | 151 "engine/internaldecoderfactory.h", |
(...skipping 15 matching lines...) Expand all Loading... | |
149 "engine/webrtcvideocapturer.h", | 167 "engine/webrtcvideocapturer.h", |
150 "engine/webrtcvideocapturerfactory.cc", | 168 "engine/webrtcvideocapturerfactory.cc", |
151 "engine/webrtcvideocapturerfactory.h", | 169 "engine/webrtcvideocapturerfactory.h", |
152 "engine/webrtcvideodecoderfactory.h", | 170 "engine/webrtcvideodecoderfactory.h", |
153 "engine/webrtcvideoencoderfactory.h", | 171 "engine/webrtcvideoencoderfactory.h", |
154 "engine/webrtcvideoengine2.cc", | 172 "engine/webrtcvideoengine2.cc", |
155 "engine/webrtcvideoengine2.h", | 173 "engine/webrtcvideoengine2.h", |
156 "engine/webrtcvoe.h", | 174 "engine/webrtcvoe.h", |
157 "engine/webrtcvoiceengine.cc", | 175 "engine/webrtcvoiceengine.cc", |
158 "engine/webrtcvoiceengine.h", | 176 "engine/webrtcvoiceengine.h", |
159 "sctp/sctptransportinternal.h", | |
160 ] | 177 ] |
161 | 178 |
162 if (rtc_enable_sctp) { | |
163 sources += [ | |
164 "sctp/sctptransport.cc", | |
165 "sctp/sctptransport.h", | |
166 ] | |
167 } | |
168 | |
169 configs += [ ":rtc_media_warnings_config" ] | 179 configs += [ ":rtc_media_warnings_config" ] |
170 | 180 |
171 if (!build_with_chromium && is_clang) { | 181 if (!build_with_chromium && is_clang) { |
172 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 182 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
173 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 183 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
174 } | 184 } |
175 | 185 |
176 if (is_win) { | 186 if (is_win) { |
177 cflags = [ | 187 cflags = [ |
178 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. | 188 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. |
(...skipping 18 matching lines...) Expand all Loading... | |
197 if (rtc_build_libyuv) { | 207 if (rtc_build_libyuv) { |
198 deps += [ "$rtc_libyuv_dir" ] | 208 deps += [ "$rtc_libyuv_dir" ] |
199 public_deps = [ | 209 public_deps = [ |
200 "$rtc_libyuv_dir", | 210 "$rtc_libyuv_dir", |
201 ] | 211 ] |
202 } else { | 212 } else { |
203 # Need to add a directory normally exported by libyuv. | 213 # Need to add a directory normally exported by libyuv. |
204 include_dirs += [ "$rtc_libyuv_dir/include" ] | 214 include_dirs += [ "$rtc_libyuv_dir/include" ] |
205 } | 215 } |
206 | 216 |
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 = [] | 217 public_configs = [] |
217 if (build_with_chromium) { | 218 if (build_with_chromium) { |
218 deps += [ "../modules/video_capture:video_capture" ] | 219 deps += [ "../modules/video_capture:video_capture" ] |
219 } else { | 220 } else { |
220 public_configs += [ ":rtc_media_defines_config" ] | 221 public_configs += [ ":rtc_media_defines_config" ] |
221 deps += [ "../modules/video_capture:video_capture_internal_impl" ] | 222 deps += [ "../modules/video_capture:video_capture_internal_impl" ] |
222 } | 223 } |
223 if (rtc_enable_protobuf) { | 224 if (rtc_enable_protobuf) { |
224 deps += [ "../modules/audio_processing/aec_dump:aec_dump_impl" ] | 225 deps += [ "../modules/audio_processing/aec_dump:aec_dump_impl" ] |
225 } else { | 226 } else { |
226 deps += [ "../modules/audio_processing/aec_dump:null_aec_dump_factory" ] | 227 deps += [ "../modules/audio_processing/aec_dump:null_aec_dump_factory" ] |
227 } | 228 } |
228 deps += [ | 229 deps += [ |
229 ":rtc_media_base", | 230 ":rtc_media_base_audio", |
231 ":rtc_media_base_data", | |
232 ":rtc_media_base_video", | |
233 "..:video_stream_api", | |
230 "..:webrtc_common", | 234 "..:webrtc_common", |
231 "../api:call_api", | 235 "../api:call_api", |
236 "../api:libjingle_peerconnection_api", | |
232 "../api:transport_api", | 237 "../api:transport_api", |
233 "../api:video_frame_api", | 238 "../api:video_frame_api", |
234 "../api/audio_codecs:audio_codecs_api", | 239 "../api/audio_codecs:audio_codecs_api", |
235 "../api/audio_codecs:builtin_audio_decoder_factory", | 240 "../api/audio_codecs:builtin_audio_decoder_factory", |
241 "../api/audio_codecs:builtin_audio_encoder_factory", | |
236 "../api/video_codecs:video_codecs_api", | 242 "../api/video_codecs:video_codecs_api", |
237 "../base:rtc_base", | 243 "../base:rtc_base", |
238 "../base:rtc_base_approved", | 244 "../base:rtc_base_approved", |
245 "../base:rtc_task_queue", | |
239 "../call", | 246 "../call", |
240 "../common_video:common_video", | 247 "../common_video:common_video", |
241 "../modules/audio_coding:rent_a_codec", | 248 "../modules/audio_coding:rent_a_codec", |
242 "../modules/audio_device:audio_device", | 249 "../modules/audio_device:audio_device", |
243 "../modules/audio_mixer:audio_mixer_impl", | 250 "../modules/audio_mixer:audio_mixer_impl", |
244 "../modules/audio_processing:audio_processing", | 251 "../modules/audio_processing:audio_processing", |
245 "../modules/audio_processing/aec_dump", | 252 "../modules/audio_processing/aec_dump", |
246 "../modules/video_capture:video_capture_module", | 253 "../modules/video_capture:video_capture_module", |
247 "../modules/video_coding", | 254 "../modules/video_coding", |
248 "../modules/video_coding:webrtc_h264", | 255 "../modules/video_coding:webrtc_h264", |
249 "../modules/video_coding:webrtc_vp8", | 256 "../modules/video_coding:webrtc_vp8", |
250 "../modules/video_coding:webrtc_vp9", | 257 "../modules/video_coding:webrtc_vp9", |
251 "../p2p:rtc_p2p", | 258 "../p2p:rtc_p2p", |
259 "../pc:rtc_pc_base", | |
252 "../system_wrappers", | 260 "../system_wrappers", |
253 "../video", | 261 "../video", |
254 "../voice_engine", | 262 "../voice_engine", |
255 ] | 263 ] |
256 } | 264 } |
257 | 265 |
266 rtc_static_library("rtc_data") { | |
267 defines = [] | |
268 deps = [] | |
269 | |
270 if (rtc_enable_sctp) { | |
271 sources = [ | |
272 "sctp/sctptransport.cc", | |
273 "sctp/sctptransport.h", | |
274 "sctp/sctptransportinternal.h", | |
275 ] | |
276 } | |
277 | |
278 configs += [ ":rtc_media_warnings_config" ] | |
279 | |
280 if (!build_with_chromium && is_clang) { | |
281 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
282 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
283 } | |
284 | |
285 if (is_win) { | |
286 cflags = [ | |
287 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. | |
288 "/wd4267", # conversion from "size_t" to "int", possible loss of data. | |
289 "/wd4389", # signed/unsigned mismatch. | |
290 ] | |
291 } | |
292 | |
293 if (rtc_enable_sctp && rtc_build_usrsctp) { | |
294 include_dirs = [ | |
295 # TODO(jiayl): move this into the public_configs of | |
296 # //third_party/usrsctp/BUILD.gn. | |
297 "//third_party/usrsctp/usrsctplib", | |
298 ] | |
299 deps += [ "//third_party/usrsctp" ] | |
300 } | |
301 | |
302 deps += [ | |
303 ":rtc_media_base_data", | |
304 "..:webrtc_common", | |
305 "../api:call_api", | |
306 "../api:transport_api", | |
307 "../base:rtc_base", | |
308 "../base:rtc_base_approved", | |
309 "../p2p:rtc_p2p", | |
310 "../system_wrappers", | |
311 ] | |
312 } | |
313 | |
314 rtc_source_set("rtc_media") { | |
315 public_deps = [ | |
316 ":rtc_audio_video", | |
317 ":rtc_data", | |
318 ] | |
319 } | |
320 | |
258 if (rtc_include_tests) { | 321 if (rtc_include_tests) { |
259 config("rtc_unittest_main_config") { | 322 config("rtc_unittest_main_config") { |
260 # GN orders flags on a target before flags from configs. The default config | 323 # GN orders flags on a target before flags from configs. The default config |
261 # adds -Wall, and this flag have to be after -Wall -- so they need to | 324 # adds -Wall, and this flag have to be after -Wall -- so they need to |
262 # come from a config and can"t be on the target directly. | 325 # come from a config and can"t be on the target directly. |
263 if (is_clang && is_ios) { | 326 if (is_clang && is_ios) { |
264 cflags = [ "-Wno-unused-variable" ] | 327 cflags = [ "-Wno-unused-variable" ] |
265 } | 328 } |
266 } | 329 } |
267 | 330 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
463 "../modules/video_coding:video_coding_utility", | 526 "../modules/video_coding:video_coding_utility", |
464 "../modules/video_coding:webrtc_vp8", | 527 "../modules/video_coding:webrtc_vp8", |
465 "../p2p:p2p_test_utils", | 528 "../p2p:p2p_test_utils", |
466 "../system_wrappers:metrics_default", | 529 "../system_wrappers:metrics_default", |
467 "../test:audio_codec_mocks", | 530 "../test:audio_codec_mocks", |
468 "../test:test_support", | 531 "../test:test_support", |
469 "../voice_engine:voice_engine", | 532 "../voice_engine:voice_engine", |
470 ] | 533 ] |
471 } | 534 } |
472 } | 535 } |
OLD | NEW |