blob: 704afc5467356314dff819263acad86413ade373 [file] [log] [blame]
Sami Kalliomaki9c0c75b2016-06-29 12:55:001# 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 14:58:229import("../webrtc.gni")
Qiang Chen43fb9122017-12-20 18:47:3610
Sami Kalliomaki9c0c75b2016-06-29 12:55:0011if (is_android) {
12 import("//build/config/android/config.gni")
13 import("//build/config/android/rules.gni")
tkchin2ddfdba2016-08-08 04:37:4514} 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 12:55:0018}
19
20group("examples") {
kjellander6ceab082016-10-28 12:44:0321 # This target shall build all targets in examples.
22 testonly = true
Mirko Bonadei1a339c32017-12-14 12:06:1023 deps = []
Sami Kalliomaki9c0c75b2016-06-29 12:55:0024
tkchin2ddfdba2016-08-08 04:37:4525 if (is_android) {
Mirko Bonadei1a339c32017-12-14 12:06:1026 deps += [
kjellander6ceab082016-10-28 12:44:0327 ":AppRTCMobile",
Sami Kalliomäkid54f5f52018-08-03 11:23:0528 ":AppRTCMobile_test_apk",
George Zhou2770c3d2018-03-07 17:58:5429 ":libwebrtc_unity",
Jason Long00b84622020-07-20 21:52:1230 "androidvoip",
kjellander6ceab082016-10-28 12:44:0331 ]
Sami Kalliomäki3e77afd2018-03-08 15:43:1632
33 # TODO(sakal): We include some code from the tests. Remove this dependency
34 # and remove this if-clause.
35 if (rtc_include_tests) {
Artem Titov94b57c02019-03-21 12:35:1036 deps += [ "androidnativeapi" ]
Sami Kalliomäki3e77afd2018-03-08 15:43:1637 }
kjellander6ceab082016-10-28 12:44:0338 }
39
charujainaca3a242016-11-01 10:09:1540 if (!build_with_chromium) {
Mirko Bonadei1a339c32017-12-14 12:06:1041 deps += [ ":stun_prober" ]
charujainaca3a242016-11-01 10:09:1542 }
43
kjellander6ceab082016-10-28 12:44:0344 if (is_ios || (is_mac && target_cpu != "x86")) {
Mirko Bonadei1a339c32017-12-14 12:06:1045 deps += [ ":AppRTCMobile" ]
Sami Kalliomaki9c0c75b2016-06-29 12:55:0046 }
kjellander6ceab082016-10-28 12:44:0347
Hidehiko Abef264e702020-09-10 09:10:1148 if (is_linux || is_chromeos || is_win) {
Mirko Bonadei1a339c32017-12-14 12:06:1049 deps += [
kthelgason0727f152016-08-08 16:03:2350 ":peerconnection_server",
kthelgason0727f152016-08-08 16:03:2351 ":stunserver",
52 ":turnserver",
53 ]
Robin Raymondce1b1402018-11-23 01:10:1154 if (current_os != "winuwp") {
55 deps += [ ":peerconnection_client" ]
56 }
kthelgason0727f152016-08-08 16:03:2357 }
George Zhou2770c3d2018-03-07 17:58:5458
59 if (is_android || is_win) {
60 deps += [ ":webrtc_unity_plugin" ]
61 }
Sami Kalliomaki9c0c75b2016-06-29 12:55:0062}
63
Mirko Bonadei86d053c2019-10-17 19:32:0464rtc_library("read_auth_file") {
Niels Möller9862c2e2018-10-30 11:20:0365 testonly = true
66 sources = [
67 "turnserver/read_auth_file.cc",
68 "turnserver/read_auth_file.h",
69 ]
Mirko Bonadeiccbe95f2020-01-21 11:10:1070 deps = [ "../rtc_base" ]
Niels Möller9862c2e2018-10-30 11:20:0371}
72
73if (rtc_include_tests) {
74 rtc_test("examples_unittests") {
75 testonly = true
Mirko Bonadeiccbe95f2020-01-21 11:10:1076 sources = [ "turnserver/read_auth_file_unittest.cc" ]
Niels Möller9862c2e2018-10-30 11:20:0377 deps = [
78 ":read_auth_file",
79 "../test:test_main",
80 "//test:test_support",
81 "//testing/gtest",
82 ]
83 }
84}
85
tkchin2ddfdba2016-08-08 04:37:4586if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:3387 rtc_android_apk("AppRTCMobile") {
kjellander1993b1d2017-03-06 08:29:2188 testonly = true
Magnus Jedvertc1815cf2016-09-27 08:10:4189 apk_name = "AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 12:55:0090 android_manifest = "androidapp/AndroidManifest.xml"
Jeremy Leconteb19cfee2020-06-25 20:57:4991 min_sdk_version = 21
Oleh Prypin4cbb4ef2019-06-18 15:09:5192 target_sdk_version = 29
Sami Kalliomaki9c0c75b2016-06-29 12:55:0093
94 deps = [
Magnus Jedvertc1815cf2016-09-27 08:10:4195 ":AppRTCMobile_javalib",
96 ":AppRTCMobile_resources",
jianjun.zhuc0247402017-07-11 13:20:4597 "../rtc_base:base_java",
Sami Kalliomaki9c0c75b2016-06-29 12:55:0098 ]
99
jianjun.zhuc0247402017-07-11 13:20:45100 shared_libraries = [ "../sdk/android:libjingle_peerconnection_so" ]
Sami Kalliomaki9c0c75b2016-06-29 12:55:00101 }
102
Mirko Bonadeifbb3b7d2017-11-07 15:36:33103 rtc_android_library("AppRTCMobile_javalib") {
kjellander1993b1d2017-03-06 08:29:21104 testonly = true
Courtney Edwards35c87b62020-05-19 11:44:42105 android_manifest = "androidapp/AndroidManifest.xml"
sakal07a050f2017-02-13 13:58:27106
Natalie Chouinard65bbcab2019-12-23 22:02:25107 sources = [
Sami Kalliomaki9c0c75b2016-06-29 12:55:00108 "androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java",
henrikac3c2f312016-12-14 15:36:56109 "androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java",
Sami Kalliomaki9c0c75b2016-06-29 12:55:00110 "androidapp/src/org/appspot/apprtc/AppRTCClient.java",
111 "androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java",
112 "androidapp/src/org/appspot/apprtc/CallActivity.java",
113 "androidapp/src/org/appspot/apprtc/CallFragment.java",
114 "androidapp/src/org/appspot/apprtc/CaptureQualityController.java",
115 "androidapp/src/org/appspot/apprtc/ConnectActivity.java",
116 "androidapp/src/org/appspot/apprtc/CpuMonitor.java",
117 "androidapp/src/org/appspot/apprtc/DirectRTCClient.java",
118 "androidapp/src/org/appspot/apprtc/HudFragment.java",
119 "androidapp/src/org/appspot/apprtc/PeerConnectionClient.java",
Natalie Chouinard65bbcab2019-12-23 22:02:25120 "androidapp/src/org/appspot/apprtc/RecordedAudioToFileController.java",
Sami Kalliomaki9c0c75b2016-06-29 12:55:00121 "androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java",
Qingsi Wanga4e72b72018-02-12 18:34:18122 "androidapp/src/org/appspot/apprtc/RtcEventLog.java",
Sami Kalliomaki9c0c75b2016-06-29 12:55:00123 "androidapp/src/org/appspot/apprtc/SettingsActivity.java",
124 "androidapp/src/org/appspot/apprtc/SettingsFragment.java",
125 "androidapp/src/org/appspot/apprtc/TCPChannelClient.java",
126 "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java",
127 "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java",
128 "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java",
129 "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java",
130 "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java",
Sami Kalliomaki9c0c75b2016-06-29 12:55:00131 ]
132
Mohamed Heikal3f94fc52020-09-01 19:51:12133 resources_package = "org.appspot.apprtc"
Sami Kalliomaki9c0c75b2016-06-29 12:55:00134 deps = [
Magnus Jedvertc1815cf2016-09-27 08:10:41135 ":AppRTCMobile_resources",
jianjun.zhuc0247402017-07-11 13:20:45136 "../rtc_base:base_java",
Sami Kalliomäki7d8f5942018-04-23 13:07:34137 "../sdk/android:audio_api_java",
Sami Kalliomäki725c1062018-03-28 08:49:18138 "../sdk/android:base_java",
Sami Kalliomäki1641ca32018-04-04 13:59:31139 "../sdk/android:camera_java",
Anders Carlsson1e06d882018-07-10 07:33:30140 "../sdk/android:default_video_codec_factory_java",
Sami Kalliomäki1641ca32018-04-04 13:59:31141 "../sdk/android:filevideo_java",
Sami Kalliomäki725c1062018-03-28 08:49:18142 "../sdk/android:hwcodecs_java",
Sami Kalliomäki7d8f5942018-04-23 13:07:34143 "../sdk/android:java_audio_device_module_java",
jianjun.zhuc0247402017-07-11 13:20:45144 "../sdk/android:libjingle_peerconnection_java",
145 "../sdk/android:libjingle_peerconnection_metrics_default_java",
Sami Kalliomäki1641ca32018-04-04 13:59:31146 "../sdk/android:peerconnection_java",
147 "../sdk/android:screencapturer_java",
148 "../sdk/android:surfaceviewrenderer_java",
Sami Kalliomäki725c1062018-03-28 08:49:18149 "../sdk/android:swcodecs_java",
Sami Kalliomäki1641ca32018-04-04 13:59:31150 "../sdk/android:video_api_java",
Sami Kalliomäki903bd412018-07-24 08:53:28151 "../sdk/android:video_java",
jianjun.zhuc0247402017-07-11 13:20:45152 "androidapp/third_party/autobanh:autobanh_java",
Peter Wen7bc331f2019-03-06 14:18:57153 "//third_party/android_deps:com_android_support_support_annotations_java",
Sami Kalliomaki9c0c75b2016-06-29 12:55:00154 ]
155 }
156
Magnus Jedvertc1815cf2016-09-27 08:10:41157 android_resources("AppRTCMobile_resources") {
kjellander1993b1d2017-03-06 08:29:21158 testonly = true
Andrew Grieved4262df2020-03-25 16:59:50159 sources = [
160 "androidapp/res/drawable-hdpi/disconnect.png",
161 "androidapp/res/drawable-hdpi/ic_action_full_screen.png",
162 "androidapp/res/drawable-hdpi/ic_action_return_from_full_screen.png",
163 "androidapp/res/drawable-hdpi/ic_launcher.png",
164 "androidapp/res/drawable-hdpi/ic_loopback_call.png",
165 "androidapp/res/drawable-ldpi/disconnect.png",
166 "androidapp/res/drawable-ldpi/ic_action_full_screen.png",
167 "androidapp/res/drawable-ldpi/ic_action_return_from_full_screen.png",
168 "androidapp/res/drawable-ldpi/ic_launcher.png",
169 "androidapp/res/drawable-ldpi/ic_loopback_call.png",
170 "androidapp/res/drawable-mdpi/disconnect.png",
171 "androidapp/res/drawable-mdpi/ic_action_full_screen.png",
172 "androidapp/res/drawable-mdpi/ic_action_return_from_full_screen.png",
173 "androidapp/res/drawable-mdpi/ic_launcher.png",
174 "androidapp/res/drawable-mdpi/ic_loopback_call.png",
175 "androidapp/res/drawable-xhdpi/disconnect.png",
176 "androidapp/res/drawable-xhdpi/ic_action_full_screen.png",
177 "androidapp/res/drawable-xhdpi/ic_action_return_from_full_screen.png",
178 "androidapp/res/drawable-xhdpi/ic_launcher.png",
179 "androidapp/res/drawable-xhdpi/ic_loopback_call.png",
180 "androidapp/res/layout/activity_call.xml",
181 "androidapp/res/layout/activity_connect.xml",
182 "androidapp/res/layout/fragment_call.xml",
183 "androidapp/res/layout/fragment_hud.xml",
184 "androidapp/res/menu/connect_menu.xml",
Andrew Grieved4262df2020-03-25 16:59:50185 "androidapp/res/values-v17/styles.xml",
186 "androidapp/res/values-v21/styles.xml",
Artem Titova4dfe242020-06-03 14:42:57187 "androidapp/res/values/arrays.xml",
188 "androidapp/res/values/strings.xml",
Andrew Grieved4262df2020-03-25 16:59:50189 "androidapp/res/xml/preferences.xml",
190 ]
Andrew Grieved4262df2020-03-25 16:59:50191
192 # Needed for Bazel converter.
Mohamed Heikal3f94fc52020-09-01 19:51:12193 custom_package = "org.appspot.apprtc"
Andrew Grieved4262df2020-03-25 16:59:50194 resource_dirs = [ "androidapp/res" ]
195 assert(resource_dirs != []) # Mark as used.
Sami Kalliomaki9c0c75b2016-06-29 12:55:00196 }
197
Sami Kalliomäkid54f5f52018-08-03 11:23:05198 rtc_instrumentation_test_apk("AppRTCMobile_test_apk") {
Magnus Jedvertc1815cf2016-09-27 08:10:41199 apk_name = "AppRTCMobileTest"
Sami Kalliomaki9c0c75b2016-06-29 12:55:00200 android_manifest = "androidtests/AndroidManifest.xml"
Jeremy Leconteb19cfee2020-06-25 20:57:49201 min_sdk_version = 21
Oleh Prypin4cbb4ef2019-06-18 15:09:51202 target_sdk_version = 21
Sami Kalliomaki9c0c75b2016-06-29 12:55:00203
Natalie Chouinard65bbcab2019-12-23 22:02:25204 sources = [
Patrik Höglunda8005cf2017-12-13 15:05:42205 "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java",
206 ]
Sami Kalliomaki9c0c75b2016-06-29 12:55:00207
Magnus Jedvertc1815cf2016-09-27 08:10:41208 apk_under_test = ":AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 12:55:00209
210 deps = [
Magnus Jedvertc1815cf2016-09-27 08:10:41211 ":AppRTCMobile_javalib",
Mirko Bonadei5e987422020-07-10 08:36:04212 "../sdk/android:base_java",
Artem Titova4dfe242020-06-03 14:42:57213 "../sdk/android:camera_java",
jianjun.zhuc0247402017-07-11 13:20:45214 "../sdk/android:libjingle_peerconnection_java",
Artem Titova4dfe242020-06-03 14:42:57215 "../sdk/android:peerconnection_java",
216 "../sdk/android:video_api_java",
Sami Kalliomäki903bd412018-07-24 08:53:28217 "../sdk/android:video_java",
sakalcb79d512017-01-11 14:21:26218 "//third_party/android_support_test_runner:runner_java",
219 "//third_party/junit",
Sami Kalliomaki9c0c75b2016-06-29 12:55:00220 ]
221 }
Sami Kalliomaki9c0c75b2016-06-29 12:55:00222}
tkchin2ddfdba2016-08-08 04:37:45223
224if (is_ios || (is_mac && target_cpu != "x86")) {
tkchin2ddfdba2016-08-08 04:37:45225 config("apprtc_common_config") {
Magnus Jedvertc1815cf2016-09-27 08:10:41226 include_dirs = [ "objc/AppRTCMobile/common" ]
tkchin2ddfdba2016-08-08 04:37:45227 }
228
Mirko Bonadei86d053c2019-10-17 19:32:04229 rtc_library("apprtc_common") {
kjellander1993b1d2017-03-06 08:29:21230 testonly = true
tkchin2ddfdba2016-08-08 04:37:45231 sources = [
Magnus Jedvertc1815cf2016-09-27 08:10:41232 "objc/AppRTCMobile/common/ARDUtilities.h",
233 "objc/AppRTCMobile/common/ARDUtilities.m",
tkchin2ddfdba2016-08-08 04:37:45234 ]
ehmaldonadoe9cc6862016-09-05 13:10:18235 public_configs = [ ":apprtc_common_config" ]
Mirko Bonadei19640aa2020-10-19 14:12:43236 deps = [ "../sdk:base_objc" ]
tkchin2ddfdba2016-08-08 04:37:45237 }
238
239 config("apprtc_signaling_config") {
Magnus Jedvertc1815cf2016-09-27 08:10:41240 include_dirs = [ "objc/AppRTCMobile" ]
Mirko Bonadei89327ff2019-07-30 09:38:08241 cflags_objc = [
242 # TODO(bugs.webrtc.org/10837): Remove this when usage of
243 # archivedDataWithRootObject will be removed.
244 "-Wno-unguarded-availability",
245 ]
tkchin2ddfdba2016-08-08 04:37:45246 }
247
Mirko Bonadei86d053c2019-10-17 19:32:04248 rtc_library("apprtc_signaling") {
kjellander1993b1d2017-03-06 08:29:21249 testonly = true
tkchin2ddfdba2016-08-08 04:37:45250 sources = [
Magnus Jedvertc1815cf2016-09-27 08:10:41251 "objc/AppRTCMobile/ARDAppClient+Internal.h",
252 "objc/AppRTCMobile/ARDAppClient.h",
253 "objc/AppRTCMobile/ARDAppClient.m",
254 "objc/AppRTCMobile/ARDAppEngineClient.h",
255 "objc/AppRTCMobile/ARDAppEngineClient.m",
256 "objc/AppRTCMobile/ARDBitrateTracker.h",
257 "objc/AppRTCMobile/ARDBitrateTracker.m",
sakalc522e752017-04-05 19:17:48258 "objc/AppRTCMobile/ARDCaptureController.h",
259 "objc/AppRTCMobile/ARDCaptureController.m",
Anders Carlsson358f2e02018-06-04 08:24:37260 "objc/AppRTCMobile/ARDExternalSampleCapturer.h",
261 "objc/AppRTCMobile/ARDExternalSampleCapturer.m",
Magnus Jedvertc1815cf2016-09-27 08:10:41262 "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
263 "objc/AppRTCMobile/ARDJoinResponse.h",
264 "objc/AppRTCMobile/ARDJoinResponse.m",
265 "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
266 "objc/AppRTCMobile/ARDMessageResponse.h",
267 "objc/AppRTCMobile/ARDMessageResponse.m",
268 "objc/AppRTCMobile/ARDRoomServerClient.h",
sakalc4adacf2017-03-28 08:22:48269 "objc/AppRTCMobile/ARDSettingsModel+Private.h",
270 "objc/AppRTCMobile/ARDSettingsModel.h",
271 "objc/AppRTCMobile/ARDSettingsModel.m",
272 "objc/AppRTCMobile/ARDSettingsStore.h",
273 "objc/AppRTCMobile/ARDSettingsStore.m",
Magnus Jedvertc1815cf2016-09-27 08:10:41274 "objc/AppRTCMobile/ARDSignalingChannel.h",
275 "objc/AppRTCMobile/ARDSignalingMessage.h",
276 "objc/AppRTCMobile/ARDSignalingMessage.m",
277 "objc/AppRTCMobile/ARDStatsBuilder.h",
278 "objc/AppRTCMobile/ARDStatsBuilder.m",
kthelgasoncc882af2017-01-13 13:59:46279 "objc/AppRTCMobile/ARDTURNClient+Internal.h",
Magnus Jedvertc1815cf2016-09-27 08:10:41280 "objc/AppRTCMobile/ARDTURNClient.h",
kthelgasoncc882af2017-01-13 13:59:46281 "objc/AppRTCMobile/ARDTURNClient.m",
Magnus Jedvertc1815cf2016-09-27 08:10:41282 "objc/AppRTCMobile/ARDWebSocketChannel.h",
283 "objc/AppRTCMobile/ARDWebSocketChannel.m",
284 "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
285 "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
286 "objc/AppRTCMobile/RTCIceServer+JSON.h",
287 "objc/AppRTCMobile/RTCIceServer+JSON.m",
Magnus Jedvertc1815cf2016-09-27 08:10:41288 "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
289 "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
tkchin2ddfdba2016-08-08 04:37:45290 ]
ehmaldonadoe9cc6862016-09-05 13:10:18291 public_configs = [ ":apprtc_signaling_config" ]
tkchin2ddfdba2016-08-08 04:37:45292 deps = [
293 ":apprtc_common",
294 ":socketrocket",
Mirko Bonadei19640aa2020-10-19 14:12:43295 "../sdk:base_objc",
296 "../sdk:default_codec_factory_objc",
297 "../sdk:file_logger_objc",
298 "../sdk:helpers_objc",
299 "../sdk:mediaconstraints_objc",
300 "../sdk:peerconnectionfactory_base_objc",
301 "../sdk:videocapture_objc",
302 "../sdk:videoframebuffer_objc",
303 "../sdk:videosource_objc",
tkchin2ddfdba2016-08-08 04:37:45304 ]
Sylvain Defresnec7f0dff2020-07-03 08:19:30305 frameworks = [
Kári Tristan Helgason8a1e35c2019-03-07 09:44:26306 "CoreMedia.framework",
307 "QuartzCore.framework",
308 ]
tkchin2ddfdba2016-08-08 04:37:45309 }
310
311 if (is_ios) {
Mirko Bonadei86d053c2019-10-17 19:32:04312 rtc_library("AppRTCMobile_lib") {
Mirko Bonadeicbaaaed2018-02-19 14:14:04313 # iOS must use WebRTC.framework which is dynamically linked.
kjellander1993b1d2017-03-06 08:29:21314 testonly = true
tkchin2ddfdba2016-08-08 04:37:45315 sources = [
Patrik Höglund49acb1e2018-01-02 13:41:54316 "objc/AppRTCMobile/ios/ARDAppDelegate.h",
Magnus Jedvertc1815cf2016-09-27 08:10:41317 "objc/AppRTCMobile/ios/ARDAppDelegate.m",
Daniela012b56b2017-11-15 12:15:24318 "objc/AppRTCMobile/ios/ARDFileCaptureController.h",
319 "objc/AppRTCMobile/ios/ARDFileCaptureController.m",
Magnus Jedvertc1815cf2016-09-27 08:10:41320 "objc/AppRTCMobile/ios/ARDMainView.h",
321 "objc/AppRTCMobile/ios/ARDMainView.m",
322 "objc/AppRTCMobile/ios/ARDMainViewController.h",
323 "objc/AppRTCMobile/ios/ARDMainViewController.m",
denicijad17d5362016-11-02 09:56:09324 "objc/AppRTCMobile/ios/ARDSettingsViewController.h",
325 "objc/AppRTCMobile/ios/ARDSettingsViewController.m",
Magnus Jedvertc1815cf2016-09-27 08:10:41326 "objc/AppRTCMobile/ios/ARDStatsView.h",
327 "objc/AppRTCMobile/ios/ARDStatsView.m",
328 "objc/AppRTCMobile/ios/ARDVideoCallView.h",
329 "objc/AppRTCMobile/ios/ARDVideoCallView.m",
330 "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
331 "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
Anders Carlsson6bf43d22017-10-16 11:51:43332 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.h",
333 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.m",
Magnus Jedvertc1815cf2016-09-27 08:10:41334 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
335 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
denicija77bfd7c2016-11-15 08:41:26336 ]
denicija77bfd7c2016-11-15 08:41:26337
Anders Carlsson96fccfe2019-02-21 15:11:40338 configs += [ "..:common_objc" ]
339
denicija77bfd7c2016-11-15 08:41:26340 deps = [
341 ":apprtc_common",
342 ":apprtc_signaling",
Mirko Bonadei19640aa2020-10-19 14:12:43343 "../sdk:audio_session_objc",
344 "../sdk:base_objc",
345 "../sdk:helpers_objc",
346 "../sdk:mediaconstraints_objc",
347 "../sdk:peerconnectionfactory_base_objc",
348 "../sdk:peerconnectionfactory_base_objc",
349 "../sdk:ui_objc",
350 "../sdk:videocapture_objc",
351 "../sdk:videocodec_objc",
denicija77bfd7c2016-11-15 08:41:26352 ]
Mirko Bonadei19640aa2020-10-19 14:12:43353 if (rtc_use_metal_rendering) {
354 deps += [ "../sdk:metal_objc" ]
355 }
Kári Tristan Helgason8a1e35c2019-03-07 09:44:26356
Sylvain Defresnec7f0dff2020-07-03 08:19:30357 frameworks = [ "AVFoundation.framework" ]
denicija77bfd7c2016-11-15 08:41:26358 }
359
360 ios_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 08:29:21361 testonly = true
Mirko Bonadeiccbe95f2020-01-21 11:10:10362 sources = [ "objc/AppRTCMobile/ios/main.m" ]
tkchin2ddfdba2016-08-08 04:37:45363
Magnus Jedvertc1815cf2016-09-27 08:10:41364 info_plist = "objc/AppRTCMobile/ios/Info.plist"
tkchin2ddfdba2016-08-08 04:37:45365
denicija77bfd7c2016-11-15 08:41:26366 configs += [ "..:common_config" ]
tkchin2ddfdba2016-08-08 04:37:45367 public_configs = [ "..:common_inherited_config" ]
368
369 deps = [
Magnus Jedvertc1815cf2016-09-27 08:10:41370 ":AppRTCMobile_ios_bundle_data",
denicija77bfd7c2016-11-15 08:41:26371 ":AppRTCMobile_lib",
Mirko Bonadei1a339c32017-12-14 12:06:10372 "../sdk:framework_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:29373 "../sdk:ios_framework_bundle",
tkchin2ddfdba2016-08-08 04:37:45374 ]
375
Anders Carlsson358f2e02018-06-04 08:24:37376 if (rtc_apprtcmobile_broadcast_extension) {
377 deps += [
378 ":AppRTCMobileBroadcastSetupUI_extension_bundle",
379 ":AppRTCMobileBroadcastUpload_extension_bundle",
380 ]
381 }
382
tkchin2ddfdba2016-08-08 04:37:45383 if (target_cpu == "x86") {
Artem Titov94b57c02019-03-21 12:35:10384 deps += [ "//testing/iossim" ]
tkchin2ddfdba2016-08-08 04:37:45385 }
386 }
387
Anders Carlsson358f2e02018-06-04 08:24:37388 if (rtc_apprtcmobile_broadcast_extension) {
389 bundle_data("AppRTCMobileBroadcastUpload_extension_bundle") {
390 testonly = true
Artem Titova4dfe242020-06-03 14:42:57391 public_deps = [ # no-presubmit-check TODO(webrtc:8603)
392 ":AppRTCMobileBroadcastUpload", # prevent code format
393 ]
Mirko Bonadeiccbe95f2020-01-21 11:10:10394 sources = [ "$root_out_dir/AppRTCMobileBroadcastUpload.appex" ]
395 outputs = [ "{{bundle_contents_dir}}/Plugins/{{source_file_part}}" ]
Anders Carlsson358f2e02018-06-04 08:24:37396 }
397
398 bundle_data("AppRTCMobileBroadcastSetupUI_extension_bundle") {
399 testonly = true
Artem Titova4dfe242020-06-03 14:42:57400 public_deps = [ # no-presubmit-check TODO(webrtc:8603)
401 ":AppRTCMobileBroadcastSetupUI", # prevent code format
402 ]
Mirko Bonadeiccbe95f2020-01-21 11:10:10403 sources = [ "$root_out_dir/AppRTCMobileBroadcastSetupUI.appex" ]
404 outputs = [ "{{bundle_contents_dir}}/Plugins/{{source_file_part}}" ]
Anders Carlsson358f2e02018-06-04 08:24:37405 }
406
Mirko Bonadei86d053c2019-10-17 19:32:04407 rtc_library("AppRTCMobileBroadcastUpload_lib") {
Anders Carlsson358f2e02018-06-04 08:24:37408 testonly = true
409 sources = [
410 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.h",
411 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.m",
412 ]
413
414 deps = [
Anders Carlsson358f2e02018-06-04 08:24:37415 ":apprtc_signaling",
Anders Carlsson7bca8ca2018-08-30 07:30:29416 "../sdk:framework_objc+link",
417 "../sdk:ios_framework_bundle",
Anders Carlsson358f2e02018-06-04 08:24:37418 ]
419
Sylvain Defresnec7f0dff2020-07-03 08:19:30420 frameworks = [ "ReplayKit.framework" ]
Anders Carlsson358f2e02018-06-04 08:24:37421 }
422
423 ios_appex_bundle("AppRTCMobileBroadcastUpload") {
424 testonly = true
425 configs += [ "..:common_config" ]
426 public_configs = [ "..:common_inherited_config" ]
427
428 info_plist = "objc/AppRTCMobile/ios/broadcast_extension/BroadcastUploadInfo.plist"
429
430 deps = [
431 ":AppRTCMobileBroadcastUpload_lib",
432 "../sdk:framework_objc",
433 ]
434 }
435
436 ios_appex_bundle("AppRTCMobileBroadcastSetupUI") {
437 sources = [
438 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.h",
439 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.m",
440 ]
441
442 info_plist = "objc/AppRTCMobile/ios/broadcast_extension/BroadcastSetupUIInfo.plist"
443
Sylvain Defresnec7f0dff2020-07-03 08:19:30444 frameworks = [ "ReplayKit.framework" ]
Anders Carlsson358f2e02018-06-04 08:24:37445
Mirko Bonadeiccbe95f2020-01-21 11:10:10446 deps = [ ":AppRTCMobile_ios_bundle_data" ]
Anders Carlsson358f2e02018-06-04 08:24:37447 }
448 }
449
Magnus Jedvertc1815cf2016-09-27 08:10:41450 bundle_data("AppRTCMobile_ios_bundle_data") {
tkchin2ddfdba2016-08-08 04:37:45451 sources = [
Magnus Jedvertc1815cf2016-09-27 08:10:41452 "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
Daniela012b56b2017-11-15 12:15:24453
454 # Sample video taken from https://media.xiph.org/video/derf/
455 "objc/AppRTCMobile/ios/resources/foreman.mp4",
Magnus Jedvertc1815cf2016-09-27 08:10:41456 "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
457 "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
458 "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
459 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
460 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
461 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
462 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
denicija6d6762c2016-10-28 11:53:16463 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png",
464 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png",
Magnus Jedvertc1815cf2016-09-27 08:10:41465 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
466 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
467 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
468 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
469 "objc/AppRTCMobile/ios/resources/mozart.mp3",
anderscb5ed9052017-08-15 11:07:12470 "objc/Icon-120.png",
471 "objc/Icon-180.png",
tkchin2ddfdba2016-08-08 04:37:45472 "objc/Icon.png",
473 ]
Mirko Bonadeiccbe95f2020-01-21 11:10:10474 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
tkchin2ddfdba2016-08-08 04:37:45475 }
Anders Carlsson73119182018-03-15 08:41:03476
Mirko Bonadei86d053c2019-10-17 19:32:04477 rtc_library("ObjCNativeAPIDemo_lib") {
Anders Carlsson73119182018-03-15 08:41:03478 testonly = true
479 sources = [
480 "objcnativeapi/objc/NADAppDelegate.h",
481 "objcnativeapi/objc/NADAppDelegate.m",
482 "objcnativeapi/objc/NADViewController.h",
483 "objcnativeapi/objc/NADViewController.mm",
Steve Anton10542f22019-01-11 17:11:00484 "objcnativeapi/objc/objc_call_client.h",
485 "objcnativeapi/objc/objc_call_client.mm",
Anders Carlsson73119182018-03-15 08:41:03486 ]
487
Anders Carlsson73119182018-03-15 08:41:03488 deps = [
489 "../api:libjingle_peerconnection_api",
Mirko Bonadeid9708072019-01-25 19:26:48490 "../api:scoped_refptr",
Anders Carlsson73119182018-03-15 08:41:03491 "../api/audio_codecs:builtin_audio_decoder_factory",
492 "../api/audio_codecs:builtin_audio_encoder_factory",
Danil Chapovalov4ba04b72019-06-26 13:49:47493 "../api/rtc_event_log:rtc_event_log_factory",
Danil Chapovalovaaa11432019-05-17 11:20:14494 "../api/task_queue:default_task_queue_factory",
Anders Carlsson73119182018-03-15 08:41:03495 "../media:rtc_audio_video",
Artem Titov94b57c02019-03-21 12:35:10496 "../modules/audio_processing",
Alessio Bazzicab768e882018-11-07 14:29:54497 "../modules/audio_processing:api",
Anders Carlsson73119182018-03-15 08:41:03498 "../pc:libjingle_peerconnection",
Artem Titov94b57c02019-03-21 12:35:10499 "../rtc_base",
Markus Handell06d034f2020-07-07 07:17:56500 "../rtc_base/synchronization:mutex",
Anders Carlsson7bca8ca2018-08-30 07:30:29501 "../sdk:base_objc",
Anders Carlsson73119182018-03-15 08:41:03502 "../sdk:default_codec_factory_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:29503 "../sdk:helpers_objc",
Anders Carlsson73119182018-03-15 08:41:03504 "../sdk:native_api",
505 "../sdk:ui_objc",
Anders Carlsson7bca8ca2018-08-30 07:30:29506 "../sdk:videocapture_objc",
Anders Carlsson73119182018-03-15 08:41:03507 "../sdk:videotoolbox_objc",
Anders Carlsson73119182018-03-15 08:41:03508 ]
509
510 if (current_cpu == "arm64") {
511 deps += [ "../sdk:metal_objc" ]
512 }
513 }
514
515 ios_app_bundle("ObjCNativeAPIDemo") {
516 testonly = true
Mirko Bonadeiccbe95f2020-01-21 11:10:10517 sources = [ "objcnativeapi/objc/main.m" ]
Anders Carlsson73119182018-03-15 08:41:03518
519 info_plist = "objcnativeapi/Info.plist"
520
521 configs += [ "..:common_config" ]
522 public_configs = [ "..:common_inherited_config" ]
523
Mirko Bonadeiccbe95f2020-01-21 11:10:10524 deps = [ ":ObjCNativeAPIDemo_lib" ]
Anders Carlsson73119182018-03-15 08:41:03525
526 if (target_cpu == "x86") {
Artem Titov94b57c02019-03-21 12:35:10527 deps += [ "//testing/iossim" ]
Anders Carlsson73119182018-03-15 08:41:03528 }
529 }
tkchin2ddfdba2016-08-08 04:37:45530 }
531
532 if (is_mac) {
Mirko Bonadei86d053c2019-10-17 19:32:04533 rtc_library("AppRTCMobile_lib") {
kjellander1993b1d2017-03-06 08:29:21534 testonly = true
tkchin2ddfdba2016-08-08 04:37:45535 sources = [
Magnus Jedvertc1815cf2016-09-27 08:10:41536 "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
537 "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
538 "objc/AppRTCMobile/mac/APPRTCViewController.h",
539 "objc/AppRTCMobile/mac/APPRTCViewController.m",
tkchin2ddfdba2016-08-08 04:37:45540 ]
jianjun.zhuc0247402017-07-11 13:20:45541 configs += [ "..:common_objc" ]
tkchin2ddfdba2016-08-08 04:37:45542 deps = [
543 ":apprtc_common",
544 ":apprtc_signaling",
Mirko Bonadei19640aa2020-10-19 14:12:43545 "../sdk:base_objc",
546 "../sdk:helpers_objc",
547 "../sdk:mediaconstraints_objc",
548 "../sdk:metal_objc",
549 "../sdk:peerconnectionfactory_base_objc",
550 "../sdk:peerconnectionfactory_base_objc",
551 "../sdk:ui_objc",
552 "../sdk:videocapture_objc",
553 "../sdk:videocodec_objc",
tkchin2ddfdba2016-08-08 04:37:45554 ]
555 }
556
Magnus Jedvertc1815cf2016-09-27 08:10:41557 mac_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 08:29:21558 testonly = true
Magnus Jedvertc1815cf2016-09-27 08:10:41559 output_name = "AppRTCMobile"
tkchin2ddfdba2016-08-08 04:37:45560
Mirko Bonadeiccbe95f2020-01-21 11:10:10561 sources = [ "objc/AppRTCMobile/mac/main.m" ]
tkchin2ddfdba2016-08-08 04:37:45562
563 public_configs = [ "..:common_inherited_config" ]
564
Magnus Jedvertc1815cf2016-09-27 08:10:41565 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin2ddfdba2016-08-08 04:37:45566
Sylvain Defresnec7f0dff2020-07-03 08:19:30567 frameworks = [ "AppKit.framework" ]
tkchin2ddfdba2016-08-08 04:37:45568
Anders Carlsson24d8ec32018-12-10 13:04:12569 ldflags = [
570 "-rpath",
571 "@executable_path/../Frameworks",
572 ]
573
tkchin2ddfdba2016-08-08 04:37:45574 deps = [
denicija77bfd7c2016-11-15 08:41:26575 ":AppRTCMobile_lib",
Anders Carlsson7bca8ca2018-08-30 07:30:29576 "../sdk:mac_framework_bundle",
577 "../sdk:mac_framework_objc+link",
tkchin2ddfdba2016-08-08 04:37:45578 ]
579 }
580 }
581
582 config("socketrocket_include_config") {
Magnus Jedvertc1815cf2016-09-27 08:10:41583 include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
tkchin2ddfdba2016-08-08 04:37:45584 }
585
586 config("socketrocket_warning_config") {
587 # GN orders flags on a target before flags from configs. The default config
588 # adds these flags so to cancel them out they need to come from a config and
589 # cannot be on the target directly.
590 cflags = [
591 "-Wno-deprecated-declarations",
592 "-Wno-nonnull",
tkchin2ddfdba2016-08-08 04:37:45593 "-Wno-semicolon-before-method-body",
kthelgasone47de1a2017-02-24 09:56:01594 "-Wno-unused-variable",
tkchin2ddfdba2016-08-08 04:37:45595 ]
596
henrika27d8b612016-09-21 11:13:00597 cflags_objc = [
598 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
599 "-Wno-objc-missing-property-synthesis",
henrika27d8b612016-09-21 11:13:00600 ]
tkchin2ddfdba2016-08-08 04:37:45601 }
602
Mirko Bonadei86d053c2019-10-17 19:32:04603 rtc_library("socketrocket") {
kjellander1993b1d2017-03-06 08:29:21604 testonly = true
tkchin2ddfdba2016-08-08 04:37:45605 sources = [
Magnus Jedvertc1815cf2016-09-27 08:10:41606 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
607 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
tkchin2ddfdba2016-08-08 04:37:45608 ]
kthelgasonc0977102017-04-24 07:57:16609 configs += [ ":socketrocket_warning_config" ]
ehmaldonadoe9cc6862016-09-05 13:10:18610 public_configs = [ ":socketrocket_include_config" ]
tkchin2ddfdba2016-08-08 04:37:45611
Sylvain Defresnec7f0dff2020-07-03 08:19:30612 libs = [ "icucore" ]
613 frameworks = [
tkchin2ddfdba2016-08-08 04:37:45614 "CFNetwork.framework",
Oleh Prypinb3f78de2019-07-18 20:25:48615 "Security.framework",
tkchin2ddfdba2016-08-08 04:37:45616 ]
617 }
adam.fedorbcc5d872016-11-07 22:53:28618
619 if (rtc_include_tests) {
kthelgason4065a5762017-02-14 12:58:56620 # TODO(kthelgason): compile xctests on mac when chromium supports it.
621 if (is_ios) {
Mirko Bonadei86d053c2019-10-17 19:32:04622 rtc_library("apprtcmobile_test_sources") {
Mirko Bonadeicbaaaed2018-02-19 14:14:04623 # iOS must use WebRTC.framework which is dynamically linked.
kjellander1993b1d2017-03-06 08:29:21624 testonly = true
kthelgason4065a5762017-02-14 12:58:56625 include_dirs = [
626 "objc/AppRTCMobile",
627 "objc/AppRTCMobile/ios",
628 ]
kthelgason4065a5762017-02-14 12:58:56629 sources = [
630 "objc/AppRTCMobile/tests/ARDAppClient_xctest.mm",
Daniela012b56b2017-11-15 12:15:24631 "objc/AppRTCMobile/tests/ARDFileCaptureController_xctest.mm",
kthelgason4065a5762017-02-14 12:58:56632 "objc/AppRTCMobile/tests/ARDSettingsModel_xctest.mm",
633 ]
kjellander1993b1d2017-03-06 08:29:21634 deps = [
kthelgason4065a5762017-02-14 12:58:56635 ":AppRTCMobile_lib",
Mirko Bonadeicbaaaed2018-02-19 14:14:04636 ":apprtc_signaling",
Artem Titov94b57c02019-03-21 12:35:10637 "../rtc_base",
Mirko Bonadei19640aa2020-10-19 14:12:43638 "../sdk:mediaconstraints_objc",
639 "../sdk:peerconnectionfactory_base_objc",
640 "../sdk:videocapture_objc",
kthelgason4065a5762017-02-14 12:58:56641 "//build/config/ios:xctest",
642 "//third_party/ocmock",
643 ]
adam.fedorbcc5d872016-11-07 22:53:28644 }
645
Mirko Bonadeiaef8a212020-09-16 13:09:53646 rtc_test("apprtcmobile_tests") {
647 is_xctest = true
kthelgason4065a5762017-02-14 12:58:56648 info_plist = "objc/AppRTCMobile/ios/Info.plist"
Mirko Bonadeiccbe95f2020-01-21 11:10:10649 sources = [ "objc/AppRTCMobile/tests/main.mm" ]
kthelgason4065a5762017-02-14 12:58:56650 deps = [
Mirko Bonadeicbaaaed2018-02-19 14:14:04651 ":AppRTCMobile_lib",
kthelgason4065a5762017-02-14 12:58:56652 ":apprtcmobile_test_sources",
Mirko Bonadei1a339c32017-12-14 12:06:10653 "../sdk:framework_objc",
Artem Titarenko34fc3462018-11-06 11:29:29654 "//test:test_support",
kthelgason4065a5762017-02-14 12:58:56655 ]
656 ldflags = [ "-all_load" ]
657 }
adam.fedorbcc5d872016-11-07 22:53:28658 }
659 }
tkchin2ddfdba2016-08-08 04:37:45660}
kthelgason0727f152016-08-08 16:03:23661
Hidehiko Abef264e702020-09-10 09:10:11662if (is_linux || is_chromeos || is_win) {
ehmaldonado38a21322016-09-02 11:10:34663 rtc_executable("peerconnection_client") {
kjellander1993b1d2017-03-06 08:29:21664 testonly = true
kthelgason0727f152016-08-08 16:03:23665 sources = [
666 "peerconnection/client/conductor.cc",
667 "peerconnection/client/conductor.h",
668 "peerconnection/client/defaults.cc",
669 "peerconnection/client/defaults.h",
670 "peerconnection/client/peer_connection_client.cc",
671 "peerconnection/client/peer_connection_client.h",
672 ]
ehmaldonado7a2ce0b2016-09-05 08:35:44673
Patrik Höglundb5b5bce2017-11-13 09:19:58674 deps = [
Yves Gerey3e707812018-11-28 15:47:49675 "../api:audio_options_api",
Mirko Bonadei2ff3f492018-11-22 08:00:13676 "../api:create_peerconnection_factory",
Mirko Bonadei34814c72018-01-11 09:13:56677 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 12:30:41678 "../api:media_stream_interface",
Mirko Bonadeid9708072019-01-25 19:26:48679 "../api:scoped_refptr",
Yves Gerey3e707812018-11-28 15:47:49680 "../api/audio:audio_mixer_api",
681 "../api/audio_codecs:audio_codecs_api",
Ilya Nikolaevskiy38e9b062020-10-08 14:36:33682 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 10:59:38683 "../api/video:video_rtp_headers",
Yves Gerey3e707812018-11-28 15:47:49684 "../api/video_codecs:video_codecs_api",
685 "../media:rtc_media_base",
686 "../p2p:rtc_p2p",
Harald Alvestrand445e6b02020-09-29 14:21:47687 "../pc:video_track_source",
Patrik Höglunda8005cf2017-12-13 15:05:42688 "../rtc_base:checks",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01689 "../rtc_base:net_helpers",
690 "../rtc_base:threading",
Artem Titove41c4332018-07-25 13:04:28691 "../rtc_base/third_party/sigslot",
Bjorn Terelius3e676762018-10-29 14:26:27692 "../system_wrappers:field_trial",
693 "../test:field_trial",
Kári Tristan Helgasonede7cb22019-03-06 09:34:09694 "../test:platform_video_capturer",
Tommi25eb47c2019-08-29 14:39:05695 "../test:rtp_test_utils",
Niels Möllerb76be9a2018-12-20 15:28:23696 "//third_party/abseil-cpp/absl/memory",
Yves Gerey3e707812018-11-28 15:47:49697 "//third_party/abseil-cpp/absl/types:optional",
Patrik Höglundb5b5bce2017-11-13 09:19:58698 ]
kthelgason0727f152016-08-08 16:03:23699 if (is_win) {
700 sources += [
Steve Anton10542f22019-01-11 17:11:00701 "peerconnection/client/flag_defs.h",
kthelgason0727f152016-08-08 16:03:23702 "peerconnection/client/main.cc",
703 "peerconnection/client/main_wnd.cc",
704 "peerconnection/client/main_wnd.h",
705 ]
kthelgason0727f152016-08-08 16:03:23706 configs += [ "//build/config/win:windowed" ]
Tommi16db7ff2020-09-26 09:57:26707 deps += [
708 "../media:rtc_media_base",
709 "../rtc_base:win32",
710 ]
kthelgason0727f152016-08-08 16:03:23711 }
Hidehiko Abef264e702020-09-10 09:10:11712 if (is_linux || is_chromeos) {
kthelgason0727f152016-08-08 16:03:23713 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 06:28:27718 cflags = [ "-Wno-deprecated-declarations" ]
kthelgason0727f152016-08-08 16:03:23719 libs = [
720 "X11",
721 "Xcomposite",
722 "Xext",
723 "Xrender",
724 ]
thomasandersonef16e992016-12-13 10:57:43725 deps += [ "//build/config/linux/gtk" ]
kthelgason0727f152016-08-08 16:03:23726 }
kjellander1993b1d2017-03-06 08:29:21727
728 deps += [
Niels Möller8366e172018-02-14 11:20:13729 "../api:libjingle_peerconnection_api",
Karl Wiberg1b0eae32017-10-17 12:48:54730 "../api/audio_codecs:builtin_audio_decoder_factory",
731 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 09:15:30732 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 10:59:38733 "../api/video:video_rtp_headers",
Anders Carlsson67537952018-05-03 09:28:29734 "../api/video_codecs:builtin_video_decoder_factory",
735 "../api/video_codecs:builtin_video_encoder_factory",
Mirko Bonadei75baa492018-01-11 16:07:30736 "../media:rtc_audio_video",
Artem Titov94b57c02019-03-21 12:35:10737 "../modules/audio_device",
738 "../modules/audio_processing",
Alessio Bazzicab768e882018-11-07 14:29:54739 "../modules/audio_processing:api",
jianjun.zhuc0247402017-07-11 13:20:45740 "../modules/video_capture:video_capture_module",
741 "../pc:libjingle_peerconnection",
Niels Möllerb76be9a2018-12-20 15:28:23742 "../pc:peerconnection",
Artem Titov94b57c02019-03-21 12:35:10743 "../rtc_base",
ehmaldonadof6a861a2017-07-19 17:40:47744 "../rtc_base:rtc_base_approved",
745 "../rtc_base:rtc_json",
Niels Möllerb76be9a2018-12-20 15:28:23746 "../test:video_test_common",
Mirko Bonadei0be40bf2019-07-16 16:40:05747 "//third_party/abseil-cpp/absl/flags:flag",
748 "//third_party/abseil-cpp/absl/flags:parse",
kjellander1993b1d2017-03-06 08:29:21749 "//third_party/libyuv",
kjellander1993b1d2017-03-06 08:29:21750 ]
kthelgason0727f152016-08-08 16:03:23751 }
kjellanderd4626e52016-09-07 09:33:01752
ehmaldonado38a21322016-09-02 11:10:34753 rtc_executable("peerconnection_server") {
kjellander1993b1d2017-03-06 08:29:21754 testonly = true
kthelgason0727f152016-08-08 16:03:23755 sources = [
756 "peerconnection/server/data_socket.cc",
757 "peerconnection/server/data_socket.h",
758 "peerconnection/server/main.cc",
759 "peerconnection/server/peer_channel.cc",
760 "peerconnection/server/peer_channel.h",
761 "peerconnection/server/utils.cc",
762 "peerconnection/server/utils.h",
763 ]
764 deps = [
ehmaldonadof6a861a2017-07-19 17:40:47765 "../rtc_base:rtc_base_approved",
Bjorn Terelius3e676762018-10-29 14:26:27766 "../system_wrappers:field_trial",
767 "../test:field_trial",
Mirko Bonadei04cffe32019-06-25 13:43:23768 "//third_party/abseil-cpp/absl/flags:flag",
769 "//third_party/abseil-cpp/absl/flags:parse",
Mirko Bonadei76c89da2019-07-19 10:12:14770 "//third_party/abseil-cpp/absl/flags:usage",
kthelgason0727f152016-08-08 16:03:23771 ]
kthelgason0727f152016-08-08 16:03:23772 }
ehmaldonado38a21322016-09-02 11:10:34773 rtc_executable("turnserver") {
kjellander1993b1d2017-03-06 08:29:21774 testonly = true
Mirko Bonadeiccbe95f2020-01-21 11:10:10775 sources = [ "turnserver/turnserver_main.cc" ]
kthelgason0727f152016-08-08 16:03:23776 deps = [
Niels Möller9862c2e2018-10-30 11:20:03777 ":read_auth_file",
Niels Möllera1342042018-11-08 15:47:14778 "../p2p:p2p_server_utils",
jianjun.zhuc0247402017-07-11 13:20:45779 "../p2p:rtc_p2p",
780 "../pc:rtc_pc",
Artem Titov94b57c02019-03-21 12:35:10781 "../rtc_base",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01782 "../rtc_base:ip_address",
ehmaldonadof6a861a2017-07-19 17:40:47783 "../rtc_base:rtc_base_approved",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01784 "../rtc_base:socket_address",
785 "../rtc_base:socket_server",
786 "../rtc_base:threading",
kthelgason0727f152016-08-08 16:03:23787 ]
kthelgason0727f152016-08-08 16:03:23788 }
ehmaldonado38a21322016-09-02 11:10:34789 rtc_executable("stunserver") {
kjellander1993b1d2017-03-06 08:29:21790 testonly = true
Mirko Bonadeiccbe95f2020-01-21 11:10:10791 sources = [ "stunserver/stunserver_main.cc" ]
kthelgason0727f152016-08-08 16:03:23792 deps = [
Niels Möllera1342042018-11-08 15:47:14793 "../p2p:p2p_server_utils",
jianjun.zhuc0247402017-07-11 13:20:45794 "../p2p:rtc_p2p",
795 "../pc:rtc_pc",
Artem Titov94b57c02019-03-21 12:35:10796 "../rtc_base",
ehmaldonadof6a861a2017-07-19 17:40:47797 "../rtc_base:rtc_base_approved",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01798 "../rtc_base:socket_address",
799 "../rtc_base:socket_server",
800 "../rtc_base:threading",
kthelgason0727f152016-08-08 16:03:23801 ]
kthelgason0727f152016-08-08 16:03:23802 }
803}
charujainaca3a242016-11-01 10:09:15804
qiangchen42f96d52017-08-09 00:08:03805if (is_win || is_android) {
gyzhouad7cad82017-05-11 23:10:03806 rtc_shared_library("webrtc_unity_plugin") {
807 testonly = true
808 sources = [
809 "unityplugin/simple_peer_connection.cc",
810 "unityplugin/simple_peer_connection.h",
811 "unityplugin/unity_plugin_apis.cc",
812 "unityplugin/unity_plugin_apis.h",
gyzhoub38f3862017-07-25 23:04:31813 "unityplugin/video_observer.cc",
814 "unityplugin/video_observer.h",
gyzhouad7cad82017-05-11 23:10:03815 ]
qiangchen42f96d52017-08-09 00:08:03816
817 if (is_android) {
818 sources += [
Steve Anton10542f22019-01-11 17:11:00819 "unityplugin/class_reference_holder.cc",
820 "unityplugin/class_reference_holder.h",
qiangchen42f96d52017-08-09 00:08:03821 "unityplugin/jni_onload.cc",
822 ]
Qiang Chen43fb9122017-12-20 18:47:36823 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ]
qiangchen42f96d52017-08-09 00:08:03824 }
825
qiangchen42f96d52017-08-09 00:08:03826 if (is_win) {
Mirko Bonadeif957dd92018-07-11 08:47:42827 configs += [ "//build/config/win:windowed" ]
qiangchen42f96d52017-08-09 00:08:03828 }
gyzhouad7cad82017-05-11 23:10:03829 deps = [
Mirko Bonadei2ff3f492018-11-22 08:00:13830 "../api:create_peerconnection_factory",
Mirko Bonadei34814c72018-01-11 09:13:56831 "../api:libjingle_peerconnection_api",
Niels Möllere942b142019-09-17 12:30:41832 "../api:media_stream_interface",
Qiang Chen51e20462017-12-05 19:11:21833 "../api/audio_codecs:builtin_audio_decoder_factory",
834 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 09:15:30835 "../api/video:video_frame",
Chen Xing5d24b162019-06-10 10:59:38836 "../api/video:video_rtp_headers",
Mirko Bonadei75baa492018-01-11 16:07:30837 "../media:rtc_audio_video",
Anders Carlssona114c882018-01-04 14:10:22838 "../media:rtc_internal_video_codecs",
jianjun.zhuc0247402017-07-11 13:20:45839 "../media:rtc_media",
840 "../media:rtc_media_base",
Artem Titov94b57c02019-03-21 12:35:10841 "../modules/audio_device",
842 "../modules/audio_processing",
Alessio Bazzicab768e882018-11-07 14:29:54843 "../modules/audio_processing:api",
jianjun.zhuc0247402017-07-11 13:20:45844 "../modules/video_capture:video_capture_module",
845 "../pc:libjingle_peerconnection",
Niels Möller0a595352019-01-02 14:12:38846 "../pc:peerconnection",
Harald Alvestrand445e6b02020-09-29 14:21:47847 "../pc:video_track_source",
Artem Titov94b57c02019-03-21 12:35:10848 "../rtc_base",
Kári Tristan Helgasonede7cb22019-03-06 09:34:09849 "../test:platform_video_capturer",
Niels Möller0a595352019-01-02 14:12:38850 "../test:video_test_common",
Karl Wiberg918f50c2018-07-05 09:40:33851 "//third_party/abseil-cpp/absl/memory",
gyzhouad7cad82017-05-11 23:10:03852 ]
qiangchen42f96d52017-08-09 00:08:03853 if (is_android) {
George Zhou2770c3d2018-03-07 17:58:54854 deps += [
Artem Titov94b57c02019-03-21 12:35:10855 "../modules/utility",
George Zhou2770c3d2018-03-07 17:58:54856 "../sdk/android:libjingle_peerconnection_jni",
857 ]
qiangchen42f96d52017-08-09 00:08:03858 }
859 }
860}
861
862if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33863 rtc_android_library("webrtc_unity_java") {
Mirko Bonadeiccbe95f2020-01-21 11:10:10864 sources = [ "unityplugin/java/src/org/webrtc/UnityUtility.java" ]
qiangchen42f96d52017-08-09 00:08:03865 deps = [
866 "../rtc_base:base_java",
Artem Titarenko69540f42018-12-10 11:30:46867 "../sdk/android:camera_java",
qiangchen42f96d52017-08-09 00:08:03868 "../sdk/android:libjingle_peerconnection_java",
Artem Titarenko69540f42018-12-10 11:30:46869 "../sdk/android:peerconnection_java",
Mirko Bonadei5e987422020-07-10 08:36:04870 "../sdk/android:video_api_java",
Artem Titarenko69540f42018-12-10 11:30:46871 "../sdk/android:video_java",
Peter Wen7bc331f2019-03-06 14:18:57872 "//third_party/android_deps:com_android_support_support_annotations_java",
qiangchen42f96d52017-08-09 00:08:03873 ]
874 }
875
876 dist_jar("libwebrtc_unity") {
877 _target_dir_name = get_label_info(":$target_name", "dir")
878 output = "${root_out_dir}/lib.java${_target_dir_name}/${target_name}.jar"
George Zhou2770c3d2018-03-07 17:58:54879 direct_deps_only = false
qiangchen42f96d52017-08-09 00:08:03880 use_interface_jars = false
George Zhou2770c3d2018-03-07 17:58:54881 use_unprocessed_jars = false
Oleh Prypin86021d92017-09-24 20:29:06882 requires_android = true
qiangchen42f96d52017-08-09 00:08:03883 deps = [
884 ":webrtc_unity_java",
qiangchen42f96d52017-08-09 00:08:03885 "../rtc_base:base_java",
886 "../sdk/android:libjingle_peerconnection_java",
887 "../sdk/android:libjingle_peerconnection_metrics_default_java",
Peter Wen7bc331f2019-03-06 14:18:57888 "//third_party/android_deps:com_android_support_support_annotations_java",
qiangchen42f96d52017-08-09 00:08:03889 ]
gyzhouad7cad82017-05-11 23:10:03890 }
Mirko Bonadei73aa2de2020-01-20 14:28:57891
892 junit_binary("android_examples_junit_tests") {
893 sources = [
894 "androidjunit/src/org/appspot/apprtc/BluetoothManagerTest.java",
895 "androidjunit/src/org/appspot/apprtc/DirectRTCClientTest.java",
896 "androidjunit/src/org/appspot/apprtc/TCPChannelClientTest.java",
897 ]
898
899 deps = [
900 ":AppRTCMobile_javalib",
Artem Titova4dfe242020-06-03 14:42:57901 "../sdk/android:peerconnection_java",
Mirko Bonadei73aa2de2020-01-20 14:28:57902 "//base:base_java_test_support",
Artem Titovebc563e2021-02-17 10:56:28903 "//third_party/androidx:androidx_test_core_java",
Mirko Bonadei73aa2de2020-01-20 14:28:57904 "//third_party/google-truth:google_truth_java",
905 ]
906
907 additional_jar_files = [ [
908 "../sdk/android/tests/resources/robolectric.properties",
909 "robolectric.properties",
910 ] ]
911 }
gyzhouad7cad82017-05-11 23:10:03912}
913
charujainaca3a242016-11-01 10:09:15914if (!build_with_chromium) {
915 # Doesn't build within Chrome on Win.
916 rtc_executable("stun_prober") {
kjellander1993b1d2017-03-06 08:29:21917 testonly = true
Mirko Bonadeiccbe95f2020-01-21 11:10:10918 sources = [ "stunprober/main.cc" ]
charujainaca3a242016-11-01 10:09:15919 deps = [
920 "../p2p:libstunprober",
921 "../p2p:rtc_p2p",
Artem Titov94b57c02019-03-21 12:35:10922 "../rtc_base",
Patrik Höglunda8005cf2017-12-13 15:05:42923 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 17:40:47924 "../rtc_base:rtc_base_approved",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01925 "../rtc_base:socket_address",
926 "../rtc_base:threading",
Mirko Bonadei0be40bf2019-07-16 16:40:05927 "//third_party/abseil-cpp/absl/flags:flag",
928 "//third_party/abseil-cpp/absl/flags:parse",
charujainaca3a242016-11-01 10:09:15929 ]
930 }
931}