Chromium Code Reviews| 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 if (rtc_enable_protobuf) { | 225 if (rtc_enable_protobuf) { |
| 224 deps += [ "../modules/audio_processing/aec_dump:aec_dump_impl" ] | 226 deps += [ "../modules/audio_processing/aec_dump:aec_dump_impl" ] |
| 225 } else { | 227 } else { |
| 226 deps += [ "../modules/audio_processing/aec_dump:null_aec_dump_factory" ] | 228 deps += [ "../modules/audio_processing/aec_dump:null_aec_dump_factory" ] |
| 227 } | 229 } |
| 228 deps += [ | 230 deps += [ |
| 229 ":rtc_media_base", | 231 ":rtc_media_base_audio", |
| 232 ":rtc_media_base_data", | |
| 233 ":rtc_media_base_video", | |
| 234 "..:video_stream_api", | |
| 230 "..:webrtc_common", | 235 "..:webrtc_common", |
| 231 "../api:call_api", | 236 "../api:call_api", |
| 237 "../api:libjingle_peerconnection_api", | |
| 232 "../api:transport_api", | 238 "../api:transport_api", |
| 233 "../api:video_frame_api", | 239 "../api:video_frame_api", |
| 234 "../api/audio_codecs:audio_codecs_api", | 240 "../api/audio_codecs:audio_codecs_api", |
| 235 "../api/audio_codecs:builtin_audio_decoder_factory", | 241 "../api/audio_codecs:builtin_audio_decoder_factory", |
| 242 "../api/audio_codecs:builtin_audio_encoder_factory", | |
| 236 "../api/video_codecs:video_codecs_api", | 243 "../api/video_codecs:video_codecs_api", |
| 237 "../base:rtc_base", | 244 "../base:rtc_base", |
| 238 "../base:rtc_base_approved", | 245 "../base:rtc_base_approved", |
| 246 "../base:rtc_task_queue", | |
| 239 "../call", | 247 "../call", |
| 240 "../common_video:common_video", | 248 "../common_video:common_video", |
| 241 "../modules/audio_coding:rent_a_codec", | 249 "../modules/audio_coding:rent_a_codec", |
| 242 "../modules/audio_device:audio_device", | 250 "../modules/audio_device:audio_device", |
| 243 "../modules/audio_mixer:audio_mixer_impl", | 251 "../modules/audio_mixer:audio_mixer_impl", |
| 244 "../modules/audio_processing:audio_processing", | 252 "../modules/audio_processing:audio_processing", |
| 245 "../modules/audio_processing/aec_dump", | 253 "../modules/audio_processing/aec_dump", |
| 246 "../modules/video_capture:video_capture_module", | 254 "../modules/video_capture:video_capture_module", |
| 247 "../modules/video_coding", | 255 "../modules/video_coding", |
| 248 "../modules/video_coding:webrtc_h264", | 256 "../modules/video_coding:webrtc_h264", |
| 249 "../modules/video_coding:webrtc_vp8", | 257 "../modules/video_coding:webrtc_vp8", |
| 250 "../modules/video_coding:webrtc_vp9", | 258 "../modules/video_coding:webrtc_vp9", |
| 251 "../p2p:rtc_p2p", | 259 "../p2p:rtc_p2p", |
| 260 "../pc:rtc_pc_base", | |
| 252 "../system_wrappers", | 261 "../system_wrappers", |
| 253 "../video", | 262 "../video", |
| 254 "../voice_engine", | 263 "../voice_engine", |
| 255 ] | 264 ] |
| 256 } | 265 } |
| 257 | 266 |
| 267 rtc_static_library("rtc_data") { | |
| 268 defines = [] | |
| 269 deps = [] | |
| 270 | |
| 271 if (rtc_enable_sctp) { | |
| 272 sources = [ | |
| 273 "sctp/sctptransport.cc", | |
| 274 "sctp/sctptransport.h", | |
| 275 "sctp/sctptransportinternal.h", | |
| 276 ] | |
| 277 } | |
| 278 | |
| 279 configs += [ ":rtc_media_warnings_config" ] | |
| 280 | |
| 281 if (!build_with_chromium && is_clang) { | |
| 282 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
| 283 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
| 284 } | |
| 285 | |
| 286 if (is_win) { | |
| 287 cflags = [ | |
| 288 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. | |
| 289 "/wd4267", # conversion from "size_t" to "int", possible loss of data. | |
| 290 "/wd4389", # signed/unsigned mismatch. | |
| 291 ] | |
| 292 } | |
| 293 | |
| 294 if (rtc_enable_sctp && rtc_build_usrsctp) { | |
| 295 include_dirs = [ | |
| 296 # TODO(jiayl): move this into the public_configs of | |
| 297 # //third_party/usrsctp/BUILD.gn. | |
| 298 "//third_party/usrsctp/usrsctplib", | |
| 299 ] | |
| 300 deps += [ "//third_party/usrsctp" ] | |
| 301 } | |
| 302 | |
| 303 deps += [ | |
| 304 ":rtc_media_base_data", | |
| 305 "..:webrtc_common", | |
| 306 "../api:call_api", | |
| 307 "../api:transport_api", | |
| 308 "../base:rtc_base", | |
| 309 "../base:rtc_base_approved", | |
| 310 "../p2p:rtc_p2p", | |
| 311 "../system_wrappers", | |
| 312 ] | |
| 313 } | |
| 314 | |
| 315 rtc_source_set("rtc_media") { | |
|
kjellander_webrtc
2017/06/01 05:34:30
Can we keep rtc_static_library ?
See https://coder
Zhi Huang
2017/06/02 05:16:43
It seems that the rtc_static_library requires at l
kjellander_webrtc
2017/06/02 06:46:18
I remember hitting problems like this in the past
| |
| 316 public_deps = [ | |
| 317 ":rtc_audio_video", | |
| 318 ":rtc_data", | |
| 319 ] | |
| 320 } | |
| 321 | |
| 258 if (rtc_include_tests) { | 322 if (rtc_include_tests) { |
| 259 config("rtc_unittest_main_config") { | 323 config("rtc_unittest_main_config") { |
| 260 # GN orders flags on a target before flags from configs. The default config | 324 # 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 | 325 # 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. | 326 # come from a config and can"t be on the target directly. |
| 263 if (is_clang && is_ios) { | 327 if (is_clang && is_ios) { |
| 264 cflags = [ "-Wno-unused-variable" ] | 328 cflags = [ "-Wno-unused-variable" ] |
| 265 } | 329 } |
| 266 } | 330 } |
| 267 | 331 |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 463 "../modules/video_coding:video_coding_utility", | 527 "../modules/video_coding:video_coding_utility", |
| 464 "../modules/video_coding:webrtc_vp8", | 528 "../modules/video_coding:webrtc_vp8", |
| 465 "../p2p:p2p_test_utils", | 529 "../p2p:p2p_test_utils", |
| 466 "../system_wrappers:metrics_default", | 530 "../system_wrappers:metrics_default", |
| 467 "../test:audio_codec_mocks", | 531 "../test:audio_codec_mocks", |
| 468 "../test:test_support", | 532 "../test:test_support", |
| 469 "../voice_engine:voice_engine", | 533 "../voice_engine:voice_engine", |
| 470 ] | 534 ] |
| 471 } | 535 } |
| 472 } | 536 } |
| OLD | NEW |