blob: ed02eb768c8848b26652bfbadd59d8565bda2a90 [file] [log] [blame]
# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
import("../webrtc.gni")
if (is_android) {
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
import("//third_party/jni_zero/jni_zero.gni")
} else if (is_mac) {
import("//build/config/mac/rules.gni")
} else if (is_ios) {
import("//build/config/ios/rules.gni")
} else if (is_linux || is_chromeos) {
import("//build/config/linux/pkg_config.gni")
}
group("examples") {
# This target shall build all targets in examples.
testonly = true
deps = []
if (is_android) {
deps += [
":AppRTCMobile",
":AppRTCMobile_test_apk",
#TODO(https://bugs.webrtc.org/15095) - Fix or remove this target.
#":libwebrtc_unity",
"androidvoip",
]
# TODO(sakal): We include some code from the tests. Remove this dependency
# and remove this if-clause.
if (rtc_include_tests) {
deps += [ "androidnativeapi" ]
}
}
if (!build_with_chromium) {
deps += [ ":stun_prober" ]
}
if (is_ios || (is_mac && target_cpu != "x86")) {
deps += [ ":AppRTCMobile" ]
}
if (is_linux || is_chromeos || is_win) {
deps += [
":peerconnection_server",
":stunserver",
":turnserver",
]
if (current_os != "winuwp") {
deps += [ ":peerconnection_client" ]
}
}
}
rtc_library("read_auth_file") {
testonly = true
sources = [
"turnserver/read_auth_file.cc",
"turnserver/read_auth_file.h",
]
deps = [
"../api:array_view",
"../rtc_base:stringutils",
"//third_party/abseil-cpp/absl/strings:string_view",
]
}
if (rtc_include_tests) {
rtc_test("examples_unittests") {
testonly = true
sources = [ "turnserver/read_auth_file_unittest.cc" ]
deps = [
":read_auth_file",
"../test:test_main",
"//test:test_support",
"//testing/gtest",
]
}
}
if (is_android) {
rtc_android_apk("AppRTCMobile") {
testonly = true
apk_name = "AppRTCMobile"
android_manifest = "androidapp/AndroidManifest.xml"
min_sdk_version = 21
target_sdk_version = 31
deps = [
":AppRTCMobile_javalib",
":AppRTCMobile_resources",
"../rtc_base:base_java",
]
shared_libraries = [ "../sdk/android:libjingle_peerconnection_so" ]
}
rtc_android_library("AppRTCMobile_javalib") {
testonly = true
android_manifest = "androidapp/AndroidManifest.xml"
sources = [
"androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java",
"androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java",
"androidapp/src/org/appspot/apprtc/AppRTCClient.java",
"androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java",
"androidapp/src/org/appspot/apprtc/CallActivity.java",
"androidapp/src/org/appspot/apprtc/CallFragment.java",
"androidapp/src/org/appspot/apprtc/CaptureQualityController.java",
"androidapp/src/org/appspot/apprtc/ConnectActivity.java",
"androidapp/src/org/appspot/apprtc/CpuMonitor.java",
"androidapp/src/org/appspot/apprtc/DirectRTCClient.java",
"androidapp/src/org/appspot/apprtc/HudFragment.java",
"androidapp/src/org/appspot/apprtc/PeerConnectionClient.java",
"androidapp/src/org/appspot/apprtc/RecordedAudioToFileController.java",
"androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java",
"androidapp/src/org/appspot/apprtc/RtcEventLog.java",
"androidapp/src/org/appspot/apprtc/SettingsActivity.java",
"androidapp/src/org/appspot/apprtc/SettingsFragment.java",
"androidapp/src/org/appspot/apprtc/TCPChannelClient.java",
"androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java",
"androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java",
"androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java",
"androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java",
"androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java",
]
resources_package = "org.appspot.apprtc"
deps = [
":AppRTCMobile_resources",
"../rtc_base:base_java",
"../sdk/android:audio_api_java",
"../sdk/android:base_java",
"../sdk/android:camera_java",
"../sdk/android:default_video_codec_factory_java",
"../sdk/android:filevideo_java",
"../sdk/android:hwcodecs_java",
"../sdk/android:java_audio_device_module_java",
"../sdk/android:libjingle_peerconnection_java",
"../sdk/android:libjingle_peerconnection_metrics_default_java",
"../sdk/android:peerconnection_java",
"../sdk/android:screencapturer_java",
"../sdk/android:surfaceviewrenderer_java",
"../sdk/android:swcodecs_java",
"../sdk/android:video_api_java",
"../sdk/android:video_java",
"androidapp/third_party/autobanh:autobanh_java",
"//third_party/androidx:androidx_annotation_annotation_java",
]
}
android_resources("AppRTCMobile_resources") {
testonly = true
sources = [
"androidapp/res/drawable-hdpi/disconnect.png",
"androidapp/res/drawable-hdpi/ic_action_full_screen.png",
"androidapp/res/drawable-hdpi/ic_action_return_from_full_screen.png",
"androidapp/res/drawable-hdpi/ic_launcher.png",
"androidapp/res/drawable-hdpi/ic_loopback_call.png",
"androidapp/res/drawable-ldpi/disconnect.png",
"androidapp/res/drawable-ldpi/ic_action_full_screen.png",
"androidapp/res/drawable-ldpi/ic_action_return_from_full_screen.png",
"androidapp/res/drawable-ldpi/ic_launcher.png",
"androidapp/res/drawable-ldpi/ic_loopback_call.png",
"androidapp/res/drawable-mdpi/disconnect.png",
"androidapp/res/drawable-mdpi/ic_action_full_screen.png",
"androidapp/res/drawable-mdpi/ic_action_return_from_full_screen.png",
"androidapp/res/drawable-mdpi/ic_launcher.png",
"androidapp/res/drawable-mdpi/ic_loopback_call.png",
"androidapp/res/drawable-xhdpi/disconnect.png",
"androidapp/res/drawable-xhdpi/ic_action_full_screen.png",
"androidapp/res/drawable-xhdpi/ic_action_return_from_full_screen.png",
"androidapp/res/drawable-xhdpi/ic_launcher.png",
"androidapp/res/drawable-xhdpi/ic_loopback_call.png",
"androidapp/res/layout/activity_call.xml",
"androidapp/res/layout/activity_connect.xml",
"androidapp/res/layout/fragment_call.xml",
"androidapp/res/layout/fragment_hud.xml",
"androidapp/res/menu/connect_menu.xml",
"androidapp/res/values-v17/styles.xml",
"androidapp/res/values-v21/styles.xml",
"androidapp/res/values/arrays.xml",
"androidapp/res/values/strings.xml",
"androidapp/res/xml/preferences.xml",
]
# Needed for Bazel converter.
custom_package = "org.appspot.apprtc"
resource_dirs = [ "androidapp/res" ]
assert(resource_dirs != []) # Mark as used.
}
rtc_instrumentation_test_apk("AppRTCMobile_test_apk") {
apk_name = "AppRTCMobileTest"
android_manifest = "androidtests/AndroidManifest.xml"
min_sdk_version = 21
target_sdk_version = 31
sources = [
"androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java",
]
apk_under_test = ":AppRTCMobile"
deps = [
":AppRTCMobile_javalib",
"../sdk/android:base_java",
"../sdk/android:camera_java",
"../sdk/android:libjingle_peerconnection_java",
"../sdk/android:peerconnection_java",
"../sdk/android:video_api_java",
"../sdk/android:video_java",
"//third_party/androidx:androidx_test_monitor_java",
"//third_party/androidx:androidx_test_runner_java",
"//third_party/junit",
]
}
}
if (is_ios || (is_mac && target_cpu != "x86")) {
config("apprtc_common_config") {
include_dirs = [ "objc/AppRTCMobile/common" ]
}
rtc_library("apprtc_common") {
testonly = true
sources = [
"objc/AppRTCMobile/common/ARDUtilities.h",
"objc/AppRTCMobile/common/ARDUtilities.m",
]
public_configs = [ ":apprtc_common_config" ]
deps = [ "../sdk:base_objc" ]
}
config("apprtc_signaling_config") {
include_dirs = [ "objc/AppRTCMobile" ]
}
rtc_library("apprtc_signaling") {
testonly = true
sources = [
"objc/AppRTCMobile/ARDAppClient+Internal.h",
"objc/AppRTCMobile/ARDAppClient.h",
"objc/AppRTCMobile/ARDAppClient.m",
"objc/AppRTCMobile/ARDAppEngineClient.h",
"objc/AppRTCMobile/ARDAppEngineClient.m",
"objc/AppRTCMobile/ARDCaptureController.h",
"objc/AppRTCMobile/ARDCaptureController.m",
"objc/AppRTCMobile/ARDExternalSampleCapturer.h",
"objc/AppRTCMobile/ARDExternalSampleCapturer.m",
"objc/AppRTCMobile/ARDJoinResponse+Internal.h",
"objc/AppRTCMobile/ARDJoinResponse.h",
"objc/AppRTCMobile/ARDJoinResponse.m",
"objc/AppRTCMobile/ARDMessageResponse+Internal.h",
"objc/AppRTCMobile/ARDMessageResponse.h",
"objc/AppRTCMobile/ARDMessageResponse.m",
"objc/AppRTCMobile/ARDRoomServerClient.h",
"objc/AppRTCMobile/ARDSettingsModel+Private.h",
"objc/AppRTCMobile/ARDSettingsModel.h",
"objc/AppRTCMobile/ARDSettingsModel.m",
"objc/AppRTCMobile/ARDSettingsStore.h",
"objc/AppRTCMobile/ARDSettingsStore.m",
"objc/AppRTCMobile/ARDSignalingChannel.h",
"objc/AppRTCMobile/ARDSignalingMessage.h",
"objc/AppRTCMobile/ARDSignalingMessage.m",
"objc/AppRTCMobile/ARDStatsBuilder.h",
"objc/AppRTCMobile/ARDStatsBuilder.m",
"objc/AppRTCMobile/ARDTURNClient+Internal.h",
"objc/AppRTCMobile/ARDTURNClient.h",
"objc/AppRTCMobile/ARDTURNClient.m",
"objc/AppRTCMobile/ARDWebSocketChannel.h",
"objc/AppRTCMobile/ARDWebSocketChannel.m",
"objc/AppRTCMobile/RTCIceCandidate+JSON.h",
"objc/AppRTCMobile/RTCIceCandidate+JSON.m",
"objc/AppRTCMobile/RTCIceServer+JSON.h",
"objc/AppRTCMobile/RTCIceServer+JSON.m",
"objc/AppRTCMobile/RTCSessionDescription+JSON.h",
"objc/AppRTCMobile/RTCSessionDescription+JSON.m",
]
public_configs = [ ":apprtc_signaling_config" ]
deps = [
":apprtc_common",
":socketrocket",
"../sdk:base_objc",
"../sdk:default_codec_factory_objc",
"../sdk:file_logger_objc",
"../sdk:helpers_objc",
"../sdk:mediaconstraints_objc",
"../sdk:peerconnectionfactory_base_objc",
"../sdk:videocapture_objc",
"../sdk:videoframebuffer_objc",
"../sdk:videosource_objc",
]
frameworks = [
"CoreMedia.framework",
"QuartzCore.framework",
]
}
if (is_ios) {
rtc_library("AppRTCMobile_lib") {
# iOS must use WebRTC.framework which is dynamically linked.
testonly = true
sources = [
"objc/AppRTCMobile/ios/ARDAppDelegate.h",
"objc/AppRTCMobile/ios/ARDAppDelegate.m",
"objc/AppRTCMobile/ios/ARDFileCaptureController.h",
"objc/AppRTCMobile/ios/ARDFileCaptureController.m",
"objc/AppRTCMobile/ios/ARDMainView.h",
"objc/AppRTCMobile/ios/ARDMainView.m",
"objc/AppRTCMobile/ios/ARDMainViewController.h",
"objc/AppRTCMobile/ios/ARDMainViewController.m",
"objc/AppRTCMobile/ios/ARDSettingsViewController.h",
"objc/AppRTCMobile/ios/ARDSettingsViewController.m",
"objc/AppRTCMobile/ios/ARDStatsView.h",
"objc/AppRTCMobile/ios/ARDStatsView.m",
"objc/AppRTCMobile/ios/ARDVideoCallView.h",
"objc/AppRTCMobile/ios/ARDVideoCallView.m",
"objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
"objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
"objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.h",
"objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.m",
"objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
"objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
]
configs += [ "..:common_objc" ]
deps = [
":apprtc_common",
":apprtc_signaling",
"../sdk:audio_session_objc",
"../sdk:base_objc",
"../sdk:helpers_objc",
"../sdk:mediaconstraints_objc",
"../sdk:metal_objc",
"../sdk:peerconnectionfactory_base_objc",
"../sdk:peerconnectionfactory_base_objc",
"../sdk:videocapture_objc",
"../sdk:videocodec_objc",
]
if (rtc_ios_use_opengl_rendering) {
deps += [ "../sdk:opengl_ui_objc" ]
}
frameworks = [ "AVFoundation.framework" ]
}
ios_app_bundle("AppRTCMobile") {
testonly = true
sources = [ "objc/AppRTCMobile/ios/main.m" ]
info_plist = "objc/AppRTCMobile/ios/Info.plist"
configs += [ "..:common_config" ]
public_configs = [ "..:common_inherited_config" ]
deps = [
":AppRTCMobile_ios_bundle_data",
":AppRTCMobile_lib",
"../sdk:framework_objc",
"../sdk:ios_framework_bundle",
]
if (rtc_apprtcmobile_broadcast_extension) {
deps += [
":AppRTCMobileBroadcastSetupUI_extension_bundle",
":AppRTCMobileBroadcastUpload_extension_bundle",
]
}
if (target_cpu == "x86") {
deps += [ "//testing/iossim" ]
}
}
if (rtc_apprtcmobile_broadcast_extension) {
bundle_data("AppRTCMobileBroadcastUpload_extension_bundle") {
testonly = true
public_deps = [ # no-presubmit-check TODO(webrtc:8603)
":AppRTCMobileBroadcastUpload", # prevent code format
]
sources = [ "$root_out_dir/AppRTCMobileBroadcastUpload.appex" ]
outputs = [ "{{bundle_contents_dir}}/Plugins/{{source_file_part}}" ]
}
bundle_data("AppRTCMobileBroadcastSetupUI_extension_bundle") {
testonly = true
public_deps = [ # no-presubmit-check TODO(webrtc:8603)
":AppRTCMobileBroadcastSetupUI", # prevent code format
]
sources = [ "$root_out_dir/AppRTCMobileBroadcastSetupUI.appex" ]
outputs = [ "{{bundle_contents_dir}}/Plugins/{{source_file_part}}" ]
}
rtc_library("AppRTCMobileBroadcastUpload_lib") {
testonly = true
sources = [
"objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.h",
"objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.m",
]
deps = [
":apprtc_signaling",
"../sdk:framework_objc+link",
"../sdk:ios_framework_bundle",
]
frameworks = [ "ReplayKit.framework" ]
}
ios_appex_bundle("AppRTCMobileBroadcastUpload") {
testonly = true
configs += [ "..:common_config" ]
public_configs = [ "..:common_inherited_config" ]
info_plist = "objc/AppRTCMobile/ios/broadcast_extension/BroadcastUploadInfo.plist"
deps = [
":AppRTCMobileBroadcastUpload_lib",
"../sdk:framework_objc",
]
}
ios_appex_bundle("AppRTCMobileBroadcastSetupUI") {
sources = [
"objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.h",
"objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.m",
]
info_plist = "objc/AppRTCMobile/ios/broadcast_extension/BroadcastSetupUIInfo.plist"
frameworks = [ "ReplayKit.framework" ]
deps = [ ":AppRTCMobile_ios_bundle_data" ]
}
}
bundle_data("AppRTCMobile_ios_bundle_data") {
sources = [
"objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
# Sample video taken from https://media.xiph.org/video/derf/
"objc/AppRTCMobile/ios/resources/foreman.mp4",
"objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
"objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
"objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
"objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
"objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
"objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
"objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
"objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png",
"objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png",
"objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
"objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
"objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
"objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
"objc/AppRTCMobile/ios/resources/mozart.mp3",
"objc/Icon-120.png",
"objc/Icon-180.png",
"objc/Icon.png",
]
outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
}
rtc_library("ObjCNativeAPIDemo_lib") {
testonly = true
sources = [
"objcnativeapi/objc/NADAppDelegate.h",
"objcnativeapi/objc/NADAppDelegate.m",
"objcnativeapi/objc/NADViewController.h",
"objcnativeapi/objc/NADViewController.mm",
"objcnativeapi/objc/objc_call_client.h",
"objcnativeapi/objc/objc_call_client.mm",
]
deps = [
"../api:enable_media",
"../api:libjingle_peerconnection_api",
"../api:scoped_refptr",
"../api:sequence_checker",
"../api/audio:audio_processing",
"../api/audio_codecs:builtin_audio_decoder_factory",
"../api/audio_codecs:builtin_audio_encoder_factory",
"../api/rtc_event_log:rtc_event_log_factory",
"../api/task_queue:default_task_queue_factory",
"../modules/audio_processing",
"../pc:libjingle_peerconnection",
"../rtc_base/synchronization:mutex",
"../sdk:base_objc",
"../sdk:default_codec_factory_objc",
"../sdk:helpers_objc",
"../sdk:metal_objc",
"../sdk:native_api",
"../sdk:videocapture_objc",
"../sdk:videotoolbox_objc",
]
if (rtc_ios_use_opengl_rendering) {
deps += [ "../sdk:opengl_ui_objc" ]
}
}
ios_app_bundle("ObjCNativeAPIDemo") {
testonly = true
sources = [ "objcnativeapi/objc/main.m" ]
info_plist = "objcnativeapi/Info.plist"
configs += [ "..:common_config" ]
public_configs = [ "..:common_inherited_config" ]
deps = [ ":ObjCNativeAPIDemo_lib" ]
if (target_cpu == "x86") {
deps += [ "//testing/iossim" ]
}
}
}
if (is_mac) {
rtc_library("AppRTCMobile_lib") {
testonly = true
sources = [
"objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
"objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
"objc/AppRTCMobile/mac/APPRTCViewController.h",
"objc/AppRTCMobile/mac/APPRTCViewController.m",
]
configs += [ "..:common_objc" ]
deps = [
":apprtc_common",
":apprtc_signaling",
"../sdk:base_objc",
"../sdk:helpers_objc",
"../sdk:mediaconstraints_objc",
"../sdk:metal_objc",
"../sdk:peerconnectionfactory_base_objc",
"../sdk:peerconnectionfactory_base_objc",
"../sdk:videocapture_objc",
"../sdk:videocodec_objc",
]
}
mac_app_bundle("AppRTCMobile") {
testonly = true
output_name = "AppRTCMobile"
sources = [ "objc/AppRTCMobile/mac/main.m" ]
public_configs = [ "..:common_inherited_config" ]
info_plist = "objc/AppRTCMobile/mac/Info.plist"
frameworks = [ "AppKit.framework" ]
ldflags = [
"-rpath",
"@executable_path/../Frameworks",
]
deps = [
":AppRTCMobile_lib",
"../sdk:mac_framework_bundle",
"../sdk:mac_framework_objc+link",
]
}
}
config("socketrocket_include_config") {
include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
}
config("socketrocket_warning_config") {
# GN orders flags on a target before flags from configs. The default config
# adds these flags so to cancel them out they need to come from a config and
# cannot be on the target directly.
cflags = [
"-Wno-deprecated-declarations",
"-Wno-nonnull",
"-Wno-semicolon-before-method-body",
"-Wno-unused-variable",
]
cflags_objc = [
# Enabled for cflags_objc in build/config/compiler/BUILD.gn.
"-Wno-objc-missing-property-synthesis",
]
}
rtc_library("socketrocket") {
testonly = true
sources = [
"objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
"objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
]
configs += [ ":socketrocket_warning_config" ]
public_configs = [ ":socketrocket_include_config" ]
libs = [ "icucore" ]
frameworks = [
"CFNetwork.framework",
"Security.framework",
]
}
if (rtc_include_tests) {
# TODO(kthelgason): compile xctests on mac when chromium supports it.
if (is_ios) {
rtc_library("apprtcmobile_test_sources") {
# iOS must use WebRTC.framework which is dynamically linked.
testonly = true
include_dirs = [
"objc/AppRTCMobile",
"objc/AppRTCMobile/ios",
]
sources = [
"objc/AppRTCMobile/tests/ARDAppClient_xctest.mm",
"objc/AppRTCMobile/tests/ARDFileCaptureController_xctest.mm",
"objc/AppRTCMobile/tests/ARDSettingsModel_xctest.mm",
]
deps = [
":AppRTCMobile_lib",
":apprtc_signaling",
"../rtc_base:ssl_adapter",
"../sdk:mediaconstraints_objc",
"../sdk:peerconnectionfactory_base_objc",
"../sdk:videocapture_objc",
"//build/config/ios:xctest",
"//third_party/ocmock",
]
}
rtc_test("apprtcmobile_tests") {
is_xctest = true
info_plist = "objc/AppRTCMobile/ios/Info.plist"
sources = [ "objc/AppRTCMobile/tests/main.mm" ]
deps = [
":AppRTCMobile_lib",
":apprtcmobile_test_sources",
"../sdk:framework_objc",
"//test:test_support",
]
ldflags = [ "-all_load" ]
}
}
}
}
if (is_linux || is_chromeos || is_win) {
if (is_linux || is_chromeos) {
pkg_config("gtk_config") {
packages = [
# Gtk requires gmodule, but it does not list it as a dependency in some
# misconfigured systems.
"gmodule-2.0",
"gthread-2.0",
"gtk+-3.0",
]
}
}
rtc_executable("peerconnection_client") {
testonly = true
sources = [
"peerconnection/client/conductor.cc",
"peerconnection/client/conductor.h",
"peerconnection/client/defaults.cc",
"peerconnection/client/defaults.h",
"peerconnection/client/peer_connection_client.cc",
"peerconnection/client/peer_connection_client.h",
]
deps = [
"../api:async_dns_resolver",
"../api:audio_options_api",
"../api:create_peerconnection_factory",
"../api:libjingle_peerconnection_api",
"../api:media_stream_interface",
"../api:rtp_sender_interface",
"../api:scoped_refptr",
"../api/audio:audio_device",
"../api/audio:audio_mixer_api",
"../api/audio:audio_processing",
"../api/audio_codecs:audio_codecs_api",
"../api/task_queue:pending_task_safety_flag",
"../api/units:time_delta",
"../api/video:video_frame",
"../api/video:video_rtp_headers",
"../api/video_codecs:video_codecs_api",
"../media:media_channel",
"../media:video_common",
"../p2p:connection",
"../p2p:port_allocator",
"../p2p:rtc_p2p",
"../pc:video_track_source",
"../rtc_base:async_dns_resolver",
"../rtc_base:checks",
"../rtc_base:logging",
"../rtc_base:macromagic",
"../rtc_base:net_helpers",
"../rtc_base:refcount",
"../rtc_base:rtc_certificate_generator",
"../rtc_base:ssl_adapter",
"../rtc_base:stringutils",
"../rtc_base:threading",
"../rtc_base/third_party/sigslot",
"../system_wrappers:field_trial",
"../test:field_trial",
"../test:platform_video_capturer",
"../test:rtp_test_utils",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional",
]
if (is_win) {
sources += [
"peerconnection/client/flag_defs.h",
"peerconnection/client/main.cc",
"peerconnection/client/main_wnd.cc",
"peerconnection/client/main_wnd.h",
]
configs += [ "//build/config/win:windowed" ]
deps += [
"../rtc_base:win32",
"../rtc_base:win32_socket_init",
]
}
if (is_linux || is_chromeos) {
sources += [
"peerconnection/client/linux/main.cc",
"peerconnection/client/linux/main_wnd.cc",
"peerconnection/client/linux/main_wnd.h",
]
cflags = [ "-Wno-deprecated-declarations" ]
libs = [
"X11",
"Xcomposite",
"Xext",
"Xrender",
]
configs += [ ":gtk_config" ]
}
deps += [
"../api:libjingle_peerconnection_api",
"../api/audio_codecs:builtin_audio_decoder_factory",
"../api/audio_codecs:builtin_audio_encoder_factory",
"../api/video:video_frame",
"../api/video:video_rtp_headers",
"../api/video_codecs:video_decoder_factory_template",
"../api/video_codecs:video_decoder_factory_template_dav1d_adapter",
"../api/video_codecs:video_decoder_factory_template_libvpx_vp8_adapter",
"../api/video_codecs:video_decoder_factory_template_libvpx_vp9_adapter",
"../api/video_codecs:video_decoder_factory_template_open_h264_adapter",
"../api/video_codecs:video_encoder_factory_template",
"../api/video_codecs:video_encoder_factory_template_libaom_av1_adapter",
"../api/video_codecs:video_encoder_factory_template_libvpx_vp8_adapter",
"../api/video_codecs:video_encoder_factory_template_libvpx_vp9_adapter",
"../api/video_codecs:video_encoder_factory_template_open_h264_adapter",
"../media:rtc_audio_video",
"../modules/audio_device",
"../modules/audio_processing",
"../modules/video_capture:video_capture_module",
"../pc:libjingle_peerconnection",
"../rtc_base:rtc_json",
"../test:video_test_common",
"//third_party/abseil-cpp/absl/flags:flag",
"//third_party/abseil-cpp/absl/flags:parse",
"//third_party/libyuv",
]
}
rtc_executable("peerconnection_server") {
testonly = true
sources = [
"peerconnection/server/data_socket.cc",
"peerconnection/server/data_socket.h",
"peerconnection/server/main.cc",
"peerconnection/server/peer_channel.cc",
"peerconnection/server/peer_channel.h",
"peerconnection/server/utils.cc",
"peerconnection/server/utils.h",
]
deps = [
"../rtc_base:checks",
"../rtc_base:stringutils",
"../system_wrappers:field_trial",
"../test:field_trial",
"//third_party/abseil-cpp/absl/flags:flag",
"//third_party/abseil-cpp/absl/flags:parse",
"//third_party/abseil-cpp/absl/flags:usage",
]
}
rtc_executable("turnserver") {
testonly = true
sources = [ "turnserver/turnserver_main.cc" ]
deps = [
":read_auth_file",
"../p2p:basic_packet_socket_factory",
"../p2p:p2p_server_utils",
"../p2p:port_interface",
"../p2p:rtc_p2p",
"../pc:rtc_pc",
"../rtc_base:async_udp_socket",
"../rtc_base:ip_address",
"../rtc_base:socket_address",
"../rtc_base:socket_server",
"../rtc_base:threading",
"//third_party/abseil-cpp/absl/strings:strings",
]
}
rtc_executable("stunserver") {
testonly = true
sources = [ "stunserver/stunserver_main.cc" ]
deps = [
"../p2p:p2p_server_utils",
"../p2p:rtc_p2p",
"../pc:rtc_pc",
"../rtc_base:async_udp_socket",
"../rtc_base:socket_address",
"../rtc_base:socket_server",
"../rtc_base:threading",
]
}
}
if (is_android) {
robolectric_binary("android_examples_junit_tests") {
sources = [
"androidjunit/src/org/appspot/apprtc/BluetoothManagerTest.java",
"androidjunit/src/org/appspot/apprtc/DirectRTCClientTest.java",
"androidjunit/src/org/appspot/apprtc/TCPChannelClientTest.java",
]
deps = [
":AppRTCMobile_javalib",
"../sdk/android:peerconnection_java",
"//third_party/androidx:androidx_test_core_java",
"//third_party/google-truth:google_truth_java",
]
additional_jar_files = [ [
"../sdk/android/tests/resources/robolectric.properties",
"robolectric.properties",
] ]
}
}
if (!build_with_chromium) {
# Doesn't build within Chrome on Win.
rtc_executable("stun_prober") {
testonly = true
sources = [ "stunprober/main.cc" ]
deps = [
"../p2p:basic_packet_socket_factory",
"../p2p:libstunprober",
"../p2p:rtc_p2p",
"../rtc_base:checks",
"../rtc_base:crypto_random",
"../rtc_base:logging",
"../rtc_base:network",
"../rtc_base:socket_address",
"../rtc_base:ssl_adapter",
"../rtc_base:threading",
"../rtc_base:timeutils",
"../test:scoped_key_value_config",
"//third_party/abseil-cpp/absl/flags:flag",
"//third_party/abseil-cpp/absl/flags:parse",
]
}
}