| 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") { |
| 27 # TODO(kjellander): Remove (bugs.webrtc.org/6828) | 36 # TODO(kjellander): Remove (bugs.webrtc.org/6828) |
| 28 # Enabling GN check triggers cyclic dependency error: | 37 # Enabling GN check triggers cyclic dependency error: |
| 29 # //webrtc/media:rtc_media_base -> | 38 # //webrtc/media:rtc_media_base -> |
| 30 # //webrtc/pc:rtc_pc -> | 39 # //webrtc/pc:rtc_pc_base -> |
| 31 # //webrtc/media:media -> | 40 # //webrtc/media:rtc_data -> |
| 32 # //webrtc/media:rtc_media_base | 41 # //webrtc/media:rtc_media_base |
| 33 check_includes = false | 42 check_includes = false |
| 34 defines = [] | 43 defines = [] |
| 35 libs = [] | 44 libs = [] |
| 36 deps = [] | 45 deps = [] |
| 37 sources = [ | 46 sources = [ |
| 38 "base/adaptedvideotracksource.cc", | 47 "base/adaptedvideotracksource.cc", |
| 39 "base/adaptedvideotracksource.h", | 48 "base/adaptedvideotracksource.h", |
| 40 "base/audiosource.h", | 49 "base/audiosource.h", |
| 41 "base/codec.cc", | 50 "base/codec.cc", |
| 42 "base/codec.h", | 51 "base/codec.h", |
| 43 "base/cryptoparams.h", | 52 "base/cryptoparams.h", |
| 44 "base/device.h", | 53 "base/device.h", |
| 54 "base/h264_profile_level_id.cc", |
| 55 "base/h264_profile_level_id.h", |
| 45 "base/mediachannel.h", | 56 "base/mediachannel.h", |
| 46 "base/mediaconstants.cc", | 57 "base/mediaconstants.cc", |
| 47 "base/mediaconstants.h", | 58 "base/mediaconstants.h", |
| 48 "base/mediaengine.cc", | 59 "base/mediaengine.cc", |
| 49 "base/mediaengine.h", | 60 "base/mediaengine.h", |
| 50 "base/rtpdataengine.cc", | 61 "base/rtpdataengine.cc", |
| 51 "base/rtpdataengine.h", | 62 "base/rtpdataengine.h", |
| 52 "base/rtputils.cc", | 63 "base/rtputils.cc", |
| 53 "base/rtputils.h", | 64 "base/rtputils.h", |
| 54 "base/streamparams.cc", | 65 "base/streamparams.cc", |
| (...skipping 25 matching lines...) Expand all Loading... |
| 80 "$rtc_libyuv_dir", | 91 "$rtc_libyuv_dir", |
| 81 ] | 92 ] |
| 82 } else { | 93 } else { |
| 83 # Need to add a directory normally exported by libyuv. | 94 # Need to add a directory normally exported by libyuv. |
| 84 include_dirs += [ "$rtc_libyuv_dir/include" ] | 95 include_dirs += [ "$rtc_libyuv_dir/include" ] |
| 85 } | 96 } |
| 86 | 97 |
| 87 deps += [ | 98 deps += [ |
| 88 "..:webrtc_common", | 99 "..:webrtc_common", |
| 89 "../api:libjingle_peerconnection_api", | 100 "../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", | 101 "../base:rtc_base", |
| 94 "../base:rtc_base_approved", | 102 "../base:rtc_base_approved", |
| 95 "../call:call_interfaces", | |
| 96 "../common_video:common_video", | |
| 97 "../p2p", | 103 "../p2p", |
| 98 ] | 104 ] |
| 99 | 105 |
| 100 if (is_nacl) { | 106 if (is_nacl) { |
| 101 deps += [ "//native_client_sdk/src/libraries/nacl_io" ] | 107 deps += [ "//native_client_sdk/src/libraries/nacl_io" ] |
| 102 } | 108 } |
| 103 } | 109 } |
| 104 | 110 |
| 105 rtc_static_library("rtc_media") { | 111 rtc_static_library("rtc_audio_video") { |
| 106 # TODO(kjellander): Remove (bugs.webrtc.org/6828) | |
| 107 # Enabling GN check triggers cyclic dependency error: | |
| 108 # //webrtc/media:media -> | |
| 109 # //webrtc/media:rtc_media -> | |
| 110 # //webrtc/pc:rtc_pc -> | |
| 111 # //webrtc/media:media | |
| 112 check_includes = false | |
| 113 defines = [] | 112 defines = [] |
| 114 libs = [] | 113 libs = [] |
| 115 deps = [] | 114 deps = [] |
| 116 sources = [ | 115 sources = [ |
| 117 "engine/adm_helpers.cc", | 116 "engine/adm_helpers.cc", |
| 118 "engine/adm_helpers.h", | 117 "engine/adm_helpers.h", |
| 119 "engine/apm_helpers.cc", | 118 "engine/apm_helpers.cc", |
| 120 "engine/apm_helpers.h", | 119 "engine/apm_helpers.h", |
| 121 "engine/internaldecoderfactory.cc", | 120 "engine/internaldecoderfactory.cc", |
| 122 "engine/internaldecoderfactory.h", | 121 "engine/internaldecoderfactory.h", |
| (...skipping 15 matching lines...) Expand all Loading... |
| 138 "engine/webrtcvideocapturer.h", | 137 "engine/webrtcvideocapturer.h", |
| 139 "engine/webrtcvideocapturerfactory.cc", | 138 "engine/webrtcvideocapturerfactory.cc", |
| 140 "engine/webrtcvideocapturerfactory.h", | 139 "engine/webrtcvideocapturerfactory.h", |
| 141 "engine/webrtcvideodecoderfactory.h", | 140 "engine/webrtcvideodecoderfactory.h", |
| 142 "engine/webrtcvideoencoderfactory.h", | 141 "engine/webrtcvideoencoderfactory.h", |
| 143 "engine/webrtcvideoengine.cc", | 142 "engine/webrtcvideoengine.cc", |
| 144 "engine/webrtcvideoengine.h", | 143 "engine/webrtcvideoengine.h", |
| 145 "engine/webrtcvoe.h", | 144 "engine/webrtcvoe.h", |
| 146 "engine/webrtcvoiceengine.cc", | 145 "engine/webrtcvoiceengine.cc", |
| 147 "engine/webrtcvoiceengine.h", | 146 "engine/webrtcvoiceengine.h", |
| 148 "sctp/sctptransportinternal.h", | |
| 149 ] | 147 ] |
| 150 | 148 |
| 151 if (rtc_enable_sctp) { | 149 configs += [ ":rtc_media_warnings_config" ] |
| 152 sources += [ | |
| 153 "sctp/sctptransport.cc", | |
| 154 "sctp/sctptransport.h", | |
| 155 ] | |
| 156 } | |
| 157 | 150 |
| 158 if (!build_with_chromium && is_clang) { | 151 if (!build_with_chromium && is_clang) { |
| 159 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 152 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 160 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 153 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 161 } | 154 } |
| 162 | 155 |
| 163 if (is_win) { | 156 if (is_win) { |
| 164 cflags = [ | 157 cflags = [ |
| 165 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. | 158 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. |
| 166 "/wd4267", # conversion from "size_t" to "int", possible loss of data. | 159 "/wd4267", # conversion from "size_t" to "int", possible loss of data. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 184 if (rtc_build_libyuv) { | 177 if (rtc_build_libyuv) { |
| 185 deps += [ "$rtc_libyuv_dir" ] | 178 deps += [ "$rtc_libyuv_dir" ] |
| 186 public_deps = [ | 179 public_deps = [ |
| 187 "$rtc_libyuv_dir", | 180 "$rtc_libyuv_dir", |
| 188 ] | 181 ] |
| 189 } else { | 182 } else { |
| 190 # Need to add a directory normally exported by libyuv. | 183 # Need to add a directory normally exported by libyuv. |
| 191 include_dirs += [ "$rtc_libyuv_dir/include" ] | 184 include_dirs += [ "$rtc_libyuv_dir/include" ] |
| 192 } | 185 } |
| 193 | 186 |
| 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 = [] | 187 public_configs = [] |
| 204 if (build_with_chromium) { | 188 if (build_with_chromium) { |
| 205 deps += [ "../modules/video_capture:video_capture" ] | 189 deps += [ "../modules/video_capture:video_capture" ] |
| 206 } else { | 190 } else { |
| 207 public_configs += [ ":rtc_media_defines_config" ] | 191 public_configs += [ ":rtc_media_defines_config" ] |
| 208 deps += [ "../modules/video_capture:video_capture_internal_impl" ] | 192 deps += [ "../modules/video_capture:video_capture_internal_impl" ] |
| 209 } | 193 } |
| 210 if (rtc_enable_protobuf) { | 194 if (rtc_enable_protobuf) { |
| 211 deps += [ "../modules/audio_processing/aec_dump:aec_dump_impl" ] | 195 deps += [ "../modules/audio_processing/aec_dump:aec_dump_impl" ] |
| 212 } else { | 196 } else { |
| 213 deps += [ "../modules/audio_processing/aec_dump:null_aec_dump_factory" ] | 197 deps += [ "../modules/audio_processing/aec_dump:null_aec_dump_factory" ] |
| 214 } | 198 } |
| 215 deps += [ | 199 deps += [ |
| 216 ":rtc_media_base", | 200 ":rtc_media_base", |
| 201 "..:video_stream_api", |
| 217 "..:webrtc_common", | 202 "..:webrtc_common", |
| 218 "../api:call_api", | 203 "../api:call_api", |
| 204 "../api:libjingle_peerconnection_api", |
| 219 "../api:transport_api", | 205 "../api:transport_api", |
| 220 "../api:video_frame_api", | 206 "../api:video_frame_api", |
| 221 "../api/audio_codecs:audio_codecs_api", | 207 "../api/audio_codecs:audio_codecs_api", |
| 222 "../api/audio_codecs:builtin_audio_decoder_factory", | 208 "../api/audio_codecs:builtin_audio_decoder_factory", |
| 209 "../api/audio_codecs:builtin_audio_encoder_factory", |
| 223 "../api/video_codecs:video_codecs_api", | 210 "../api/video_codecs:video_codecs_api", |
| 224 "../base:rtc_base", | 211 "../base:rtc_base", |
| 225 "../base:rtc_base_approved", | 212 "../base:rtc_base_approved", |
| 213 "../base:rtc_task_queue", |
| 226 "../call", | 214 "../call", |
| 227 "../common_video:common_video", | 215 "../common_video:common_video", |
| 228 "../modules/audio_coding:rent_a_codec", | 216 "../modules/audio_coding:rent_a_codec", |
| 229 "../modules/audio_device:audio_device", | 217 "../modules/audio_device:audio_device", |
| 230 "../modules/audio_mixer:audio_mixer_impl", | 218 "../modules/audio_mixer:audio_mixer_impl", |
| 231 "../modules/audio_processing:audio_processing", | 219 "../modules/audio_processing:audio_processing", |
| 232 "../modules/audio_processing/aec_dump", | 220 "../modules/audio_processing/aec_dump", |
| 233 "../modules/video_capture:video_capture_module", | 221 "../modules/video_capture:video_capture_module", |
| 234 "../modules/video_coding", | 222 "../modules/video_coding", |
| 235 "../modules/video_coding:webrtc_h264", | 223 "../modules/video_coding:webrtc_h264", |
| 236 "../modules/video_coding:webrtc_vp8", | 224 "../modules/video_coding:webrtc_vp8", |
| 237 "../modules/video_coding:webrtc_vp9", | 225 "../modules/video_coding:webrtc_vp9", |
| 238 "../p2p:rtc_p2p", | 226 "../p2p:rtc_p2p", |
| 227 "../pc:rtc_pc_base", |
| 239 "../system_wrappers", | 228 "../system_wrappers", |
| 240 "../video", | 229 "../video", |
| 241 "../voice_engine", | 230 "../voice_engine", |
| 242 ] | 231 ] |
| 243 } | 232 } |
| 244 | 233 |
| 234 rtc_static_library("rtc_data") { |
| 235 defines = [] |
| 236 deps = [] |
| 237 |
| 238 if (rtc_enable_sctp) { |
| 239 sources = [ |
| 240 "sctp/sctptransport.cc", |
| 241 "sctp/sctptransport.h", |
| 242 "sctp/sctptransportinternal.h", |
| 243 ] |
| 244 } |
| 245 |
| 246 configs += [ ":rtc_media_warnings_config" ] |
| 247 |
| 248 if (!build_with_chromium && is_clang) { |
| 249 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 250 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 251 } |
| 252 |
| 253 if (is_win) { |
| 254 cflags = [ |
| 255 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. |
| 256 "/wd4267", # conversion from "size_t" to "int", possible loss of data. |
| 257 "/wd4389", # signed/unsigned mismatch. |
| 258 ] |
| 259 } |
| 260 |
| 261 if (rtc_enable_sctp && rtc_build_usrsctp) { |
| 262 include_dirs = [ |
| 263 # TODO(jiayl): move this into the public_configs of |
| 264 # //third_party/usrsctp/BUILD.gn. |
| 265 "//third_party/usrsctp/usrsctplib", |
| 266 ] |
| 267 deps += [ "//third_party/usrsctp" ] |
| 268 } |
| 269 |
| 270 deps += [ |
| 271 ":rtc_media_base", |
| 272 "..:webrtc_common", |
| 273 "../api:call_api", |
| 274 "../api:transport_api", |
| 275 "../base:rtc_base", |
| 276 "../base:rtc_base_approved", |
| 277 "../p2p:rtc_p2p", |
| 278 "../system_wrappers", |
| 279 ] |
| 280 } |
| 281 |
| 282 rtc_source_set("rtc_media") { |
| 283 public_deps = [ |
| 284 ":rtc_audio_video", |
| 285 ":rtc_data", |
| 286 ] |
| 287 } |
| 288 |
| 245 if (rtc_include_tests) { | 289 if (rtc_include_tests) { |
| 246 config("rtc_unittest_main_config") { | 290 config("rtc_unittest_main_config") { |
| 247 # GN orders flags on a target before flags from configs. The default config | 291 # 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 | 292 # 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. | 293 # come from a config and can"t be on the target directly. |
| 250 if (is_clang && is_ios) { | 294 if (is_clang && is_ios) { |
| 251 cflags = [ "-Wno-unused-variable" ] | 295 cflags = [ "-Wno-unused-variable" ] |
| 252 } | 296 } |
| 253 } | 297 } |
| 254 | 298 |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 "../modules/video_coding:video_coding_utility", | 494 "../modules/video_coding:video_coding_utility", |
| 451 "../modules/video_coding:webrtc_vp8", | 495 "../modules/video_coding:webrtc_vp8", |
| 452 "../p2p:p2p_test_utils", | 496 "../p2p:p2p_test_utils", |
| 453 "../system_wrappers:metrics_default", | 497 "../system_wrappers:metrics_default", |
| 454 "../test:audio_codec_mocks", | 498 "../test:audio_codec_mocks", |
| 455 "../test:test_support", | 499 "../test:test_support", |
| 456 "../voice_engine:voice_engine", | 500 "../voice_engine:voice_engine", |
| 457 ] | 501 ] |
| 458 } | 502 } |
| 459 } | 503 } |
| OLD | NEW |