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") |
11 | 11 |
12 group("media") { | 12 group("media") { |
13 public_deps = [ | 13 public_deps = [ |
14 ":rtc_media", | 14 ":rtc_media", |
15 ":rtc_media_base", | 15 ":rtc_media_base", |
16 ] | 16 ] |
17 } | 17 } |
18 | 18 |
19 config("rtc_media_defines_config") { | 19 config("rtc_media_defines_config") { |
20 defines = [ | 20 defines = [ |
21 "HAVE_WEBRTC_VIDEO", | 21 "HAVE_WEBRTC_VIDEO", |
22 "HAVE_WEBRTC_VOICE", | 22 "HAVE_WEBRTC_VOICE", |
23 ] | 23 ] |
24 } | 24 } |
25 | 25 |
26 rtc_static_library("rtc_media_base") { | 26 config("rtc_media_warnings_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 | |
29 # cannot be on the target directly. | |
30 if (!is_win) { | |
31 cflags = [ "-Wno-deprecated-declarations" ] | |
32 } | |
33 } | |
34 | |
35 rtc_source_set("rtc_media_base_audio") { | |
36 sources = [ | |
37 "base/audiosource.h", | |
38 ] | |
39 } | |
40 | |
41 rtc_source_set("rtc_media_base_video") { | |
42 deps = [ | |
43 "../api:video_frame_api", | |
44 "../common_video:common_video", | |
45 ] | |
46 } | |
47 | |
48 # This target is used to build WebRTC without audio and video support but it | |
49 # contains more than just datachannel related classes. | |
50 # TODO(zhihuang): Split this target further into a target containing only | |
51 # datachannel related classes and a target containing common classes for media | |
52 # base. | |
53 rtc_source_set("rtc_media_base_data") { | |
27 # TODO(kjellander): Remove (bugs.webrtc.org/6828) | 54 # TODO(kjellander): Remove (bugs.webrtc.org/6828) |
28 # Enabling GN check triggers cyclic dependency error: | 55 # Enabling GN check triggers cyclic dependency error: |
29 # //webrtc/media:rtc_media_base -> | 56 # //webrtc/media:rtc_media_base_data -> |
30 # //webrtc/pc:rtc_pc -> | 57 # //webrtc/pc:rtc_pc_base -> |
31 # //webrtc/media:media -> | 58 # //webrtc/media:rtc_data -> |
32 # //webrtc/media:rtc_media_base | 59 # //webrtc/media:rtc_media_base_data |
33 check_includes = false | 60 check_includes = false |
34 defines = [] | 61 defines = [] |
35 libs = [] | 62 libs = [] |
36 deps = [] | 63 deps = [] |
37 sources = [ | 64 sources = [ |
38 "base/adaptedvideotracksource.cc", | 65 "base/adaptedvideotracksource.cc", |
39 "base/adaptedvideotracksource.h", | 66 "base/adaptedvideotracksource.h", |
40 "base/audiosource.h", | |
41 "base/codec.cc", | 67 "base/codec.cc", |
42 "base/codec.h", | 68 "base/codec.h", |
43 "base/cryptoparams.h", | 69 "base/cryptoparams.h", |
44 "base/device.h", | 70 "base/device.h", |
71 "base/h264_profile_level_id.cc", | |
72 "base/h264_profile_level_id.h", | |
45 "base/mediachannel.h", | 73 "base/mediachannel.h", |
46 "base/mediaconstants.cc", | 74 "base/mediaconstants.cc", |
47 "base/mediaconstants.h", | 75 "base/mediaconstants.h", |
48 "base/mediaengine.cc", | 76 "base/mediaengine.cc", |
49 "base/mediaengine.h", | 77 "base/mediaengine.h", |
50 "base/rtpdataengine.cc", | 78 "base/rtpdataengine.cc", |
51 "base/rtpdataengine.h", | 79 "base/rtpdataengine.h", |
52 "base/rtputils.cc", | 80 "base/rtputils.cc", |
53 "base/rtputils.h", | 81 "base/rtputils.h", |
54 "base/streamparams.cc", | 82 "base/streamparams.cc", |
(...skipping 25 matching lines...) Expand all Loading... | |
80 "$rtc_libyuv_dir", | 108 "$rtc_libyuv_dir", |
81 ] | 109 ] |
82 } else { | 110 } else { |
83 # Need to add a directory normally exported by libyuv. | 111 # Need to add a directory normally exported by libyuv. |
84 include_dirs += [ "$rtc_libyuv_dir/include" ] | 112 include_dirs += [ "$rtc_libyuv_dir/include" ] |
85 } | 113 } |
86 | 114 |
87 deps += [ | 115 deps += [ |
88 "..:webrtc_common", | 116 "..:webrtc_common", |
89 "../api:libjingle_peerconnection_api", | 117 "../api:libjingle_peerconnection_api", |
90 "../api:video_frame_api", | |
91 "../api/audio_codecs:audio_codecs_api", | |
92 "../api/audio_codecs:builtin_audio_encoder_factory", | |
93 "../base:rtc_base", | 118 "../base:rtc_base", |
94 "../base:rtc_base_approved", | 119 "../base:rtc_base_approved", |
95 "../call:call_interfaces", | |
96 "../common_video:common_video", | |
97 "../p2p", | 120 "../p2p", |
98 ] | 121 ] |
99 | 122 |
100 if (is_nacl) { | 123 if (is_nacl) { |
101 deps += [ "//native_client_sdk/src/libraries/nacl_io" ] | 124 deps += [ "//native_client_sdk/src/libraries/nacl_io" ] |
102 } | 125 } |
103 } | 126 } |
104 | 127 |
105 rtc_static_library("rtc_media") { | 128 rtc_source_set("rtc_media_base") { |
106 # TODO(kjellander): Remove (bugs.webrtc.org/6828) | 129 public_deps = [ |
107 # Enabling GN check triggers cyclic dependency error: | 130 ":rtc_media_base_audio", |
108 # //webrtc/media:media -> | 131 ":rtc_media_base_data", |
109 # //webrtc/media:rtc_media -> | 132 ":rtc_media_base_video", |
110 # //webrtc/pc:rtc_pc -> | 133 ] |
111 # //webrtc/media:media | 134 } |
112 check_includes = false | 135 |
136 rtc_static_library("rtc_audio_video") { | |
113 defines = [] | 137 defines = [] |
114 libs = [] | 138 libs = [] |
115 deps = [] | 139 deps = [] |
116 sources = [ | 140 sources = [ |
117 "engine/adm_helpers.cc", | 141 "engine/adm_helpers.cc", |
118 "engine/adm_helpers.h", | 142 "engine/adm_helpers.h", |
119 "engine/apm_helpers.cc", | 143 "engine/apm_helpers.cc", |
120 "engine/apm_helpers.h", | 144 "engine/apm_helpers.h", |
121 "engine/internaldecoderfactory.cc", | 145 "engine/internaldecoderfactory.cc", |
122 "engine/internaldecoderfactory.h", | 146 "engine/internaldecoderfactory.h", |
(...skipping 15 matching lines...) Expand all Loading... | |
138 "engine/webrtcvideocapturer.h", | 162 "engine/webrtcvideocapturer.h", |
139 "engine/webrtcvideocapturerfactory.cc", | 163 "engine/webrtcvideocapturerfactory.cc", |
140 "engine/webrtcvideocapturerfactory.h", | 164 "engine/webrtcvideocapturerfactory.h", |
141 "engine/webrtcvideodecoderfactory.h", | 165 "engine/webrtcvideodecoderfactory.h", |
142 "engine/webrtcvideoencoderfactory.h", | 166 "engine/webrtcvideoencoderfactory.h", |
143 "engine/webrtcvideoengine.cc", | 167 "engine/webrtcvideoengine.cc", |
144 "engine/webrtcvideoengine.h", | 168 "engine/webrtcvideoengine.h", |
145 "engine/webrtcvoe.h", | 169 "engine/webrtcvoe.h", |
146 "engine/webrtcvoiceengine.cc", | 170 "engine/webrtcvoiceengine.cc", |
147 "engine/webrtcvoiceengine.h", | 171 "engine/webrtcvoiceengine.h", |
148 "sctp/sctptransportinternal.h", | |
149 ] | 172 ] |
150 | 173 |
151 if (rtc_enable_sctp) { | 174 configs += [ ":rtc_media_warnings_config" ] |
152 sources += [ | |
153 "sctp/sctptransport.cc", | |
154 "sctp/sctptransport.h", | |
155 ] | |
156 } | |
157 | 175 |
158 if (!build_with_chromium && is_clang) { | 176 if (!build_with_chromium && is_clang) { |
159 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 177 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
160 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 178 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
161 } | 179 } |
162 | 180 |
163 if (is_win) { | 181 if (is_win) { |
164 cflags = [ | 182 cflags = [ |
165 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. | 183 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. |
166 "/wd4267", # conversion from "size_t" to "int", possible loss of data. | 184 "/wd4267", # conversion from "size_t" to "int", possible loss of data. |
(...skipping 17 matching lines...) Expand all Loading... | |
184 if (rtc_build_libyuv) { | 202 if (rtc_build_libyuv) { |
185 deps += [ "$rtc_libyuv_dir" ] | 203 deps += [ "$rtc_libyuv_dir" ] |
186 public_deps = [ | 204 public_deps = [ |
187 "$rtc_libyuv_dir", | 205 "$rtc_libyuv_dir", |
188 ] | 206 ] |
189 } else { | 207 } else { |
190 # Need to add a directory normally exported by libyuv. | 208 # Need to add a directory normally exported by libyuv. |
191 include_dirs += [ "$rtc_libyuv_dir/include" ] | 209 include_dirs += [ "$rtc_libyuv_dir/include" ] |
192 } | 210 } |
193 | 211 |
194 if (rtc_enable_sctp && rtc_build_usrsctp) { | |
195 include_dirs += [ | |
196 # TODO(jiayl): move this into the public_configs of | |
197 # //third_party/usrsctp/BUILD.gn. | |
198 "//third_party/usrsctp/usrsctplib", | |
199 ] | |
200 deps += [ "//third_party/usrsctp" ] | |
201 } | |
202 | |
203 public_configs = [] | 212 public_configs = [] |
204 if (build_with_chromium) { | 213 if (build_with_chromium) { |
205 deps += [ "../modules/video_capture:video_capture" ] | 214 deps += [ "../modules/video_capture:video_capture" ] |
206 } else { | 215 } else { |
207 public_configs += [ ":rtc_media_defines_config" ] | 216 public_configs += [ ":rtc_media_defines_config" ] |
208 deps += [ "../modules/video_capture:video_capture_internal_impl" ] | 217 deps += [ "../modules/video_capture:video_capture_internal_impl" ] |
209 } | 218 } |
210 if (rtc_enable_protobuf) { | 219 if (rtc_enable_protobuf) { |
211 deps += [ "../modules/audio_processing/aec_dump:aec_dump_impl" ] | 220 deps += [ "../modules/audio_processing/aec_dump:aec_dump_impl" ] |
212 } else { | 221 } else { |
213 deps += [ "../modules/audio_processing/aec_dump:null_aec_dump_factory" ] | 222 deps += [ "../modules/audio_processing/aec_dump:null_aec_dump_factory" ] |
214 } | 223 } |
215 deps += [ | 224 deps += [ |
216 ":rtc_media_base", | 225 ":rtc_media_base_audio", |
226 ":rtc_media_base_data", | |
227 ":rtc_media_base_video", | |
228 "..:video_stream_api", | |
217 "..:webrtc_common", | 229 "..:webrtc_common", |
218 "../api:call_api", | 230 "../api:call_api", |
231 "../api:libjingle_peerconnection_api", | |
219 "../api:transport_api", | 232 "../api:transport_api", |
220 "../api:video_frame_api", | 233 "../api:video_frame_api", |
221 "../api/audio_codecs:audio_codecs_api", | 234 "../api/audio_codecs:audio_codecs_api", |
222 "../api/audio_codecs:builtin_audio_decoder_factory", | 235 "../api/audio_codecs:builtin_audio_decoder_factory", |
236 "../api/audio_codecs:builtin_audio_encoder_factory", | |
223 "../api/video_codecs:video_codecs_api", | 237 "../api/video_codecs:video_codecs_api", |
224 "../base:rtc_base", | 238 "../base:rtc_base", |
225 "../base:rtc_base_approved", | 239 "../base:rtc_base_approved", |
240 "../base:rtc_task_queue", | |
226 "../call", | 241 "../call", |
227 "../common_video:common_video", | 242 "../common_video:common_video", |
228 "../modules/audio_coding:rent_a_codec", | 243 "../modules/audio_coding:rent_a_codec", |
229 "../modules/audio_device:audio_device", | 244 "../modules/audio_device:audio_device", |
230 "../modules/audio_mixer:audio_mixer_impl", | 245 "../modules/audio_mixer:audio_mixer_impl", |
231 "../modules/audio_processing:audio_processing", | 246 "../modules/audio_processing:audio_processing", |
232 "../modules/audio_processing/aec_dump", | 247 "../modules/audio_processing/aec_dump", |
233 "../modules/video_capture:video_capture_module", | 248 "../modules/video_capture:video_capture_module", |
234 "../modules/video_coding", | 249 "../modules/video_coding", |
235 "../modules/video_coding:webrtc_h264", | 250 "../modules/video_coding:webrtc_h264", |
236 "../modules/video_coding:webrtc_vp8", | 251 "../modules/video_coding:webrtc_vp8", |
237 "../modules/video_coding:webrtc_vp9", | 252 "../modules/video_coding:webrtc_vp9", |
238 "../p2p:rtc_p2p", | 253 "../p2p:rtc_p2p", |
254 "../pc:rtc_pc_base", | |
239 "../system_wrappers", | 255 "../system_wrappers", |
240 "../video", | 256 "../video", |
241 "../voice_engine", | 257 "../voice_engine", |
242 ] | 258 ] |
243 } | 259 } |
244 | 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 | |
Taylor Brandstetter
2017/06/14 01:54:16
Given the current approach of this CL, some of the
Zhi Huang
2017/06/14 06:57:01
Done. Now we only have rtc_media_base.
| |
245 if (rtc_include_tests) { | 316 if (rtc_include_tests) { |
246 config("rtc_unittest_main_config") { | 317 config("rtc_unittest_main_config") { |
247 # 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 |
248 # 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 |
249 # 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. |
250 if (is_clang && is_ios) { | 321 if (is_clang && is_ios) { |
251 cflags = [ "-Wno-unused-variable" ] | 322 cflags = [ "-Wno-unused-variable" ] |
252 } | 323 } |
253 } | 324 } |
254 | 325 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
450 "../modules/video_coding:video_coding_utility", | 521 "../modules/video_coding:video_coding_utility", |
451 "../modules/video_coding:webrtc_vp8", | 522 "../modules/video_coding:webrtc_vp8", |
452 "../p2p:p2p_test_utils", | 523 "../p2p:p2p_test_utils", |
453 "../system_wrappers:metrics_default", | 524 "../system_wrappers:metrics_default", |
454 "../test:audio_codec_mocks", | 525 "../test:audio_codec_mocks", |
455 "../test:test_support", | 526 "../test:test_support", |
456 "../voice_engine:voice_engine", | 527 "../voice_engine:voice_engine", |
457 ] | 528 ] |
458 } | 529 } |
459 } | 530 } |
OLD | NEW |