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("../build/webrtc.gni") | 10 import("../build/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 ] | 16 ] |
16 } | 17 } |
17 | 18 |
18 config("rtc_media_defines_config") { | 19 config("rtc_media_defines_config") { |
19 defines = [ | 20 defines = [ |
20 "HAVE_WEBRTC_VIDEO", | 21 "HAVE_WEBRTC_VIDEO", |
21 "HAVE_WEBRTC_VOICE", | 22 "HAVE_WEBRTC_VOICE", |
22 ] | 23 ] |
23 } | 24 } |
24 | 25 |
25 config("rtc_media_warnings_config") { | 26 config("rtc_media_warnings_config") { |
26 # 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 |
27 # 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 |
28 # cannot be on the target directly. | 29 # cannot be on the target directly. |
29 if (!is_win) { | 30 if (!is_win) { |
30 cflags = [ "-Wno-deprecated-declarations" ] | 31 cflags = [ "-Wno-deprecated-declarations" ] |
31 } | 32 } |
32 } | 33 } |
33 | 34 |
34 if (is_linux && rtc_use_gtk) { | 35 if (is_linux && rtc_use_gtk) { |
35 pkg_config("gtk-lib") { | 36 pkg_config("gtk-lib") { |
36 packages = [ | 37 packages = [ |
37 "gobject-2.0", | 38 "gobject-2.0", |
38 "gthread-2.0", | 39 "gthread-2.0", |
39 "gtk+-2.0", | 40 "gtk+-2.0", |
40 ] | 41 ] |
41 } | 42 } |
42 } | 43 } |
43 | 44 |
44 rtc_static_library("rtc_media") { | 45 rtc_static_library("rtc_media_base") { |
45 defines = [] | 46 defines = [] |
46 libs = [] | 47 libs = [] |
47 deps = [] | 48 deps = [] |
48 sources = [ | 49 sources = [ |
49 "base/adaptedvideotracksource.cc", | 50 "base/adaptedvideotracksource.cc", |
50 "base/adaptedvideotracksource.h", | 51 "base/adaptedvideotracksource.h", |
51 "base/audiosource.h", | 52 "base/audiosource.h", |
52 "base/codec.cc", | 53 "base/codec.cc", |
53 "base/codec.h", | 54 "base/codec.h", |
54 "base/cryptoparams.h", | 55 "base/cryptoparams.h", |
(...skipping 19 matching lines...) Expand all Loading... |
74 "base/videobroadcaster.cc", | 75 "base/videobroadcaster.cc", |
75 "base/videobroadcaster.h", | 76 "base/videobroadcaster.h", |
76 "base/videocapturer.cc", | 77 "base/videocapturer.cc", |
77 "base/videocapturer.h", | 78 "base/videocapturer.h", |
78 "base/videocapturerfactory.h", | 79 "base/videocapturerfactory.h", |
79 "base/videocommon.cc", | 80 "base/videocommon.cc", |
80 "base/videocommon.h", | 81 "base/videocommon.h", |
81 "base/videoframe.h", | 82 "base/videoframe.h", |
82 "base/videosourcebase.cc", | 83 "base/videosourcebase.cc", |
83 "base/videosourcebase.h", | 84 "base/videosourcebase.h", |
| 85 ] |
| 86 |
| 87 configs += [ ":rtc_media_warnings_config" ] |
| 88 |
| 89 if (!build_with_chromium && is_clang) { |
| 90 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 91 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 92 } |
| 93 |
| 94 include_dirs = [] |
| 95 if (rtc_build_libyuv) { |
| 96 deps += [ "$rtc_libyuv_dir" ] |
| 97 public_deps = [ |
| 98 "$rtc_libyuv_dir", |
| 99 ] |
| 100 } else { |
| 101 # Need to add a directory normally exported by libyuv. |
| 102 include_dirs += [ "$rtc_libyuv_dir/include" ] |
| 103 } |
| 104 |
| 105 deps += [ |
| 106 "..:webrtc_common", |
| 107 "../base:rtc_base_approved", |
| 108 "../p2p", |
| 109 ] |
| 110 } |
| 111 |
| 112 rtc_static_library("rtc_media") { |
| 113 defines = [] |
| 114 libs = [] |
| 115 deps = [] |
| 116 sources = [ |
| 117 # TODO(magjed): Remove base header files once Chromium is updated. |
| 118 "base/adaptedvideotracksource.h", |
| 119 "base/audiosource.h", |
| 120 "base/codec.h", |
| 121 "base/cryptoparams.h", |
| 122 "base/device.h", |
| 123 "base/hybriddataengine.h", |
| 124 "base/mediachannel.h", |
| 125 "base/mediaconstants.h", |
| 126 "base/mediaengine.h", |
| 127 "base/rtpdataengine.h", |
| 128 "base/rtpdump.h", |
| 129 "base/rtputils.h", |
| 130 "base/streamparams.h", |
| 131 "base/turnutils.h", |
| 132 "base/videoadapter.h", |
| 133 "base/videobroadcaster.h", |
| 134 "base/videocapturer.h", |
| 135 "base/videocapturerfactory.h", |
| 136 "base/videocommon.h", |
| 137 "base/videoframe.h", |
| 138 "base/videosourcebase.h", |
84 "engine/internalencoderfactory.cc", | 139 "engine/internalencoderfactory.cc", |
85 "engine/internalencoderfactory.h", | 140 "engine/internalencoderfactory.h", |
86 "engine/nullwebrtcvideoengine.h", | 141 "engine/nullwebrtcvideoengine.h", |
87 "engine/payload_type_mapper.cc", | 142 "engine/payload_type_mapper.cc", |
88 "engine/payload_type_mapper.h", | 143 "engine/payload_type_mapper.h", |
89 "engine/simulcast.cc", | 144 "engine/simulcast.cc", |
90 "engine/simulcast.h", | 145 "engine/simulcast.h", |
91 "engine/videodecodersoftwarefallbackwrapper.cc", | 146 "engine/videodecodersoftwarefallbackwrapper.cc", |
92 "engine/videodecodersoftwarefallbackwrapper.h", | 147 "engine/videodecodersoftwarefallbackwrapper.h", |
93 "engine/videoencodersoftwarefallbackwrapper.cc", | 148 "engine/videoencodersoftwarefallbackwrapper.cc", |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 deps += [ "../modules/video_capture:video_capture_internal_impl" ] | 216 deps += [ "../modules/video_capture:video_capture_internal_impl" ] |
162 } | 217 } |
163 if (is_linux && rtc_use_gtk) { | 218 if (is_linux && rtc_use_gtk) { |
164 sources += [ | 219 sources += [ |
165 "devices/gtkvideorenderer.cc", | 220 "devices/gtkvideorenderer.cc", |
166 "devices/gtkvideorenderer.h", | 221 "devices/gtkvideorenderer.h", |
167 ] | 222 ] |
168 public_configs += [ ":gtk-lib" ] | 223 public_configs += [ ":gtk-lib" ] |
169 } | 224 } |
170 deps += [ | 225 deps += [ |
| 226 ":rtc_media_base", |
171 "..:webrtc_common", | 227 "..:webrtc_common", |
172 "../api:call_api", | 228 "../api:call_api", |
173 "../base:rtc_base_approved", | 229 "../base:rtc_base_approved", |
174 "../call", | 230 "../call", |
175 "../modules/audio_mixer:audio_mixer_impl", | 231 "../modules/audio_mixer:audio_mixer_impl", |
176 "../modules/video_coding", | 232 "../modules/video_coding", |
177 "../p2p", | |
178 "../system_wrappers", | 233 "../system_wrappers", |
179 "../video", | |
180 "../voice_engine", | 234 "../voice_engine", |
181 ] | 235 ] |
182 } | 236 } |
183 | 237 |
184 if (rtc_include_tests) { | 238 if (rtc_include_tests) { |
185 config("rtc_unittest_main_config") { | 239 config("rtc_unittest_main_config") { |
186 # GN orders flags on a target before flags from configs. The default config | 240 # GN orders flags on a target before flags from configs. The default config |
187 # adds -Wall, and this flag have to be after -Wall -- so they need to | 241 # adds -Wall, and this flag have to be after -Wall -- so they need to |
188 # come from a config and can"t be on the target directly. | 242 # come from a config and can"t be on the target directly. |
189 if (is_clang && is_ios) { | 243 if (is_clang && is_ios) { |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 # TODO(kjellander): Move as part of work in bugs.webrtc.org/4243. | 396 # TODO(kjellander): Move as part of work in bugs.webrtc.org/4243. |
343 ":rtc_media", | 397 ":rtc_media", |
344 ":rtc_unittest_main", | 398 ":rtc_unittest_main", |
345 "../audio", | 399 "../audio", |
346 "../base:rtc_base_tests_utils", | 400 "../base:rtc_base_tests_utils", |
347 "../modules/audio_device:mock_audio_device", | 401 "../modules/audio_device:mock_audio_device", |
348 "../system_wrappers:metrics_default", | 402 "../system_wrappers:metrics_default", |
349 ] | 403 ] |
350 } | 404 } |
351 } | 405 } |
OLD | NEW |