OLD | NEW |
(Empty) | |
| 1 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
| 2 # |
| 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 |
| 5 # tree. An additional intellectual property rights grant can be found |
| 6 # in the file PATENTS. All contributing project authors may |
| 7 # be found in the AUTHORS file in the root of the source tree. |
| 8 |
| 9 import("//build/config/linux/pkg_config.gni") |
| 10 import("../build/webrtc.gni") |
| 11 |
| 12 group("media") { |
| 13 deps = [ |
| 14 ":rtc_media", |
| 15 ] |
| 16 } |
| 17 |
| 18 config("rtc_media_defines_config") { |
| 19 defines = [ |
| 20 "HAVE_WEBRTC_VIDEO", |
| 21 "HAVE_WEBRTC_VOICE", |
| 22 ] |
| 23 } |
| 24 |
| 25 config("rtc_media_warnings_config") { |
| 26 # GN orders flags on a target before flags from configs. The default config |
| 27 # adds these flags so to cancel them out they need to come from a config and |
| 28 # cannot be on the target directly. |
| 29 if (!is_win) { |
| 30 cflags = [ "-Wno-deprecated-declarations" ] |
| 31 cflags_cc = [ "-Wno-overloaded-virtual" ] |
| 32 } |
| 33 } |
| 34 |
| 35 if (is_linux && rtc_use_gtk) { |
| 36 pkg_config("gtk-lib") { |
| 37 packages = [ |
| 38 "gobject-2.0", |
| 39 "gthread-2.0", |
| 40 "gtk+-2.0", |
| 41 ] |
| 42 } |
| 43 } |
| 44 |
| 45 source_set("rtc_media") { |
| 46 defines = [] |
| 47 libs = [] |
| 48 deps = [] |
| 49 sources = [ |
| 50 "base/audiosource.h", |
| 51 "base/codec.cc", |
| 52 "base/codec.h", |
| 53 "base/cpuid.cc", |
| 54 "base/cpuid.h", |
| 55 "base/cryptoparams.h", |
| 56 "base/device.h", |
| 57 "base/fakescreencapturerfactory.h", |
| 58 "base/hybriddataengine.h", |
| 59 "base/mediachannel.h", |
| 60 "base/mediacommon.h", |
| 61 "base/mediaconstants.cc", |
| 62 "base/mediaconstants.h", |
| 63 "base/mediaengine.cc", |
| 64 "base/mediaengine.h", |
| 65 "base/rtpdataengine.cc", |
| 66 "base/rtpdataengine.h", |
| 67 "base/rtpdump.cc", |
| 68 "base/rtpdump.h", |
| 69 "base/rtputils.cc", |
| 70 "base/rtputils.h", |
| 71 "base/screencastid.h", |
| 72 "base/streamparams.cc", |
| 73 "base/streamparams.h", |
| 74 "base/turnutils.cc", |
| 75 "base/turnutils.h", |
| 76 "base/videoadapter.cc", |
| 77 "base/videoadapter.h", |
| 78 "base/videobroadcaster.cc", |
| 79 "base/videobroadcaster.h", |
| 80 "base/videocapturer.cc", |
| 81 "base/videocapturer.h", |
| 82 "base/videocapturerfactory.h", |
| 83 "base/videocommon.cc", |
| 84 "base/videocommon.h", |
| 85 "base/videoframe.cc", |
| 86 "base/videoframe.h", |
| 87 "base/videoframefactory.cc", |
| 88 "base/videoframefactory.h", |
| 89 "base/videorenderer.h", |
| 90 "base/videosourcebase.cc", |
| 91 "base/videosourcebase.h", |
| 92 "base/yuvframegenerator.cc", |
| 93 "base/yuvframegenerator.h", |
| 94 "devices/videorendererfactory.h", |
| 95 "engine/nullwebrtcvideoengine.h", |
| 96 "engine/simulcast.cc", |
| 97 "engine/simulcast.h", |
| 98 "engine/webrtccommon.h", |
| 99 "engine/webrtcmediaengine.cc", |
| 100 "engine/webrtcmediaengine.h", |
| 101 "engine/webrtcvideocapturer.cc", |
| 102 "engine/webrtcvideocapturer.h", |
| 103 "engine/webrtcvideocapturerfactory.cc", |
| 104 "engine/webrtcvideocapturerfactory.h", |
| 105 "engine/webrtcvideodecoderfactory.h", |
| 106 "engine/webrtcvideoencoderfactory.h", |
| 107 "engine/webrtcvideoengine2.cc", |
| 108 "engine/webrtcvideoengine2.h", |
| 109 "engine/webrtcvideoframe.cc", |
| 110 "engine/webrtcvideoframe.h", |
| 111 "engine/webrtcvideoframefactory.cc", |
| 112 "engine/webrtcvideoframefactory.h", |
| 113 "engine/webrtcvoe.h", |
| 114 "engine/webrtcvoiceengine.cc", |
| 115 "engine/webrtcvoiceengine.h", |
| 116 "sctp/sctpdataengine.cc", |
| 117 "sctp/sctpdataengine.h", |
| 118 ] |
| 119 |
| 120 configs += [ |
| 121 "..:common_config", |
| 122 ":rtc_media_warnings_config", |
| 123 ] |
| 124 |
| 125 public_configs = [ "..:common_inherited_config" ] |
| 126 |
| 127 if (is_clang) { |
| 128 # Suppress warnings from Chrome's Clang plugins. |
| 129 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 130 configs -= [ "//build/config/clang:extra_warnings" ] |
| 131 configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 132 } |
| 133 |
| 134 if (is_win) { |
| 135 cflags = [ |
| 136 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. |
| 137 "/wd4267", # conversion from "size_t" to "int", possible loss of data. |
| 138 "/wd4389", # signed/unsigned mismatch. |
| 139 ] |
| 140 } |
| 141 |
| 142 if (rtc_build_libyuv) { |
| 143 deps += [ "$rtc_libyuv_dir" ] |
| 144 public_deps = [ |
| 145 "$rtc_libyuv_dir", |
| 146 ] |
| 147 } else { |
| 148 # Need to add a directory normally exported by libyuv. |
| 149 include_dirs += [ "$rtc_libyuv_dir/include" ] |
| 150 } |
| 151 |
| 152 if (rtc_build_usrsctp) { |
| 153 include_dirs = [ |
| 154 # TODO(jiayl): move this into the public_configs of |
| 155 # //third_party/usrsctp/BUILD.gn. |
| 156 "//third_party/usrsctp/usrsctplib", |
| 157 ] |
| 158 deps += [ "//third_party/usrsctp" ] |
| 159 } |
| 160 |
| 161 if (build_with_chromium) { |
| 162 deps += [ "../modules:video_capture" ] |
| 163 } else { |
| 164 configs += [ ":rtc_media_defines_config" ] |
| 165 public_configs += [ ":rtc_media_defines_config" ] |
| 166 deps += [ "../modules/video_capture:video_capture_internal_impl" ] |
| 167 } |
| 168 if (is_linux && rtc_use_gtk) { |
| 169 sources += [ |
| 170 "devices/gtkvideorenderer.cc", |
| 171 "devices/gtkvideorenderer.h", |
| 172 ] |
| 173 public_configs += [ ":gtk-lib" ] |
| 174 } |
| 175 if (is_win) { |
| 176 sources += [ |
| 177 "devices/gdivideorenderer.cc", |
| 178 "devices/gdivideorenderer.h", |
| 179 ] |
| 180 libs += [ |
| 181 "d3d9.lib", |
| 182 "gdi32.lib", |
| 183 "strmiids.lib", |
| 184 ] |
| 185 } |
| 186 if (is_mac && current_cpu == "x86") { |
| 187 sources += [ |
| 188 "devices/carbonvideorenderer.cc", |
| 189 "devices/carbonvideorenderer.h", |
| 190 ] |
| 191 libs += [ "Carbon.framework" ] |
| 192 } |
| 193 if (is_ios || (is_mac && current_cpu != "x86")) { |
| 194 defines += [ "CARBON_DEPRECATED=YES" ] |
| 195 } |
| 196 |
| 197 deps += [ |
| 198 "..:webrtc_common", |
| 199 "../base:rtc_base_approved", |
| 200 "../libjingle/xmllite", |
| 201 "../libjingle/xmpp", |
| 202 "../p2p", |
| 203 "../system_wrappers", |
| 204 "../voice_engine", |
| 205 ] |
| 206 } |
OLD | NEW |