blob: 8cb4849a47487ea9b7215a9ba6f58749d9e4e03b [file] [log] [blame]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +02001# 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
mbonadei9aa3f0a2017-01-24 06:58:22 -08009import("../webrtc.gni")
Qiang Chen43fb9122017-12-20 10:47:36 -080010
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020011if (is_android) {
12 import("//build/config/android/config.gni")
13 import("//build/config/android/rules.gni")
tkchin2ddfdba2016-08-07 21:37:45 -070014} else if (is_mac) {
15 import("//build/config/mac/rules.gni")
16} else if (is_ios) {
17 import("//build/config/ios/rules.gni")
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020018}
19
20group("examples") {
kjellander6ceab082016-10-28 05:44:03 -070021 # This target shall build all targets in examples.
22 testonly = true
Mirko Bonadei1a339c32017-12-14 13:06:10 +010023 deps = []
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020024
tkchin2ddfdba2016-08-07 21:37:45 -070025 if (is_android) {
Mirko Bonadei1a339c32017-12-14 13:06:10 +010026 deps += [
kjellander6ceab082016-10-28 05:44:03 -070027 ":AppRTCMobile",
Sami Kalliomäkid54f5f52018-08-03 13:23:05 +020028 ":AppRTCMobile_stubbed_video_io_test_apk",
29 ":AppRTCMobile_test_apk",
George Zhou2770c3d2018-03-07 09:58:54 -080030 ":libwebrtc_unity",
kjellander6ceab082016-10-28 05:44:03 -070031 ]
Sami Kalliomäki3e77afd2018-03-08 16:43:16 +010032
33 # TODO(sakal): We include some code from the tests. Remove this dependency
34 # and remove this if-clause.
35 if (rtc_include_tests) {
36 deps += [ "androidnativeapi:androidnativeapi" ]
37 }
kjellander6ceab082016-10-28 05:44:03 -070038 }
39
charujainaca3a242016-11-01 03:09:15 -070040 if (!build_with_chromium) {
Mirko Bonadei1a339c32017-12-14 13:06:10 +010041 deps += [ ":stun_prober" ]
charujainaca3a242016-11-01 03:09:15 -070042 }
43
kjellander6ceab082016-10-28 05:44:03 -070044 if (is_ios || (is_mac && target_cpu != "x86")) {
Mirko Bonadei1a339c32017-12-14 13:06:10 +010045 deps += [ ":AppRTCMobile" ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020046 }
kjellander6ceab082016-10-28 05:44:03 -070047
48 if (is_linux || is_win) {
Mirko Bonadei1a339c32017-12-14 13:06:10 +010049 deps += [
kthelgason0727f152016-08-08 09:03:23 -070050 ":peerconnection_server",
51 ":relayserver",
52 ":stunserver",
53 ":turnserver",
54 ]
Robin Raymondce1b1402018-11-22 20:10:11 -050055 if (current_os != "winuwp") {
56 deps += [ ":peerconnection_client" ]
57 }
kthelgason0727f152016-08-08 09:03:23 -070058 }
George Zhou2770c3d2018-03-07 09:58:54 -080059
60 if (is_android || is_win) {
61 deps += [ ":webrtc_unity_plugin" ]
62 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020063}
64
Niels Möller9862c2e2018-10-30 12:20:03 +010065rtc_source_set("read_auth_file") {
66 testonly = true
67 sources = [
68 "turnserver/read_auth_file.cc",
69 "turnserver/read_auth_file.h",
70 ]
71 deps = [
72 "../rtc_base:rtc_base",
73 ]
74}
75
76if (rtc_include_tests) {
77 rtc_test("examples_unittests") {
78 testonly = true
79 sources = [
80 "turnserver/read_auth_file_unittest.cc",
81 ]
82 deps = [
83 ":read_auth_file",
84 "../test:test_main",
85 "//test:test_support",
86 "//testing/gtest",
87 ]
88 }
89}
90
tkchin2ddfdba2016-08-07 21:37:45 -070091if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +000092 rtc_android_apk("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -080093 testonly = true
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020094 apk_name = "AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020095 android_manifest = "androidapp/AndroidManifest.xml"
96
97 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020098 ":AppRTCMobile_javalib",
99 ":AppRTCMobile_resources",
jianjun.zhuc0247402017-07-11 06:20:45 -0700100 "../rtc_base:base_java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200101 ]
102
jianjun.zhuc0247402017-07-11 06:20:45 -0700103 shared_libraries = [ "../sdk/android:libjingle_peerconnection_so" ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200104 }
105
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000106 rtc_android_library("AppRTCMobile_javalib") {
kjellander1993b1d2017-03-06 00:29:21 -0800107 testonly = true
Mirko Bonadei4f024ef2018-01-04 13:12:03 +0100108 android_manifest_for_lint = "androidapp/AndroidManifest.xml"
sakal07a050f2017-02-13 05:58:27 -0800109
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200110 java_files = [
111 "androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java",
henrikac3c2f312016-12-14 07:36:56 -0800112 "androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200113 "androidapp/src/org/appspot/apprtc/AppRTCClient.java",
114 "androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java",
115 "androidapp/src/org/appspot/apprtc/CallActivity.java",
116 "androidapp/src/org/appspot/apprtc/CallFragment.java",
117 "androidapp/src/org/appspot/apprtc/CaptureQualityController.java",
118 "androidapp/src/org/appspot/apprtc/ConnectActivity.java",
119 "androidapp/src/org/appspot/apprtc/CpuMonitor.java",
120 "androidapp/src/org/appspot/apprtc/DirectRTCClient.java",
121 "androidapp/src/org/appspot/apprtc/HudFragment.java",
122 "androidapp/src/org/appspot/apprtc/PeerConnectionClient.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200123 "androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java",
Qingsi Wanga4e72b72018-02-12 10:34:18 -0800124 "androidapp/src/org/appspot/apprtc/RtcEventLog.java",
henrika5641fbb2018-02-21 14:12:53 +0100125 "androidapp/src/org/appspot/apprtc/RecordedAudioToFileController.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200126 "androidapp/src/org/appspot/apprtc/SettingsActivity.java",
127 "androidapp/src/org/appspot/apprtc/SettingsFragment.java",
128 "androidapp/src/org/appspot/apprtc/TCPChannelClient.java",
129 "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java",
130 "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java",
131 "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java",
132 "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java",
133 "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200134 ]
135
136 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200137 ":AppRTCMobile_resources",
jianjun.zhuc0247402017-07-11 06:20:45 -0700138 "../rtc_base:base_java",
Sami Kalliomäki7d8f5942018-04-23 15:07:34 +0200139 "../sdk/android:audio_api_java",
Sami Kalliomäki725c1062018-03-28 10:49:18 +0200140 "../sdk/android:base_java",
Sami Kalliomäki1641ca32018-04-04 15:59:31 +0200141 "../sdk/android:camera_java",
Anders Carlsson1e06d882018-07-10 09:33:30 +0200142 "../sdk/android:default_video_codec_factory_java",
Sami Kalliomäki1641ca32018-04-04 15:59:31 +0200143 "../sdk/android:filevideo_java",
Sami Kalliomäki725c1062018-03-28 10:49:18 +0200144 "../sdk/android:hwcodecs_java",
Sami Kalliomäki7d8f5942018-04-23 15:07:34 +0200145 "../sdk/android:java_audio_device_module_java",
jianjun.zhuc0247402017-07-11 06:20:45 -0700146 "../sdk/android:libjingle_peerconnection_java",
147 "../sdk/android:libjingle_peerconnection_metrics_default_java",
Sami Kalliomäki1641ca32018-04-04 15:59:31 +0200148 "../sdk/android:peerconnection_java",
149 "../sdk/android:screencapturer_java",
150 "../sdk/android:surfaceviewrenderer_java",
Sami Kalliomäki725c1062018-03-28 10:49:18 +0200151 "../sdk/android:swcodecs_java",
Sami Kalliomäki1641ca32018-04-04 15:59:31 +0200152 "../sdk/android:video_api_java",
Sami Kalliomäki903bd412018-07-24 10:53:28 +0200153 "../sdk/android:video_java",
jianjun.zhuc0247402017-07-11 06:20:45 -0700154 "androidapp/third_party/autobanh:autobanh_java",
Artem Titarenko69540f42018-12-10 12:30:46 +0100155 "//third_party/android_deps:android_support_annotations_java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200156 ]
157 }
158
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200159 android_resources("AppRTCMobile_resources") {
kjellander1993b1d2017-03-06 00:29:21 -0800160 testonly = true
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200161 resource_dirs = [ "androidapp/res" ]
162 custom_package = "org.appspot.apprtc"
163 }
164
Sami Kalliomäkid54f5f52018-08-03 13:23:05 +0200165 rtc_instrumentation_test_apk("AppRTCMobile_test_apk") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200166 apk_name = "AppRTCMobileTest"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200167 android_manifest = "androidtests/AndroidManifest.xml"
168
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100169 java_files = [
170 "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java",
171 ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200172
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200173 apk_under_test = ":AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200174
175 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200176 ":AppRTCMobile_javalib",
jianjun.zhuc0247402017-07-11 06:20:45 -0700177 "../sdk/android:libjingle_peerconnection_java",
Sami Kalliomäki903bd412018-07-24 10:53:28 +0200178 "../sdk/android:video_java",
sakalcb79d512017-01-11 06:21:26 -0800179 "//third_party/android_support_test_runner:runner_java",
180 "//third_party/junit",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200181 ]
182 }
mandermoa6069e82017-01-16 02:23:09 -0800183
Mirko Bonadeib56706f2018-09-18 11:03:39 +0200184 group("video_quality_loopback_test") {
185 testonly = true
186
187 deps = [
188 ":AppRTCMobile_stubbed_video_io_test_apk",
189 "../rtc_tools:frame_analyzer_host",
190 ]
191
192 data = [
193 "../build/android/adb_reverse_forwarder.py",
194 "../examples/androidtests/video_quality_loopback_test.py",
195 "../resources/reference_video_640x360_30fps.y4m",
Mirko Bonadeib56706f2018-09-18 11:03:39 +0200196 "../rtc_tools/compare_videos.py",
197 "../rtc_tools/testing/prebuilt_apprtc.zip",
198 "../rtc_tools/testing/golang/linux/go.tar.gz",
199 "../rtc_tools/testing/build_apprtc.py",
200 "../rtc_tools/testing/utils.py",
201 "../tools_webrtc/video_quality_toolchain/linux/ffmpeg",
Mirko Bonadeib56706f2018-09-18 11:03:39 +0200202 "${root_out_dir}/frame_analyzer_host",
203 ]
204 }
205
Sami Kalliomäkid54f5f52018-08-03 13:23:05 +0200206 rtc_instrumentation_test_apk("AppRTCMobile_stubbed_video_io_test_apk") {
mandermoa6069e82017-01-16 02:23:09 -0800207 apk_name = "AppRTCMobileTestStubbedVideoIO"
208 android_manifest = "androidtests/AndroidManifest.xml"
209
oprypin30cda5e2017-04-24 04:15:13 -0700210 java_files = [ "androidtests/src/org/appspot/apprtc/test/CallActivityStubbedInputOutputTest.java" ]
mandermoa6069e82017-01-16 02:23:09 -0800211
212 apk_under_test = ":AppRTCMobile"
213
214 deps = [
215 ":AppRTCMobile_javalib",
jianjun.zhuc0247402017-07-11 06:20:45 -0700216 "../sdk/android:libjingle_peerconnection_java",
mandermoa6069e82017-01-16 02:23:09 -0800217 "//third_party/android_support_test_runner:rules_java",
218 "//third_party/android_support_test_runner:runner_java",
219 "//third_party/espresso:espresso_all_java",
220 "//third_party/hamcrest:hamcrest_java",
221 "//third_party/junit",
mandermoa6069e82017-01-16 02:23:09 -0800222 ]
Mirko Bonadei6d800032018-09-17 12:45:10 +0000223
224 data = [
Mirko Bonadei6d800032018-09-17 12:45:10 +0000225 "../resources/reference_video_640x360_30fps.y4m",
Mirko Bonadei6d800032018-09-17 12:45:10 +0000226 ]
mandermoa6069e82017-01-16 02:23:09 -0800227 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200228}
tkchin2ddfdba2016-08-07 21:37:45 -0700229
230if (is_ios || (is_mac && target_cpu != "x86")) {
tkchin2ddfdba2016-08-07 21:37:45 -0700231 config("apprtc_common_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200232 include_dirs = [ "objc/AppRTCMobile/common" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700233 }
234
kjellanderb62dbbe2016-09-23 00:38:52 -0700235 rtc_static_library("apprtc_common") {
kjellander1993b1d2017-03-06 00:29:21 -0800236 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700237 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200238 "objc/AppRTCMobile/common/ARDUtilities.h",
239 "objc/AppRTCMobile/common/ARDUtilities.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700240 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700241 public_configs = [ ":apprtc_common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700242
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200243 if (is_ios) {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100244 # iOS must use WebRTC.framework which is dynamically linked.
kthelgason5901d9d2017-08-16 07:28:03 -0700245 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200246 "../sdk:framework_objc+link",
kthelgason5901d9d2017-08-16 07:28:03 -0700247 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200248 } else {
kthelgason5901d9d2017-08-16 07:28:03 -0700249 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200250 "../sdk:mac_framework_objc+link",
kthelgason5901d9d2017-08-16 07:28:03 -0700251 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200252 }
tkchin2ddfdba2016-08-07 21:37:45 -0700253 }
254
255 config("apprtc_signaling_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200256 include_dirs = [ "objc/AppRTCMobile" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700257 }
258
kjellanderb62dbbe2016-09-23 00:38:52 -0700259 rtc_static_library("apprtc_signaling") {
kjellander1993b1d2017-03-06 00:29:21 -0800260 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700261 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200262 "objc/AppRTCMobile/ARDAppClient+Internal.h",
263 "objc/AppRTCMobile/ARDAppClient.h",
264 "objc/AppRTCMobile/ARDAppClient.m",
265 "objc/AppRTCMobile/ARDAppEngineClient.h",
266 "objc/AppRTCMobile/ARDAppEngineClient.m",
267 "objc/AppRTCMobile/ARDBitrateTracker.h",
268 "objc/AppRTCMobile/ARDBitrateTracker.m",
sakalc522e752017-04-05 12:17:48 -0700269 "objc/AppRTCMobile/ARDCaptureController.h",
270 "objc/AppRTCMobile/ARDCaptureController.m",
Anders Carlsson358f2e02018-06-04 10:24:37 +0200271 "objc/AppRTCMobile/ARDExternalSampleCapturer.h",
272 "objc/AppRTCMobile/ARDExternalSampleCapturer.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200273 "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
274 "objc/AppRTCMobile/ARDJoinResponse.h",
275 "objc/AppRTCMobile/ARDJoinResponse.m",
276 "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
277 "objc/AppRTCMobile/ARDMessageResponse.h",
278 "objc/AppRTCMobile/ARDMessageResponse.m",
279 "objc/AppRTCMobile/ARDRoomServerClient.h",
sakalc4adacf2017-03-28 01:22:48 -0700280 "objc/AppRTCMobile/ARDSettingsModel+Private.h",
281 "objc/AppRTCMobile/ARDSettingsModel.h",
282 "objc/AppRTCMobile/ARDSettingsModel.m",
283 "objc/AppRTCMobile/ARDSettingsStore.h",
284 "objc/AppRTCMobile/ARDSettingsStore.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200285 "objc/AppRTCMobile/ARDSignalingChannel.h",
286 "objc/AppRTCMobile/ARDSignalingMessage.h",
287 "objc/AppRTCMobile/ARDSignalingMessage.m",
288 "objc/AppRTCMobile/ARDStatsBuilder.h",
289 "objc/AppRTCMobile/ARDStatsBuilder.m",
kthelgasoncc882af2017-01-13 05:59:46 -0800290 "objc/AppRTCMobile/ARDTURNClient+Internal.h",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200291 "objc/AppRTCMobile/ARDTURNClient.h",
kthelgasoncc882af2017-01-13 05:59:46 -0800292 "objc/AppRTCMobile/ARDTURNClient.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200293 "objc/AppRTCMobile/ARDWebSocketChannel.h",
294 "objc/AppRTCMobile/ARDWebSocketChannel.m",
295 "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
296 "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
297 "objc/AppRTCMobile/RTCIceServer+JSON.h",
298 "objc/AppRTCMobile/RTCIceServer+JSON.m",
299 "objc/AppRTCMobile/RTCMediaConstraints+JSON.h",
300 "objc/AppRTCMobile/RTCMediaConstraints+JSON.m",
301 "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
302 "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700303 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700304 public_configs = [ ":apprtc_signaling_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700305 deps = [
306 ":apprtc_common",
307 ":socketrocket",
308 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200309 if (is_ios) {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100310 # iOS must use WebRTC.framework which is dynamically linked.
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100311 deps += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200312 "../sdk:framework_objc+link",
313 "../sdk:ios_framework_bundle",
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200314 ]
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100315 } else {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200316 deps += [ "../sdk:mac_framework_objc+link" ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200317 }
Kári Helgasonaaa483b2018-06-20 11:52:03 +0000318 libs = [ "QuartzCore.framework" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700319 }
320
321 if (is_ios) {
denicija77bfd7c2016-11-15 00:41:26 -0800322 rtc_static_library("AppRTCMobile_lib") {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100323 # iOS must use WebRTC.framework which is dynamically linked.
kjellander1993b1d2017-03-06 00:29:21 -0800324 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700325 sources = [
Patrik Höglund49acb1e2018-01-02 14:41:54 +0100326 "objc/AppRTCMobile/ios/ARDAppDelegate.h",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200327 "objc/AppRTCMobile/ios/ARDAppDelegate.m",
Daniela012b56b2017-11-15 13:15:24 +0100328 "objc/AppRTCMobile/ios/ARDFileCaptureController.h",
329 "objc/AppRTCMobile/ios/ARDFileCaptureController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200330 "objc/AppRTCMobile/ios/ARDMainView.h",
331 "objc/AppRTCMobile/ios/ARDMainView.m",
332 "objc/AppRTCMobile/ios/ARDMainViewController.h",
333 "objc/AppRTCMobile/ios/ARDMainViewController.m",
denicijad17d5362016-11-02 02:56:09 -0700334 "objc/AppRTCMobile/ios/ARDSettingsViewController.h",
335 "objc/AppRTCMobile/ios/ARDSettingsViewController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200336 "objc/AppRTCMobile/ios/ARDStatsView.h",
337 "objc/AppRTCMobile/ios/ARDStatsView.m",
338 "objc/AppRTCMobile/ios/ARDVideoCallView.h",
339 "objc/AppRTCMobile/ios/ARDVideoCallView.m",
340 "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
341 "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
Anders Carlsson6bf43d22017-10-16 13:51:43 +0200342 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.h",
343 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200344 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
345 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
denicija77bfd7c2016-11-15 00:41:26 -0800346 ]
denicija77bfd7c2016-11-15 00:41:26 -0800347
Anders Carlsson96fccfe2019-02-21 16:11:40 +0100348 configs += [ "..:common_objc" ]
349
denicija77bfd7c2016-11-15 00:41:26 -0800350 deps = [
351 ":apprtc_common",
352 ":apprtc_signaling",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200353 "../sdk:framework_objc+link",
354 "../sdk:ios_framework_bundle",
denicija77bfd7c2016-11-15 00:41:26 -0800355 ]
356 }
357
358 ios_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800359 testonly = true
denicija77bfd7c2016-11-15 00:41:26 -0800360 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200361 "objc/AppRTCMobile/ios/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700362 ]
363
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200364 info_plist = "objc/AppRTCMobile/ios/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700365
denicija77bfd7c2016-11-15 00:41:26 -0800366 configs += [ "..:common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700367 public_configs = [ "..:common_inherited_config" ]
368
369 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200370 ":AppRTCMobile_ios_bundle_data",
denicija77bfd7c2016-11-15 00:41:26 -0800371 ":AppRTCMobile_lib",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100372 "../sdk:framework_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200373 "../sdk:ios_framework_bundle",
tkchin2ddfdba2016-08-07 21:37:45 -0700374 ]
375
Anders Carlsson358f2e02018-06-04 10:24:37 +0200376 if (rtc_apprtcmobile_broadcast_extension) {
377 deps += [
378 ":AppRTCMobileBroadcastSetupUI_extension_bundle",
379 ":AppRTCMobileBroadcastUpload_extension_bundle",
380 ]
381 }
382
tkchin2ddfdba2016-08-07 21:37:45 -0700383 if (target_cpu == "x86") {
384 deps += [ "//testing/iossim:iossim" ]
385 }
386 }
387
Anders Carlsson358f2e02018-06-04 10:24:37 +0200388 if (rtc_apprtcmobile_broadcast_extension) {
389 bundle_data("AppRTCMobileBroadcastUpload_extension_bundle") {
390 testonly = true
391 public_deps = [
392 ":AppRTCMobileBroadcastUpload",
393 ]
394 sources = [
395 "$root_out_dir/AppRTCMobileBroadcastUpload.appex",
396 ]
397 outputs = [
398 "{{bundle_plugins_dir}}/{{source_file_part}}",
399 ]
400 }
401
402 bundle_data("AppRTCMobileBroadcastSetupUI_extension_bundle") {
403 testonly = true
404 public_deps = [
405 ":AppRTCMobileBroadcastSetupUI",
406 ]
407 sources = [
408 "$root_out_dir/AppRTCMobileBroadcastSetupUI.appex",
409 ]
410 outputs = [
411 "{{bundle_plugins_dir}}/{{source_file_part}}",
412 ]
413 }
414
415 rtc_static_library("AppRTCMobileBroadcastUpload_lib") {
Anders Carlsson358f2e02018-06-04 10:24:37 +0200416 testonly = true
417 sources = [
418 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.h",
419 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.m",
420 ]
421
422 deps = [
Anders Carlsson358f2e02018-06-04 10:24:37 +0200423 ":apprtc_signaling",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200424 "../sdk:framework_objc+link",
425 "../sdk:ios_framework_bundle",
Anders Carlsson358f2e02018-06-04 10:24:37 +0200426 ]
427
428 libs = [ "ReplayKit.framework" ]
429 }
430
431 ios_appex_bundle("AppRTCMobileBroadcastUpload") {
432 testonly = true
433 configs += [ "..:common_config" ]
434 public_configs = [ "..:common_inherited_config" ]
435
436 info_plist = "objc/AppRTCMobile/ios/broadcast_extension/BroadcastUploadInfo.plist"
437
438 deps = [
439 ":AppRTCMobileBroadcastUpload_lib",
440 "../sdk:framework_objc",
441 ]
442 }
443
444 ios_appex_bundle("AppRTCMobileBroadcastSetupUI") {
445 sources = [
446 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.h",
447 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.m",
448 ]
449
450 info_plist = "objc/AppRTCMobile/ios/broadcast_extension/BroadcastSetupUIInfo.plist"
451
452 libs = [ "ReplayKit.framework" ]
453
454 deps = [
455 ":AppRTCMobile_ios_bundle_data",
456 ]
457 }
458 }
459
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200460 bundle_data("AppRTCMobile_ios_bundle_data") {
tkchin2ddfdba2016-08-07 21:37:45 -0700461 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200462 "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
Daniela012b56b2017-11-15 13:15:24 +0100463
464 # Sample video taken from https://media.xiph.org/video/derf/
465 "objc/AppRTCMobile/ios/resources/foreman.mp4",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200466 "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
467 "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
468 "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
469 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
470 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
471 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
472 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
denicija6d6762c2016-10-28 04:53:16 -0700473 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png",
474 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200475 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
476 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
477 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
478 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
479 "objc/AppRTCMobile/ios/resources/mozart.mp3",
anderscb5ed9052017-08-15 04:07:12 -0700480 "objc/Icon-120.png",
481 "objc/Icon-180.png",
tkchin2ddfdba2016-08-07 21:37:45 -0700482 "objc/Icon.png",
483 ]
484 outputs = [
485 "{{bundle_resources_dir}}/{{source_file_part}}",
486 ]
487 }
Anders Carlsson73119182018-03-15 09:41:03 +0100488
489 rtc_static_library("ObjCNativeAPIDemo_lib") {
490 testonly = true
491 sources = [
492 "objcnativeapi/objc/NADAppDelegate.h",
493 "objcnativeapi/objc/NADAppDelegate.m",
494 "objcnativeapi/objc/NADViewController.h",
495 "objcnativeapi/objc/NADViewController.mm",
Steve Anton10542f22019-01-11 09:11:00 -0800496 "objcnativeapi/objc/objc_call_client.h",
497 "objcnativeapi/objc/objc_call_client.mm",
Anders Carlsson73119182018-03-15 09:41:03 +0100498 ]
499
Anders Carlsson73119182018-03-15 09:41:03 +0100500 deps = [
501 "../api:libjingle_peerconnection_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100502 "../api:scoped_refptr",
Anders Carlsson73119182018-03-15 09:41:03 +0100503 "../api/audio_codecs:builtin_audio_decoder_factory",
504 "../api/audio_codecs:builtin_audio_encoder_factory",
Jiawei Ouc2ebe212018-11-08 10:02:56 -0800505 "../api/video:builtin_video_bitrate_allocator_factory",
Anders Carlsson73119182018-03-15 09:41:03 +0100506 "../logging:rtc_event_log_impl_base",
507 "../media:rtc_audio_video",
Alessio Bazzicab768e882018-11-07 14:29:54 +0000508 "../modules/audio_processing:api",
Anders Carlsson73119182018-03-15 09:41:03 +0100509 "../modules/audio_processing:audio_processing",
510 "../pc:libjingle_peerconnection",
511 "../rtc_base:rtc_base",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200512 "../sdk:base_objc",
Anders Carlsson73119182018-03-15 09:41:03 +0100513 "../sdk:default_codec_factory_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200514 "../sdk:helpers_objc",
Anders Carlsson73119182018-03-15 09:41:03 +0100515 "../sdk:native_api",
516 "../sdk:ui_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200517 "../sdk:videocapture_objc",
Anders Carlsson73119182018-03-15 09:41:03 +0100518 "../sdk:videotoolbox_objc",
Mirko Bonadei879f7882018-07-11 09:18:37 +0200519 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson73119182018-03-15 09:41:03 +0100520 ]
521
522 if (current_cpu == "arm64") {
523 deps += [ "../sdk:metal_objc" ]
524 }
525 }
526
527 ios_app_bundle("ObjCNativeAPIDemo") {
528 testonly = true
529 sources = [
530 "objcnativeapi/objc/main.m",
531 ]
532
533 info_plist = "objcnativeapi/Info.plist"
534
535 configs += [ "..:common_config" ]
536 public_configs = [ "..:common_inherited_config" ]
537
538 deps = [
539 ":ObjCNativeAPIDemo_lib",
540 ]
541
542 if (target_cpu == "x86") {
543 deps += [ "//testing/iossim:iossim" ]
544 }
545 }
tkchin2ddfdba2016-08-07 21:37:45 -0700546 }
547
548 if (is_mac) {
denicija77bfd7c2016-11-15 00:41:26 -0800549 rtc_static_library("AppRTCMobile_lib") {
kjellander1993b1d2017-03-06 00:29:21 -0800550 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700551 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200552 "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
553 "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
554 "objc/AppRTCMobile/mac/APPRTCViewController.h",
555 "objc/AppRTCMobile/mac/APPRTCViewController.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700556 ]
jianjun.zhuc0247402017-07-11 06:20:45 -0700557 configs += [ "..:common_objc" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700558 deps = [
559 ":apprtc_common",
560 ":apprtc_signaling",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200561 "../sdk:mac_framework_objc+link",
tkchin2ddfdba2016-08-07 21:37:45 -0700562 ]
563 }
564
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200565 mac_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800566 testonly = true
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200567 output_name = "AppRTCMobile"
tkchin2ddfdba2016-08-07 21:37:45 -0700568
tkchin2ddfdba2016-08-07 21:37:45 -0700569 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200570 "objc/AppRTCMobile/mac/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700571 ]
572
573 public_configs = [ "..:common_inherited_config" ]
574
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200575 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700576
577 libs = [ "AppKit.framework" ]
578
Anders Carlsson24d8ec32018-12-10 14:04:12 +0100579 ldflags = [
580 "-rpath",
581 "@executable_path/../Frameworks",
582 ]
583
tkchin2ddfdba2016-08-07 21:37:45 -0700584 deps = [
denicija77bfd7c2016-11-15 00:41:26 -0800585 ":AppRTCMobile_lib",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200586 "../sdk:mac_framework_bundle",
587 "../sdk:mac_framework_objc+link",
tkchin2ddfdba2016-08-07 21:37:45 -0700588 ]
589 }
590 }
591
592 config("socketrocket_include_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200593 include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700594 }
595
596 config("socketrocket_warning_config") {
597 # GN orders flags on a target before flags from configs. The default config
598 # adds these flags so to cancel them out they need to come from a config and
599 # cannot be on the target directly.
600 cflags = [
601 "-Wno-deprecated-declarations",
602 "-Wno-nonnull",
tkchin2ddfdba2016-08-07 21:37:45 -0700603 "-Wno-semicolon-before-method-body",
kthelgasone47de1a2017-02-24 01:56:01 -0800604 "-Wno-unused-variable",
tkchin2ddfdba2016-08-07 21:37:45 -0700605 ]
606
henrika27d8b612016-09-21 04:13:00 -0700607 cflags_objc = [
608 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
609 "-Wno-objc-missing-property-synthesis",
henrika27d8b612016-09-21 04:13:00 -0700610 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700611 }
612
kjellanderb62dbbe2016-09-23 00:38:52 -0700613 rtc_static_library("socketrocket") {
kjellander1993b1d2017-03-06 00:29:21 -0800614 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700615 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200616 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
617 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700618 ]
kthelgasonc0977102017-04-24 00:57:16 -0700619 configs += [ ":socketrocket_warning_config" ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700620 public_configs = [ ":socketrocket_include_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700621
622 libs = [
623 "CFNetwork.framework",
624 "icucore",
625 ]
626 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800627
628 if (rtc_include_tests) {
kthelgason4065a572017-02-14 04:58:56 -0800629 # TODO(kthelgason): compile xctests on mac when chromium supports it.
630 if (is_ios) {
631 rtc_source_set("apprtcmobile_test_sources") {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100632 # iOS must use WebRTC.framework which is dynamically linked.
kjellander1993b1d2017-03-06 00:29:21 -0800633 testonly = true
kthelgason4065a572017-02-14 04:58:56 -0800634 include_dirs = [
635 "objc/AppRTCMobile",
636 "objc/AppRTCMobile/ios",
637 ]
kthelgason4065a572017-02-14 04:58:56 -0800638 sources = [
639 "objc/AppRTCMobile/tests/ARDAppClient_xctest.mm",
Daniela012b56b2017-11-15 13:15:24 +0100640 "objc/AppRTCMobile/tests/ARDFileCaptureController_xctest.mm",
kthelgason4065a572017-02-14 04:58:56 -0800641 "objc/AppRTCMobile/tests/ARDSettingsModel_xctest.mm",
642 ]
kjellander1993b1d2017-03-06 00:29:21 -0800643 deps = [
kthelgason4065a572017-02-14 04:58:56 -0800644 ":AppRTCMobile_lib",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100645 ":apprtc_signaling",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100646 "../rtc_base:rtc_base",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200647 "../sdk:framework_objc+link",
648 "../sdk:ios_framework_bundle",
kthelgason4065a572017-02-14 04:58:56 -0800649 "//build/config/ios:xctest",
650 "//third_party/ocmock",
651 ]
adam.fedorbcc5d872016-11-07 14:53:28 -0800652 }
653
kthelgason4065a572017-02-14 04:58:56 -0800654 rtc_ios_xctest_test("apprtcmobile_tests") {
655 info_plist = "objc/AppRTCMobile/ios/Info.plist"
656 sources = [
Artem Titarenko34fc3462018-11-06 12:29:29 +0100657 "objc/AppRTCMobile/tests/main.mm",
kthelgason4065a572017-02-14 04:58:56 -0800658 ]
659 deps = [
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100660 ":AppRTCMobile_lib",
kthelgason4065a572017-02-14 04:58:56 -0800661 ":apprtcmobile_test_sources",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100662 "../sdk:framework_objc",
Artem Titarenko34fc3462018-11-06 12:29:29 +0100663 "//test:test_support",
kthelgason4065a572017-02-14 04:58:56 -0800664 ]
665 ldflags = [ "-all_load" ]
666 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800667 }
668 }
tkchin2ddfdba2016-08-07 21:37:45 -0700669}
kthelgason0727f152016-08-08 09:03:23 -0700670
671if (is_linux || is_win) {
ehmaldonado38a21322016-09-02 04:10:34 -0700672 rtc_executable("peerconnection_client") {
kjellander1993b1d2017-03-06 00:29:21 -0800673 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700674 sources = [
675 "peerconnection/client/conductor.cc",
676 "peerconnection/client/conductor.h",
677 "peerconnection/client/defaults.cc",
678 "peerconnection/client/defaults.h",
679 "peerconnection/client/peer_connection_client.cc",
680 "peerconnection/client/peer_connection_client.h",
681 ]
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700682
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100683 deps = [
Yves Gerey3e707812018-11-28 16:47:49 +0100684 "../api:audio_options_api",
Mirko Bonadei2ff3f492018-11-22 09:00:13 +0100685 "../api:create_peerconnection_factory",
Mirko Bonadei34814c72018-01-11 10:13:56 +0100686 "../api:libjingle_peerconnection_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100687 "../api:scoped_refptr",
Yves Gerey3e707812018-11-28 16:47:49 +0100688 "../api/audio:audio_mixer_api",
689 "../api/audio_codecs:audio_codecs_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200690 "../api/video:video_frame_i420",
Yves Gerey3e707812018-11-28 16:47:49 +0100691 "../api/video_codecs:video_codecs_api",
692 "../media:rtc_media_base",
693 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100694 "../rtc_base:checks",
Artem Titove41c4332018-07-25 15:04:28 +0200695 "../rtc_base/third_party/sigslot",
Bjorn Terelius3e676762018-10-29 15:26:27 +0100696 "../system_wrappers:field_trial",
697 "../test:field_trial",
Kári Tristan Helgasonede7cb22019-03-06 10:34:09 +0100698 "../test:platform_video_capturer",
Niels Möllerb76be9a2018-12-20 16:28:23 +0100699 "//third_party/abseil-cpp/absl/memory",
Yves Gerey3e707812018-11-28 16:47:49 +0100700 "//third_party/abseil-cpp/absl/types:optional",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100701 ]
kthelgason0727f152016-08-08 09:03:23 -0700702 if (is_win) {
703 sources += [
Steve Anton10542f22019-01-11 09:11:00 -0800704 "peerconnection/client/flag_defs.h",
kthelgason0727f152016-08-08 09:03:23 -0700705 "peerconnection/client/main.cc",
706 "peerconnection/client/main_wnd.cc",
707 "peerconnection/client/main_wnd.h",
708 ]
kthelgason0727f152016-08-08 09:03:23 -0700709 configs += [ "//build/config/win:windowed" ]
jianjun.zhuc0247402017-07-11 06:20:45 -0700710 deps += [ "../media:rtc_media_base" ]
kthelgason0727f152016-08-08 09:03:23 -0700711 }
712 if (is_linux) {
713 sources += [
714 "peerconnection/client/linux/main.cc",
715 "peerconnection/client/linux/main_wnd.cc",
716 "peerconnection/client/linux/main_wnd.h",
717 ]
Henrik Kjellanderefbde2c2017-03-27 08:28:27 +0200718 cflags = [ "-Wno-deprecated-declarations" ]
kthelgason0727f152016-08-08 09:03:23 -0700719 libs = [
720 "X11",
721 "Xcomposite",
722 "Xext",
723 "Xrender",
724 ]
thomasandersonef16e992016-12-13 02:57:43 -0800725 deps += [ "//build/config/linux/gtk" ]
kthelgason0727f152016-08-08 09:03:23 -0700726 }
kjellander1993b1d2017-03-06 00:29:21 -0800727
728 deps += [
Niels Möller8366e172018-02-14 12:20:13 +0100729 "../api:libjingle_peerconnection_api",
Karl Wiberg1b0eae32017-10-17 14:48:54 +0200730 "../api/audio_codecs:builtin_audio_decoder_factory",
731 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200732 "../api/video:video_frame",
Anders Carlsson67537952018-05-03 11:28:29 +0200733 "../api/video_codecs:builtin_video_decoder_factory",
734 "../api/video_codecs:builtin_video_encoder_factory",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100735 "../media:rtc_audio_video",
Anders Carlsson67537952018-05-03 11:28:29 +0200736 "../modules/audio_device:audio_device",
Alessio Bazzicab768e882018-11-07 14:29:54 +0000737 "../modules/audio_processing:api",
Anders Carlsson67537952018-05-03 11:28:29 +0200738 "../modules/audio_processing:audio_processing",
jianjun.zhuc0247402017-07-11 06:20:45 -0700739 "../modules/video_capture:video_capture_module",
740 "../pc:libjingle_peerconnection",
Niels Möllerb76be9a2018-12-20 16:28:23 +0100741 "../pc:peerconnection",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700742 "../rtc_base:rtc_base",
743 "../rtc_base:rtc_base_approved",
744 "../rtc_base:rtc_json",
Niels Möllerb76be9a2018-12-20 16:28:23 +0100745 "../test:video_test_common",
kjellander1993b1d2017-03-06 00:29:21 -0800746 "//third_party/libyuv",
kjellander1993b1d2017-03-06 00:29:21 -0800747 ]
kthelgason0727f152016-08-08 09:03:23 -0700748 }
kjellanderd4626e52016-09-07 02:33:01 -0700749
ehmaldonado38a21322016-09-02 04:10:34 -0700750 rtc_executable("peerconnection_server") {
kjellander1993b1d2017-03-06 00:29:21 -0800751 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700752 sources = [
753 "peerconnection/server/data_socket.cc",
754 "peerconnection/server/data_socket.h",
755 "peerconnection/server/main.cc",
756 "peerconnection/server/peer_channel.cc",
757 "peerconnection/server/peer_channel.h",
758 "peerconnection/server/utils.cc",
759 "peerconnection/server/utils.h",
760 ]
761 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700762 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700763 "../rtc_tools:command_line_parser",
Bjorn Terelius3e676762018-10-29 15:26:27 +0100764 "../system_wrappers:field_trial",
765 "../test:field_trial",
kthelgason0727f152016-08-08 09:03:23 -0700766 ]
kthelgason0727f152016-08-08 09:03:23 -0700767 }
ehmaldonado38a21322016-09-02 04:10:34 -0700768 rtc_executable("relayserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800769 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700770 sources = [
771 "relayserver/relayserver_main.cc",
772 ]
773 deps = [
Niels Möllera1342042018-11-08 16:47:14 +0100774 "../p2p:p2p_server_utils",
jianjun.zhuc0247402017-07-11 06:20:45 -0700775 "../p2p:rtc_p2p",
776 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700777 "../rtc_base:rtc_base",
778 "../rtc_base:rtc_base_approved",
kthelgason0727f152016-08-08 09:03:23 -0700779 ]
kthelgason0727f152016-08-08 09:03:23 -0700780 }
ehmaldonado38a21322016-09-02 04:10:34 -0700781 rtc_executable("turnserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800782 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700783 sources = [
784 "turnserver/turnserver_main.cc",
785 ]
786 deps = [
Niels Möller9862c2e2018-10-30 12:20:03 +0100787 ":read_auth_file",
Niels Möllera1342042018-11-08 16:47:14 +0100788 "../p2p:p2p_server_utils",
jianjun.zhuc0247402017-07-11 06:20:45 -0700789 "../p2p:rtc_p2p",
790 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700791 "../rtc_base:rtc_base",
792 "../rtc_base:rtc_base_approved",
kthelgason0727f152016-08-08 09:03:23 -0700793 ]
kthelgason0727f152016-08-08 09:03:23 -0700794 }
ehmaldonado38a21322016-09-02 04:10:34 -0700795 rtc_executable("stunserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800796 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700797 sources = [
798 "stunserver/stunserver_main.cc",
799 ]
800 deps = [
Niels Möllera1342042018-11-08 16:47:14 +0100801 "../p2p:p2p_server_utils",
jianjun.zhuc0247402017-07-11 06:20:45 -0700802 "../p2p:rtc_p2p",
803 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700804 "../rtc_base:rtc_base",
805 "../rtc_base:rtc_base_approved",
kthelgason0727f152016-08-08 09:03:23 -0700806 ]
kthelgason0727f152016-08-08 09:03:23 -0700807 }
808}
charujainaca3a242016-11-01 03:09:15 -0700809
qiangchen42f96d52017-08-08 17:08:03 -0700810if (is_win || is_android) {
gyzhouad7cad82017-05-11 16:10:03 -0700811 rtc_shared_library("webrtc_unity_plugin") {
812 testonly = true
813 sources = [
814 "unityplugin/simple_peer_connection.cc",
815 "unityplugin/simple_peer_connection.h",
816 "unityplugin/unity_plugin_apis.cc",
817 "unityplugin/unity_plugin_apis.h",
gyzhoub38f3862017-07-25 16:04:31 -0700818 "unityplugin/video_observer.cc",
819 "unityplugin/video_observer.h",
gyzhouad7cad82017-05-11 16:10:03 -0700820 ]
qiangchen42f96d52017-08-08 17:08:03 -0700821
822 if (is_android) {
823 sources += [
Steve Anton10542f22019-01-11 09:11:00 -0800824 "unityplugin/class_reference_holder.cc",
825 "unityplugin/class_reference_holder.h",
qiangchen42f96d52017-08-08 17:08:03 -0700826 "unityplugin/jni_onload.cc",
827 ]
Qiang Chen43fb9122017-12-20 10:47:36 -0800828 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ]
qiangchen42f96d52017-08-08 17:08:03 -0700829 }
830
qiangchen42f96d52017-08-08 17:08:03 -0700831 if (is_win) {
Mirko Bonadeif957dd92018-07-11 10:47:42 +0200832 configs += [ "//build/config/win:windowed" ]
qiangchen42f96d52017-08-08 17:08:03 -0700833 }
gyzhouad7cad82017-05-11 16:10:03 -0700834 deps = [
Mirko Bonadei2ff3f492018-11-22 09:00:13 +0100835 "../api:create_peerconnection_factory",
Mirko Bonadei34814c72018-01-11 10:13:56 +0100836 "../api:libjingle_peerconnection_api",
Qiang Chen51e20462017-12-05 11:11:21 -0800837 "../api/audio_codecs:builtin_audio_decoder_factory",
838 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200839 "../api/video:video_frame",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100840 "../media:rtc_audio_video",
Anders Carlssona114c882018-01-04 15:10:22 +0100841 "../media:rtc_internal_video_codecs",
jianjun.zhuc0247402017-07-11 06:20:45 -0700842 "../media:rtc_media",
843 "../media:rtc_media_base",
Qiang Chen43fb9122017-12-20 10:47:36 -0800844 "../modules/audio_device:audio_device",
Alessio Bazzicab768e882018-11-07 14:29:54 +0000845 "../modules/audio_processing:api",
Qiang Chen43fb9122017-12-20 10:47:36 -0800846 "../modules/audio_processing:audio_processing",
jianjun.zhuc0247402017-07-11 06:20:45 -0700847 "../modules/video_capture:video_capture_module",
848 "../pc:libjingle_peerconnection",
Niels Möller0a595352019-01-02 15:12:38 +0100849 "../pc:peerconnection",
qiangchen42f96d52017-08-08 17:08:03 -0700850 "../rtc_base:rtc_base",
Kári Tristan Helgasonede7cb22019-03-06 10:34:09 +0100851 "../test:platform_video_capturer",
Niels Möller0a595352019-01-02 15:12:38 +0100852 "../test:video_test_common",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200853 "//third_party/abseil-cpp/absl/memory",
gyzhouad7cad82017-05-11 16:10:03 -0700854 ]
qiangchen42f96d52017-08-08 17:08:03 -0700855 if (is_android) {
George Zhou2770c3d2018-03-07 09:58:54 -0800856 deps += [
857 "../modules/utility:utility",
858 "../sdk/android:libjingle_peerconnection_jni",
859 ]
qiangchen42f96d52017-08-08 17:08:03 -0700860 }
861 }
862}
863
864if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000865 rtc_android_library("webrtc_unity_java") {
qiangchen42f96d52017-08-08 17:08:03 -0700866 java_files = [ "unityplugin/java/src/org/webrtc/UnityUtility.java" ]
867 deps = [
868 "../rtc_base:base_java",
Artem Titarenko69540f42018-12-10 12:30:46 +0100869 "../sdk/android:camera_java",
qiangchen42f96d52017-08-08 17:08:03 -0700870 "../sdk/android:libjingle_peerconnection_java",
Artem Titarenko69540f42018-12-10 12:30:46 +0100871 "../sdk/android:peerconnection_java",
872 "../sdk/android:video_java",
873 "//third_party/android_deps:android_support_annotations_java",
qiangchen42f96d52017-08-08 17:08:03 -0700874 ]
875 }
876
877 dist_jar("libwebrtc_unity") {
878 _target_dir_name = get_label_info(":$target_name", "dir")
879 output = "${root_out_dir}/lib.java${_target_dir_name}/${target_name}.jar"
George Zhou2770c3d2018-03-07 09:58:54 -0800880 direct_deps_only = false
qiangchen42f96d52017-08-08 17:08:03 -0700881 use_interface_jars = false
George Zhou2770c3d2018-03-07 09:58:54 -0800882 use_unprocessed_jars = false
Oleh Prypin86021d92017-09-24 22:29:06 +0200883 requires_android = true
qiangchen42f96d52017-08-08 17:08:03 -0700884 deps = [
885 ":webrtc_unity_java",
qiangchen42f96d52017-08-08 17:08:03 -0700886 "../rtc_base:base_java",
887 "../sdk/android:libjingle_peerconnection_java",
888 "../sdk/android:libjingle_peerconnection_metrics_default_java",
Artem Titarenko69540f42018-12-10 12:30:46 +0100889 "//third_party/android_deps:android_support_annotations_java",
qiangchen42f96d52017-08-08 17:08:03 -0700890 ]
gyzhouad7cad82017-05-11 16:10:03 -0700891 }
892}
893
charujainaca3a242016-11-01 03:09:15 -0700894if (!build_with_chromium) {
895 # Doesn't build within Chrome on Win.
896 rtc_executable("stun_prober") {
kjellander1993b1d2017-03-06 00:29:21 -0800897 testonly = true
charujainaca3a242016-11-01 03:09:15 -0700898 sources = [
899 "stunprober/main.cc",
900 ]
charujainaca3a242016-11-01 03:09:15 -0700901 deps = [
902 "../p2p:libstunprober",
903 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100904 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700905 "../rtc_base:rtc_base",
906 "../rtc_base:rtc_base_approved",
charujainaca3a242016-11-01 03:09:15 -0700907 ]
908 }
909}