mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-12-01 09:46:09 +03:00
1376 lines
39 KiB
Plaintext
1376 lines
39 KiB
Plaintext
|
# 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")
|
||
|
import("//build/config/android/config.gni")
|
||
|
import("//build/config/android/rules.gni")
|
||
|
|
||
|
group("android") {
|
||
|
if (!build_with_chromium && is_android) {
|
||
|
public_deps = [
|
||
|
":libjingle_peerconnection_datachannelonly_so",
|
||
|
":libjingle_peerconnection_jni",
|
||
|
":libjingle_peerconnection_so",
|
||
|
":libwebrtc",
|
||
|
":native_api",
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
config("libjingle_peerconnection_jni_warnings_config") {
|
||
|
# The warnings below are enabled by default. Since GN orders compiler flags
|
||
|
# for a target before flags from configs, the only way to disable such
|
||
|
# warnings is by having them in a separate config, loaded from the target.
|
||
|
if (!is_win) {
|
||
|
cflags = [
|
||
|
"-Wno-sign-compare",
|
||
|
"-Wno-unused-variable",
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
generate_jni("generated_base_jni") {
|
||
|
sources = [
|
||
|
"api/org/webrtc/NetworkMonitor.java",
|
||
|
"api/org/webrtc/NetworkMonitorAutoDetect.java",
|
||
|
"src/java/org/webrtc/Histogram.java",
|
||
|
"src/java/org/webrtc/JniCommon.java",
|
||
|
]
|
||
|
jni_package = ""
|
||
|
namespace = "webrtc::jni"
|
||
|
jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
|
||
|
}
|
||
|
|
||
|
generate_jar_jni("generated_external_classes_jni") {
|
||
|
classes = [
|
||
|
"java/lang/Integer.class",
|
||
|
"java/lang/Double.class",
|
||
|
"java/lang/Long.class",
|
||
|
"java/lang/Iterable.class",
|
||
|
"java/util/Iterator.class",
|
||
|
"java/lang/Boolean.class",
|
||
|
"java/math/BigInteger.class",
|
||
|
"java/util/Map.class",
|
||
|
"java/util/LinkedHashMap.class",
|
||
|
"java/util/ArrayList.class",
|
||
|
"java/lang/Enum.class",
|
||
|
]
|
||
|
jni_package = ""
|
||
|
jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
|
||
|
}
|
||
|
|
||
|
# Internal code that is needed by native_api_jni. The code cannot be placed in
|
||
|
# base_jni because native_api_jni depends on the code (and base_jni depends on
|
||
|
# native_api_jni).
|
||
|
rtc_source_set("internal_jni") {
|
||
|
sources = [
|
||
|
"src/jni/jvm.cc",
|
||
|
"src/jni/jvm.h",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
"../../rtc_base:checks",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
rtc_source_set("base_jni") {
|
||
|
visibility = [ "*" ]
|
||
|
sources = [
|
||
|
"src/jni/androidhistogram.cc",
|
||
|
"src/jni/androidnetworkmonitor.cc",
|
||
|
"src/jni/androidnetworkmonitor.h",
|
||
|
"src/jni/class_loader.h",
|
||
|
"src/jni/classreferenceholder.h",
|
||
|
"src/jni/jni_common.cc",
|
||
|
"src/jni/jni_helpers.cc",
|
||
|
"src/jni/jni_helpers.h",
|
||
|
"src/jni/pc/audio.h",
|
||
|
"src/jni/pc/logging.cc",
|
||
|
"src/jni/pc/media.h",
|
||
|
"src/jni/pc/video.h",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":generated_base_jni",
|
||
|
":internal_jni",
|
||
|
":native_api_jni",
|
||
|
"../../api:libjingle_peerconnection_api",
|
||
|
"../../api:optional",
|
||
|
"../../rtc_base:checks",
|
||
|
"../../rtc_base:rtc_base",
|
||
|
"../../rtc_base:rtc_base_approved",
|
||
|
"../../system_wrappers:metrics_api",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
rtc_static_library("audio_jni") {
|
||
|
sources = [
|
||
|
"src/jni/pc/audio.cc",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":base_jni",
|
||
|
"../../api/audio_codecs:builtin_audio_decoder_factory",
|
||
|
"../../api/audio_codecs:builtin_audio_encoder_factory",
|
||
|
"../../modules/audio_processing:audio_processing",
|
||
|
"../../rtc_base:rtc_base_approved",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
rtc_source_set("native_api_audio_device_module") {
|
||
|
visibility = [ "*" ]
|
||
|
|
||
|
sources = [
|
||
|
"native_api/audio_device_module/audio_device_android.cc",
|
||
|
"native_api/audio_device_module/audio_device_android.h",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":base_jni",
|
||
|
":java_audio_device_module",
|
||
|
":opensles_audio_device_module",
|
||
|
"../../modules/audio_device:audio_device",
|
||
|
"../../rtc_base:checks",
|
||
|
"../../rtc_base:rtc_base_approved",
|
||
|
"../../system_wrappers",
|
||
|
"../../system_wrappers:metrics_api",
|
||
|
]
|
||
|
if (rtc_enable_android_aaudio) {
|
||
|
deps += [ ":aaudio_audio_device_module" ]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
rtc_source_set("audio_device_module_base") {
|
||
|
visibility = [ "*" ]
|
||
|
|
||
|
sources = [
|
||
|
"src/jni/audio_device/audio_common.h",
|
||
|
"src/jni/audio_device/audio_device_module.cc",
|
||
|
"src/jni/audio_device/audio_device_module.h",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":base_jni",
|
||
|
":generated_audio_device_module_base_jni",
|
||
|
":native_api_jni",
|
||
|
"../../api:optional",
|
||
|
"../../modules/audio_device:audio_device_buffer",
|
||
|
"../../rtc_base:checks",
|
||
|
"../../rtc_base:rtc_base_approved",
|
||
|
"../../system_wrappers:metrics_api",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
if (rtc_enable_android_aaudio) {
|
||
|
rtc_source_set("aaudio_audio_device_module") {
|
||
|
visibility = [ "*" ]
|
||
|
defines = [ "AUDIO_DEVICE_INCLUDE_ANDROID_AAUDIO" ]
|
||
|
sources = [
|
||
|
"src/jni/audio_device/aaudio_player.cc",
|
||
|
"src/jni/audio_device/aaudio_player.h",
|
||
|
"src/jni/audio_device/aaudio_recorder.cc",
|
||
|
"src/jni/audio_device/aaudio_recorder.h",
|
||
|
"src/jni/audio_device/aaudio_wrapper.cc",
|
||
|
"src/jni/audio_device/aaudio_wrapper.h",
|
||
|
]
|
||
|
libs = [ "aaudio" ]
|
||
|
deps = [
|
||
|
":audio_device_module_base",
|
||
|
":base_jni",
|
||
|
"../../api:array_view",
|
||
|
"../../api:optional",
|
||
|
"../../modules/audio_device:audio_device",
|
||
|
"../../modules/audio_device:audio_device_buffer",
|
||
|
"../../rtc_base:checks",
|
||
|
"../../rtc_base:rtc_base",
|
||
|
"../../rtc_base:rtc_base_approved",
|
||
|
"../../system_wrappers",
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
rtc_source_set("opensles_audio_device_module") {
|
||
|
visibility = [ "*" ]
|
||
|
sources = [
|
||
|
"src/jni/audio_device/opensles_common.cc",
|
||
|
"src/jni/audio_device/opensles_common.h",
|
||
|
"src/jni/audio_device/opensles_player.cc",
|
||
|
"src/jni/audio_device/opensles_player.h",
|
||
|
"src/jni/audio_device/opensles_recorder.cc",
|
||
|
"src/jni/audio_device/opensles_recorder.h",
|
||
|
]
|
||
|
libs = [ "OpenSLES" ]
|
||
|
deps = [
|
||
|
":audio_device_module_base",
|
||
|
":base_jni",
|
||
|
"../../api:array_view",
|
||
|
"../../api:optional",
|
||
|
"../../modules/audio_device:audio_device",
|
||
|
"../../modules/audio_device:audio_device_buffer",
|
||
|
"../../rtc_base:checks",
|
||
|
"../../rtc_base:rtc_base_approved",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
rtc_source_set("java_audio_device_module") {
|
||
|
visibility = [ "*" ]
|
||
|
|
||
|
sources = [
|
||
|
"src/jni/audio_device/audio_record_jni.cc",
|
||
|
"src/jni/audio_device/audio_record_jni.h",
|
||
|
"src/jni/audio_device/audio_track_jni.cc",
|
||
|
"src/jni/audio_device/audio_track_jni.h",
|
||
|
]
|
||
|
deps = [
|
||
|
":audio_device_module_base",
|
||
|
":base_jni",
|
||
|
":generated_java_audio_device_module_native_jni",
|
||
|
"../../api:optional",
|
||
|
"../../modules/audio_device:audio_device",
|
||
|
"../../modules/audio_device:audio_device_buffer",
|
||
|
"../../rtc_base:checks",
|
||
|
"../../rtc_base:rtc_base_approved",
|
||
|
"../../system_wrappers:metrics_api",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
rtc_static_library("null_audio_jni") {
|
||
|
sources = [
|
||
|
"src/jni/pc/null_audio.cc",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":base_jni",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
generate_jni("generated_audio_device_module_base_jni") {
|
||
|
sources = [
|
||
|
"src/java/org/webrtc/audio/WebRtcAudioManager.java",
|
||
|
]
|
||
|
jni_package = ""
|
||
|
namespace = "webrtc::jni"
|
||
|
jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
|
||
|
}
|
||
|
|
||
|
generate_jni("generated_java_audio_device_module_native_jni") {
|
||
|
sources = [
|
||
|
"src/java/org/webrtc/audio/WebRtcAudioRecord.java",
|
||
|
"src/java/org/webrtc/audio/WebRtcAudioTrack.java",
|
||
|
]
|
||
|
jni_package = ""
|
||
|
namespace = "webrtc::jni"
|
||
|
jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
|
||
|
}
|
||
|
|
||
|
generate_jni("generated_video_jni") {
|
||
|
sources = [
|
||
|
"api/org/webrtc/EncodedImage.java",
|
||
|
"api/org/webrtc/MediaCodecVideoDecoder.java",
|
||
|
"api/org/webrtc/MediaCodecVideoEncoder.java",
|
||
|
"api/org/webrtc/VideoCodecInfo.java",
|
||
|
"api/org/webrtc/VideoCodecStatus.java",
|
||
|
"api/org/webrtc/VideoDecoder.java",
|
||
|
"api/org/webrtc/VideoDecoderFactory.java",
|
||
|
"api/org/webrtc/VideoDecoderFallback.java",
|
||
|
"api/org/webrtc/VideoEncoder.java",
|
||
|
"api/org/webrtc/VideoEncoderFactory.java",
|
||
|
"api/org/webrtc/VideoEncoderFallback.java",
|
||
|
"api/org/webrtc/VideoFrame.java",
|
||
|
"api/org/webrtc/VideoRenderer.java",
|
||
|
"api/org/webrtc/VideoSink.java",
|
||
|
"api/org/webrtc/VideoSource.java",
|
||
|
"api/org/webrtc/VideoTrack.java",
|
||
|
"api/org/webrtc/YuvHelper.java",
|
||
|
"src/java/org/webrtc/EglBase14.java",
|
||
|
"src/java/org/webrtc/NV12Buffer.java",
|
||
|
"src/java/org/webrtc/NV21Buffer.java",
|
||
|
"src/java/org/webrtc/NativeCapturerObserver.java",
|
||
|
"src/java/org/webrtc/VideoDecoderWrapper.java",
|
||
|
"src/java/org/webrtc/VideoEncoderWrapper.java",
|
||
|
"src/java/org/webrtc/WrappedNativeI420Buffer.java",
|
||
|
"src/java/org/webrtc/WrappedNativeVideoDecoder.java",
|
||
|
"src/java/org/webrtc/WrappedNativeVideoEncoder.java",
|
||
|
]
|
||
|
if (rtc_use_builtin_sw_codecs) {
|
||
|
sources += [ "api/org/webrtc/HardwareVideoEncoderFactory.java" ] # TODO(andersc): This currently depends on SoftwareVideoEncoderFactory
|
||
|
}
|
||
|
jni_package = ""
|
||
|
namespace = "webrtc::jni"
|
||
|
jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
|
||
|
}
|
||
|
|
||
|
rtc_static_library("video_jni") {
|
||
|
sources = []
|
||
|
deps = []
|
||
|
|
||
|
sources += [
|
||
|
"src/jni/androidvideotracksource.cc",
|
||
|
"src/jni/androidvideotracksource.h",
|
||
|
"src/jni/encodedimage.cc",
|
||
|
"src/jni/encodedimage.h",
|
||
|
"src/jni/jni_generator_helper.h",
|
||
|
"src/jni/nativecapturerobserver.cc",
|
||
|
"src/jni/nativecapturerobserver.h",
|
||
|
"src/jni/nv12buffer.cc",
|
||
|
"src/jni/nv21buffer.cc",
|
||
|
"src/jni/pc/video.cc",
|
||
|
"src/jni/video_renderer.cc",
|
||
|
"src/jni/videocodecinfo.cc",
|
||
|
"src/jni/videocodecinfo.h",
|
||
|
"src/jni/videocodecstatus.cc",
|
||
|
"src/jni/videocodecstatus.h",
|
||
|
"src/jni/videodecoderfactorywrapper.cc",
|
||
|
"src/jni/videodecoderfactorywrapper.h",
|
||
|
"src/jni/videodecoderfallback.cc",
|
||
|
"src/jni/videodecoderwrapper.cc",
|
||
|
"src/jni/videodecoderwrapper.h",
|
||
|
"src/jni/videoencoderfactorywrapper.cc",
|
||
|
"src/jni/videoencoderfactorywrapper.h",
|
||
|
"src/jni/videoencoderfallback.cc",
|
||
|
"src/jni/videoencoderwrapper.cc",
|
||
|
"src/jni/videoencoderwrapper.h",
|
||
|
"src/jni/videoframe.cc",
|
||
|
"src/jni/videoframe.h",
|
||
|
"src/jni/videosink.cc",
|
||
|
"src/jni/videosink.h",
|
||
|
"src/jni/videosource.cc",
|
||
|
"src/jni/videotrack.cc",
|
||
|
"src/jni/wrapped_native_i420_buffer.cc",
|
||
|
"src/jni/wrapped_native_i420_buffer.h",
|
||
|
"src/jni/wrappednativecodec.cc",
|
||
|
"src/jni/wrappednativecodec.h",
|
||
|
"src/jni/yuvhelper.cc",
|
||
|
]
|
||
|
|
||
|
configs += [ ":libjingle_peerconnection_jni_warnings_config" ]
|
||
|
|
||
|
# TODO(jschuh): Bug 1348: fix this warning.
|
||
|
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
|
||
|
|
||
|
if (is_win) {
|
||
|
cflags += [
|
||
|
"/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch.
|
||
|
"/wd4389", # signed/unsigned mismatch.
|
||
|
]
|
||
|
}
|
||
|
|
||
|
if (rtc_use_builtin_sw_codecs) {
|
||
|
sources += [
|
||
|
"src/jni/androidmediacodeccommon.h",
|
||
|
"src/jni/androidmediadecoder.cc",
|
||
|
"src/jni/androidmediadecoder_jni.h",
|
||
|
"src/jni/androidmediaencoder.cc",
|
||
|
"src/jni/androidmediaencoder_jni.h",
|
||
|
"src/jni/hardwarevideoencoderfactory.cc",
|
||
|
]
|
||
|
|
||
|
deps += [
|
||
|
":vp8_jni",
|
||
|
":vp9_jni",
|
||
|
"../../media:rtc_internal_video_codecs",
|
||
|
]
|
||
|
}
|
||
|
deps += [
|
||
|
":base_jni",
|
||
|
":generated_video_jni",
|
||
|
":native_api_jni",
|
||
|
"../..:webrtc_common",
|
||
|
"../../api:libjingle_peerconnection_api",
|
||
|
"../../api/video:video_frame",
|
||
|
"../../api/video_codecs:video_codecs_api",
|
||
|
"../../common_video:common_video",
|
||
|
"../../media:rtc_audio_video",
|
||
|
"../../media:rtc_h264_profile_id",
|
||
|
"../../media:rtc_media_base",
|
||
|
"../../media:rtc_software_fallback_wrappers",
|
||
|
"../../modules:module_api",
|
||
|
"../../modules/utility:utility",
|
||
|
"../../modules/video_coding:codec_globals_headers",
|
||
|
"../../modules/video_coding:video_codec_interface",
|
||
|
"../../modules/video_coding:video_coding_utility",
|
||
|
"../../rtc_base:checks",
|
||
|
"../../rtc_base:rtc_base",
|
||
|
"../../rtc_base:rtc_base_approved",
|
||
|
"../../rtc_base:rtc_task_queue",
|
||
|
"../../rtc_base:sequenced_task_checker",
|
||
|
"../../rtc_base:weak_ptr",
|
||
|
"../../rtc_base/memory:aligned_malloc",
|
||
|
"../../system_wrappers:field_trial_api",
|
||
|
"//third_party/libyuv",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
rtc_static_library("null_video_jni") {
|
||
|
sources = [
|
||
|
"src/jni/pc/null_video.cc",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":base_jni",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
generate_jni("generated_vp8_jni") {
|
||
|
sources = [
|
||
|
"src/java/org/webrtc/VP8Decoder.java",
|
||
|
"src/java/org/webrtc/VP8Encoder.java",
|
||
|
]
|
||
|
|
||
|
jni_package = ""
|
||
|
namespace = "webrtc::jni"
|
||
|
jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
|
||
|
}
|
||
|
|
||
|
rtc_static_library("vp8_jni") {
|
||
|
sources = [
|
||
|
"src/jni/vp8codec.cc",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":base_jni",
|
||
|
":generated_vp8_jni",
|
||
|
"../../modules/video_coding:webrtc_vp8",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
generate_jni("generated_vp9_jni") {
|
||
|
sources = [
|
||
|
"src/java/org/webrtc/VP9Decoder.java",
|
||
|
"src/java/org/webrtc/VP9Encoder.java",
|
||
|
]
|
||
|
|
||
|
jni_package = ""
|
||
|
namespace = "webrtc::jni"
|
||
|
jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
|
||
|
}
|
||
|
|
||
|
rtc_static_library("vp9_jni") {
|
||
|
sources = [
|
||
|
"src/jni/vp9codec.cc",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":base_jni",
|
||
|
":generated_vp9_jni",
|
||
|
"../../modules/video_coding:webrtc_vp9",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
rtc_static_library("media_jni") {
|
||
|
sources = [
|
||
|
"src/jni/pc/media.cc",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":base_jni",
|
||
|
"../../api:callfactory_api",
|
||
|
"../../api/video_codecs:video_codecs_api",
|
||
|
"../../call:call_interfaces",
|
||
|
"../../logging:rtc_event_log_api",
|
||
|
"../../media:rtc_audio_video",
|
||
|
"../../modules/audio_device:audio_device",
|
||
|
"../../modules/audio_processing:audio_processing",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
rtc_static_library("null_media_jni") {
|
||
|
sources = [
|
||
|
"src/jni/pc/null_media.cc",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":base_jni",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
generate_jni("generated_peerconnection_jni") {
|
||
|
sources = [
|
||
|
"api/org/webrtc/AudioTrack.java",
|
||
|
"api/org/webrtc/CallSessionFileRotatingLogSink.java",
|
||
|
"api/org/webrtc/DataChannel.java",
|
||
|
"api/org/webrtc/DtmfSender.java",
|
||
|
"api/org/webrtc/IceCandidate.java",
|
||
|
"api/org/webrtc/MediaConstraints.java",
|
||
|
"api/org/webrtc/MediaSource.java",
|
||
|
"api/org/webrtc/MediaStream.java",
|
||
|
"api/org/webrtc/MediaStreamTrack.java",
|
||
|
"api/org/webrtc/PeerConnection.java",
|
||
|
"api/org/webrtc/PeerConnectionFactory.java",
|
||
|
"api/org/webrtc/RTCStats.java",
|
||
|
"api/org/webrtc/RTCStatsCollectorCallback.java",
|
||
|
"api/org/webrtc/RTCStatsReport.java",
|
||
|
"api/org/webrtc/RtpParameters.java",
|
||
|
"api/org/webrtc/RtpReceiver.java",
|
||
|
"api/org/webrtc/RtpSender.java",
|
||
|
"api/org/webrtc/RtpTransceiver.java",
|
||
|
"api/org/webrtc/SdpObserver.java",
|
||
|
"api/org/webrtc/SessionDescription.java",
|
||
|
"api/org/webrtc/StatsObserver.java",
|
||
|
"api/org/webrtc/StatsReport.java",
|
||
|
"api/org/webrtc/TurnCustomizer.java",
|
||
|
]
|
||
|
jni_package = ""
|
||
|
namespace = "webrtc::jni"
|
||
|
jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
|
||
|
}
|
||
|
|
||
|
rtc_android_library("logging_java") {
|
||
|
java_files = [ "src/java/org/webrtc/JNILogging.java" ]
|
||
|
|
||
|
deps = [
|
||
|
":base_java",
|
||
|
"//rtc_base:base_java",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
generate_jni("generated_logging_jni") {
|
||
|
sources = [
|
||
|
"src/java/org/webrtc/JNILogging.java",
|
||
|
]
|
||
|
jni_package = ""
|
||
|
jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
|
||
|
}
|
||
|
|
||
|
rtc_static_library("logging_jni") {
|
||
|
visibility = [ "*" ]
|
||
|
sources = [
|
||
|
"src/jni/logging/logsink.cc",
|
||
|
"src/jni/logging/logsink.h",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":base_jni",
|
||
|
":generated_logging_jni",
|
||
|
":native_api_jni",
|
||
|
"../../rtc_base:rtc_base",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
rtc_static_library("peerconnection_jni") {
|
||
|
# Do not depend on this target externally unless you absolute have to. It is
|
||
|
# made public because we don't have a proper NDK yet. Header APIs here are not
|
||
|
# considered public and are subject to change.
|
||
|
visibility = [ "*" ]
|
||
|
|
||
|
sources = [
|
||
|
"src/jni/androidnetworkmonitor_jni.h",
|
||
|
"src/jni/pc/androidnetworkmonitor.h",
|
||
|
"src/jni/pc/audiotrack.cc",
|
||
|
"src/jni/pc/callsessionfilerotatinglogsink.cc",
|
||
|
"src/jni/pc/datachannel.cc",
|
||
|
"src/jni/pc/datachannel.h",
|
||
|
"src/jni/pc/dtmfsender.cc",
|
||
|
"src/jni/pc/icecandidate.cc",
|
||
|
"src/jni/pc/icecandidate.h",
|
||
|
"src/jni/pc/mediaconstraints.cc",
|
||
|
"src/jni/pc/mediaconstraints.h",
|
||
|
"src/jni/pc/mediasource.cc",
|
||
|
"src/jni/pc/mediastream.cc",
|
||
|
"src/jni/pc/mediastream.h",
|
||
|
"src/jni/pc/mediastreamtrack.cc",
|
||
|
"src/jni/pc/mediastreamtrack.h",
|
||
|
"src/jni/pc/ownedfactoryandthreads.cc",
|
||
|
"src/jni/pc/ownedfactoryandthreads.h",
|
||
|
"src/jni/pc/peerconnection.cc",
|
||
|
"src/jni/pc/peerconnection.h",
|
||
|
"src/jni/pc/peerconnectionfactory.cc",
|
||
|
"src/jni/pc/peerconnectionfactory.h",
|
||
|
"src/jni/pc/rtcstatscollectorcallbackwrapper.cc",
|
||
|
"src/jni/pc/rtcstatscollectorcallbackwrapper.h",
|
||
|
"src/jni/pc/rtpparameters.cc",
|
||
|
"src/jni/pc/rtpparameters.h",
|
||
|
"src/jni/pc/rtpreceiver.cc",
|
||
|
"src/jni/pc/rtpreceiver.h",
|
||
|
"src/jni/pc/rtpsender.cc",
|
||
|
"src/jni/pc/rtpsender.h",
|
||
|
"src/jni/pc/rtptransceiver.cc",
|
||
|
"src/jni/pc/rtptransceiver.h",
|
||
|
"src/jni/pc/sdpobserver.cc",
|
||
|
"src/jni/pc/sdpobserver.h",
|
||
|
"src/jni/pc/sessiondescription.cc",
|
||
|
"src/jni/pc/sessiondescription.h",
|
||
|
"src/jni/pc/statsobserver.cc",
|
||
|
"src/jni/pc/statsobserver.h",
|
||
|
"src/jni/pc/turncustomizer.cc",
|
||
|
"src/jni/pc/turncustomizer.h",
|
||
|
]
|
||
|
|
||
|
configs += [ ":libjingle_peerconnection_jni_warnings_config" ]
|
||
|
|
||
|
if (is_clang) {
|
||
|
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
||
|
suppressed_configs += [
|
||
|
"//build/config/clang:extra_warnings",
|
||
|
"//build/config/clang:find_bad_constructs",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
# TODO(jschuh): Bug 1348: fix this warning.
|
||
|
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
|
||
|
|
||
|
if (is_win) {
|
||
|
cflags += [
|
||
|
"/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch.
|
||
|
"/wd4389", # signed/unsigned mismatch.
|
||
|
]
|
||
|
}
|
||
|
|
||
|
deps = [
|
||
|
":base_jni",
|
||
|
":generated_external_classes_jni",
|
||
|
":generated_peerconnection_jni",
|
||
|
":logging_jni",
|
||
|
":native_api_jni",
|
||
|
"../..:webrtc_common",
|
||
|
"../../api:libjingle_peerconnection_api",
|
||
|
"../../api/video_codecs:video_codecs_api",
|
||
|
"../../logging:rtc_event_log_api",
|
||
|
"../../logging:rtc_event_log_impl_base",
|
||
|
"../../media:rtc_data",
|
||
|
"../../media:rtc_media_base",
|
||
|
"../../modules/audio_device:audio_device",
|
||
|
"../../modules/utility:utility",
|
||
|
"../../pc:peerconnection",
|
||
|
"../../rtc_base:checks",
|
||
|
"../../rtc_base:rtc_base",
|
||
|
"../../rtc_base:rtc_base_approved",
|
||
|
"../../rtc_base:rtc_task_queue",
|
||
|
"../../rtc_base:stringutils",
|
||
|
"../../system_wrappers:field_trial_api",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
rtc_static_library("libjingle_peerconnection_jni") {
|
||
|
visibility = [ "*" ]
|
||
|
allow_poison = [
|
||
|
"audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
|
||
|
"software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
|
||
|
]
|
||
|
public_deps = [
|
||
|
":audio_jni",
|
||
|
":base_jni",
|
||
|
":java_audio_device_module_jni",
|
||
|
":media_jni",
|
||
|
":peerconnection_jni",
|
||
|
":video_jni",
|
||
|
"../../pc:create_pc_factory",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
generate_jni("generated_metrics_jni") {
|
||
|
sources = [
|
||
|
"api/org/webrtc/Metrics.java",
|
||
|
]
|
||
|
jni_package = ""
|
||
|
namespace = "webrtc::jni"
|
||
|
jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
|
||
|
}
|
||
|
|
||
|
rtc_static_library("libjingle_peerconnection_metrics_default_jni") {
|
||
|
visibility = [ "*" ]
|
||
|
sources = [
|
||
|
"src/jni/androidmetrics.cc",
|
||
|
]
|
||
|
|
||
|
configs += [ ":libjingle_peerconnection_jni_warnings_config" ]
|
||
|
|
||
|
deps = [
|
||
|
":base_jni",
|
||
|
":generated_metrics_jni",
|
||
|
":native_api_jni",
|
||
|
":peerconnection_jni",
|
||
|
"../../pc:peerconnection",
|
||
|
"../../system_wrappers:field_trial_default",
|
||
|
"../../system_wrappers:metrics_api",
|
||
|
"../../system_wrappers:metrics_default",
|
||
|
"../../system_wrappers:runtime_enabled_features_default",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
# The modular build targets can be used to build WebRTC with different
|
||
|
# functionalities. The users can choose either the real implemenation or the
|
||
|
# null implementation of the audio/video modules based on their requirments.
|
||
|
rtc_shared_library("libjingle_peerconnection_datachannelonly_so") {
|
||
|
sources = [
|
||
|
"src/jni/jni_onload.cc",
|
||
|
]
|
||
|
|
||
|
suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ]
|
||
|
configs += [ "//build/config/android:hide_all_but_jni" ]
|
||
|
|
||
|
deps = [
|
||
|
":base_jni",
|
||
|
":libjingle_peerconnection_metrics_default_jni",
|
||
|
":null_audio_jni",
|
||
|
":null_media_jni",
|
||
|
":null_video_jni",
|
||
|
":peerconnection_jni",
|
||
|
"../../pc:peerconnection",
|
||
|
"../../rtc_base:rtc_base",
|
||
|
"../../rtc_base:rtc_base_approved",
|
||
|
]
|
||
|
output_extension = "so"
|
||
|
}
|
||
|
|
||
|
rtc_shared_library("libjingle_peerconnection_so") {
|
||
|
sources = [
|
||
|
"src/jni/jni_onload.cc",
|
||
|
]
|
||
|
|
||
|
suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ]
|
||
|
configs += [ "//build/config/android:hide_all_but_jni" ]
|
||
|
|
||
|
deps = [
|
||
|
":libjingle_peerconnection_jni",
|
||
|
":libjingle_peerconnection_metrics_default_jni",
|
||
|
"../../pc:libjingle_peerconnection",
|
||
|
"../../rtc_base:rtc_base",
|
||
|
]
|
||
|
output_extension = "so"
|
||
|
}
|
||
|
|
||
|
dist_jar("libwebrtc") {
|
||
|
_target_dir_name = get_label_info(":$target_name", "dir")
|
||
|
output = "${root_out_dir}/lib.java${_target_dir_name}/${target_name}.jar"
|
||
|
direct_deps_only = true
|
||
|
use_unprocessed_jars = true
|
||
|
requires_android = true
|
||
|
no_build_hooks = true
|
||
|
|
||
|
deps = [
|
||
|
":audio_api_java",
|
||
|
":base_java",
|
||
|
":camera_java",
|
||
|
":filevideo_java",
|
||
|
":hwcodecs_java",
|
||
|
":java_audio_device_module_java",
|
||
|
":libjingle_peerconnection_java",
|
||
|
":libjingle_peerconnection_metrics_default_java",
|
||
|
":logging_java",
|
||
|
":peerconnection_java",
|
||
|
":screencapturer_java",
|
||
|
":surfaceviewrenderer_java",
|
||
|
":video_api_java",
|
||
|
":video_java",
|
||
|
"../../modules/audio_device:audio_device_java",
|
||
|
"../../rtc_base:base_java",
|
||
|
]
|
||
|
|
||
|
if (rtc_use_builtin_sw_codecs) {
|
||
|
deps += [ ":swcodecs_java" ]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
# TODO(sakal): Extract files from this target to releveant subtargets, video, audio etc.
|
||
|
rtc_android_library("base_java") {
|
||
|
java_files = [
|
||
|
"api/org/webrtc/RefCounted.java",
|
||
|
"src/java/org/webrtc/CalledByNative.java",
|
||
|
"src/java/org/webrtc/CalledByNativeUnchecked.java",
|
||
|
"src/java/org/webrtc/Histogram.java",
|
||
|
"src/java/org/webrtc/JniCommon.java",
|
||
|
"src/java/org/webrtc/JniHelper.java",
|
||
|
"src/java/org/webrtc/RefCountDelegate.java",
|
||
|
"src/java/org/webrtc/WebRtcClassLoader.java",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
"//rtc_base:base_java",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
rtc_android_library("video_api_java") {
|
||
|
java_files = [
|
||
|
"api/org/webrtc/EncodedImage.java",
|
||
|
"api/org/webrtc/VideoCapturer.java",
|
||
|
"api/org/webrtc/VideoCodecInfo.java",
|
||
|
"api/org/webrtc/VideoCodecStatus.java",
|
||
|
"api/org/webrtc/VideoDecoder.java",
|
||
|
"api/org/webrtc/VideoDecoderFactory.java",
|
||
|
"api/org/webrtc/VideoEncoder.java",
|
||
|
"api/org/webrtc/VideoEncoderFactory.java",
|
||
|
"api/org/webrtc/VideoFrame.java",
|
||
|
"api/org/webrtc/VideoRenderer.java", # TODO(sakal): Remove
|
||
|
"api/org/webrtc/VideoSink.java",
|
||
|
]
|
||
|
|
||
|
# TODO(sakal): These should be moved to video_java but cannot because of dependencies.
|
||
|
java_files += [
|
||
|
"api/org/webrtc/EglBase.java",
|
||
|
"api/org/webrtc/GlShader.java",
|
||
|
"api/org/webrtc/GlTextureFrameBuffer.java",
|
||
|
"api/org/webrtc/GlUtil.java",
|
||
|
"api/org/webrtc/JavaI420Buffer.java",
|
||
|
"api/org/webrtc/RendererCommon.java",
|
||
|
"api/org/webrtc/SurfaceTextureHelper.java",
|
||
|
"api/org/webrtc/TextureBufferImpl.java",
|
||
|
"api/org/webrtc/YuvConverter.java",
|
||
|
"api/org/webrtc/YuvHelper.java",
|
||
|
"src/java/org/webrtc/EglBase10.java",
|
||
|
"src/java/org/webrtc/EglBase14.java",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":base_java",
|
||
|
"//rtc_base:base_java",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
rtc_android_library("audio_api_java") {
|
||
|
java_files = [ "api/org/webrtc/audio/AudioDeviceModule.java" ]
|
||
|
|
||
|
deps = [
|
||
|
":base_java",
|
||
|
"//rtc_base:base_java",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
rtc_android_library("java_audio_device_module_java") {
|
||
|
java_files = [
|
||
|
"api/org/webrtc/audio/JavaAudioDeviceModule.java",
|
||
|
"src/java/org/webrtc/audio/VolumeLogger.java",
|
||
|
"src/java/org/webrtc/audio/WebRtcAudioEffects.java",
|
||
|
"src/java/org/webrtc/audio/WebRtcAudioManager.java",
|
||
|
"src/java/org/webrtc/audio/WebRtcAudioRecord.java",
|
||
|
"src/java/org/webrtc/audio/WebRtcAudioTrack.java",
|
||
|
"src/java/org/webrtc/audio/WebRtcAudioUtils.java",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":audio_api_java",
|
||
|
":base_java",
|
||
|
"//rtc_base:base_java",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
# JNI target for java_audio_device_module_java
|
||
|
rtc_source_set("java_audio_device_module_jni") {
|
||
|
sources = [
|
||
|
"src/jni/audio_device/java_audio_device_module.cc",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":base_jni",
|
||
|
":generated_java_audio_jni",
|
||
|
":java_audio_device_module",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
generate_jni("generated_java_audio_jni") {
|
||
|
sources = [
|
||
|
"api/org/webrtc/audio/JavaAudioDeviceModule.java",
|
||
|
]
|
||
|
jni_package = ""
|
||
|
namespace = "webrtc::jni"
|
||
|
jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
|
||
|
}
|
||
|
|
||
|
rtc_android_library("video_java") {
|
||
|
java_files = [
|
||
|
"api/org/webrtc/EglRenderer.java",
|
||
|
"api/org/webrtc/GlRectDrawer.java",
|
||
|
"api/org/webrtc/VideoDecoderFallback.java",
|
||
|
"api/org/webrtc/VideoEncoderFallback.java",
|
||
|
"api/org/webrtc/VideoFrameDrawer.java",
|
||
|
"src/java/org/webrtc/NativeCapturerObserver.java",
|
||
|
"src/java/org/webrtc/NV21Buffer.java",
|
||
|
"src/java/org/webrtc/VideoDecoderWrapper.java",
|
||
|
"src/java/org/webrtc/VideoEncoderWrapper.java",
|
||
|
"src/java/org/webrtc/WrappedNativeI420Buffer.java",
|
||
|
"src/java/org/webrtc/WrappedNativeVideoDecoder.java",
|
||
|
"src/java/org/webrtc/WrappedNativeVideoEncoder.java",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":base_java",
|
||
|
":video_api_java",
|
||
|
"//rtc_base:base_java",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
rtc_android_library("camera_java") {
|
||
|
java_files = [
|
||
|
"api/org/webrtc/Camera1Capturer.java",
|
||
|
"api/org/webrtc/Camera1Enumerator.java",
|
||
|
"api/org/webrtc/Camera2Capturer.java",
|
||
|
"api/org/webrtc/Camera2Enumerator.java",
|
||
|
"api/org/webrtc/CameraEnumerationAndroid.java",
|
||
|
"api/org/webrtc/CameraEnumerator.java",
|
||
|
"api/org/webrtc/CameraVideoCapturer.java",
|
||
|
"src/java/org/webrtc/Camera1Session.java",
|
||
|
"src/java/org/webrtc/Camera2Session.java",
|
||
|
"src/java/org/webrtc/CameraCapturer.java",
|
||
|
"src/java/org/webrtc/CameraSession.java",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":base_java",
|
||
|
":video_api_java",
|
||
|
":video_java",
|
||
|
"//rtc_base:base_java",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
rtc_android_library("screencapturer_java") {
|
||
|
java_files = [ "api/org/webrtc/ScreenCapturerAndroid.java" ]
|
||
|
|
||
|
deps = [
|
||
|
":video_api_java",
|
||
|
":video_java",
|
||
|
"//rtc_base:base_java",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
rtc_android_library("surfaceviewrenderer_java") {
|
||
|
java_files = [
|
||
|
"api/org/webrtc/SurfaceEglRenderer.java",
|
||
|
"api/org/webrtc/SurfaceViewRenderer.java",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":video_api_java",
|
||
|
":video_java",
|
||
|
"//rtc_base:base_java",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
rtc_android_library("filevideo_java") {
|
||
|
java_files = [
|
||
|
"api/org/webrtc/VideoFileRenderer.java",
|
||
|
"api/org/webrtc/FileVideoCapturer.java",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":base_java",
|
||
|
":video_api_java",
|
||
|
":video_java",
|
||
|
"//rtc_base:base_java",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
if (rtc_use_builtin_sw_codecs) {
|
||
|
rtc_android_library("swcodecs_java") {
|
||
|
java_files = [
|
||
|
"api/org/webrtc/SoftwareVideoDecoderFactory.java",
|
||
|
"api/org/webrtc/SoftwareVideoEncoderFactory.java",
|
||
|
"src/java/org/webrtc/VP8Encoder.java",
|
||
|
"src/java/org/webrtc/VP8Decoder.java",
|
||
|
"src/java/org/webrtc/VP9Encoder.java",
|
||
|
"src/java/org/webrtc/VP9Decoder.java",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":base_java",
|
||
|
":video_api_java",
|
||
|
":video_java",
|
||
|
"//rtc_base:base_java",
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
rtc_android_library("hwcodecs_java") {
|
||
|
java_files = [
|
||
|
"src/java/org/webrtc/BaseBitrateAdjuster.java",
|
||
|
"src/java/org/webrtc/BitrateAdjuster.java",
|
||
|
"src/java/org/webrtc/DynamicBitrateAdjuster.java",
|
||
|
"src/java/org/webrtc/FramerateBitrateAdjuster.java",
|
||
|
"src/java/org/webrtc/HardwareVideoDecoder.java",
|
||
|
"src/java/org/webrtc/HardwareVideoEncoder.java",
|
||
|
"src/java/org/webrtc/MediaCodecUtils.java",
|
||
|
"src/java/org/webrtc/NV12Buffer.java",
|
||
|
"src/java/org/webrtc/VideoCodecType.java",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":base_java",
|
||
|
":video_api_java",
|
||
|
":video_java",
|
||
|
"//rtc_base:base_java",
|
||
|
]
|
||
|
|
||
|
if (rtc_use_builtin_sw_codecs) {
|
||
|
java_files += [
|
||
|
"api/org/webrtc/HardwareVideoDecoderFactory.java", # TODO(andersc): make this not depend on SoftwareVideoDecoderFactory
|
||
|
"api/org/webrtc/HardwareVideoEncoderFactory.java", # TODO(andersc): make this not depend on SoftwareVideoEncoderFactory
|
||
|
]
|
||
|
|
||
|
deps += [ ":swcodecs_java" ]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
rtc_android_library("peerconnection_java") {
|
||
|
java_files = [
|
||
|
"api/org/webrtc/audio/LegacyAudioDeviceModule.java",
|
||
|
"api/org/webrtc/AudioProcessingFactory.java",
|
||
|
"api/org/webrtc/AudioSource.java",
|
||
|
"api/org/webrtc/AudioTrack.java",
|
||
|
"api/org/webrtc/CallSessionFileRotatingLogSink.java",
|
||
|
"api/org/webrtc/DataChannel.java",
|
||
|
"api/org/webrtc/DtmfSender.java",
|
||
|
"api/org/webrtc/FecControllerFactoryFactoryInterface.java",
|
||
|
"api/org/webrtc/IceCandidate.java",
|
||
|
"api/org/webrtc/MediaCodecVideoDecoder.java",
|
||
|
"api/org/webrtc/MediaCodecVideoEncoder.java",
|
||
|
"api/org/webrtc/MediaConstraints.java",
|
||
|
"api/org/webrtc/MediaSource.java",
|
||
|
"api/org/webrtc/MediaStream.java",
|
||
|
"api/org/webrtc/MediaStreamTrack.java",
|
||
|
"api/org/webrtc/NativeLibraryLoader.java",
|
||
|
"api/org/webrtc/NativePeerConnectionFactory.java",
|
||
|
"api/org/webrtc/NetworkMonitor.java", # TODDO(sakal): Break dependencies and move to base_java.
|
||
|
"api/org/webrtc/NetworkMonitorAutoDetect.java", # TODDO(sakal): Break dependencies and move to base_java.
|
||
|
"api/org/webrtc/PeerConnection.java",
|
||
|
"api/org/webrtc/PeerConnectionFactory.java",
|
||
|
"api/org/webrtc/RTCStats.java",
|
||
|
"api/org/webrtc/RTCStatsCollectorCallback.java",
|
||
|
"api/org/webrtc/RTCStatsReport.java",
|
||
|
"api/org/webrtc/RtpParameters.java",
|
||
|
"api/org/webrtc/RtpReceiver.java",
|
||
|
"api/org/webrtc/RtpSender.java",
|
||
|
"api/org/webrtc/RtpTransceiver.java",
|
||
|
"api/org/webrtc/SdpObserver.java",
|
||
|
"api/org/webrtc/SessionDescription.java",
|
||
|
"api/org/webrtc/StatsObserver.java",
|
||
|
"api/org/webrtc/StatsReport.java",
|
||
|
"api/org/webrtc/TurnCustomizer.java",
|
||
|
"api/org/webrtc/VideoSource.java",
|
||
|
"api/org/webrtc/VideoTrack.java",
|
||
|
"src/java/org/webrtc/NativeLibrary.java",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":audio_api_java",
|
||
|
":base_java",
|
||
|
":logging_java",
|
||
|
":video_api_java",
|
||
|
":video_java",
|
||
|
"//modules/audio_device:audio_device_java",
|
||
|
"//rtc_base:base_java",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
# Old target that pulls in everything. This will be going away in the future,
|
||
|
# clients should depend on individual video_java etc. targets instead.
|
||
|
rtc_android_library("libjingle_peerconnection_java") {
|
||
|
java_files = [ "src/java/org/webrtc/Empty.java" ]
|
||
|
|
||
|
deps = [
|
||
|
":audio_api_java",
|
||
|
":base_java",
|
||
|
":camera_java",
|
||
|
":filevideo_java",
|
||
|
":hwcodecs_java",
|
||
|
":java_audio_device_module_java",
|
||
|
":peerconnection_java",
|
||
|
":screencapturer_java",
|
||
|
":surfaceviewrenderer_java",
|
||
|
":video_api_java",
|
||
|
":video_java",
|
||
|
"//modules/audio_device:audio_device_java",
|
||
|
"//rtc_base:base_java",
|
||
|
]
|
||
|
|
||
|
if (rtc_use_builtin_sw_codecs) {
|
||
|
deps += [ ":swcodecs_java" ]
|
||
|
|
||
|
java_files += [
|
||
|
"api/org/webrtc/DefaultVideoDecoderFactory.java",
|
||
|
"api/org/webrtc/DefaultVideoEncoderFactory.java",
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
rtc_android_library("libjingle_peerconnection_metrics_default_java") {
|
||
|
java_files = [ "api/org/webrtc/Metrics.java" ]
|
||
|
|
||
|
deps = [
|
||
|
":base_java",
|
||
|
":libjingle_peerconnection_java",
|
||
|
"../../rtc_base:base_java",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
if (rtc_include_tests) {
|
||
|
rtc_instrumentation_test_apk("libjingle_peerconnection_android_unittest") {
|
||
|
apk_name = "libjingle_peerconnection_android_unittest"
|
||
|
android_manifest = "instrumentationtests/AndroidManifest.xml"
|
||
|
|
||
|
java_files = [
|
||
|
"instrumentationtests/src/org/webrtc/Camera1CapturerUsingByteBufferTest.java",
|
||
|
"instrumentationtests/src/org/webrtc/Camera1CapturerUsingTextureTest.java",
|
||
|
"instrumentationtests/src/org/webrtc/Camera2CapturerTest.java",
|
||
|
"instrumentationtests/src/org/webrtc/CameraVideoCapturerTestFixtures.java",
|
||
|
"instrumentationtests/src/org/webrtc/DefaultVideoEncoderFactoryTest.java",
|
||
|
"instrumentationtests/src/org/webrtc/EglRendererTest.java",
|
||
|
"instrumentationtests/src/org/webrtc/FileVideoCapturerTest.java",
|
||
|
"instrumentationtests/src/org/webrtc/GlRectDrawerTest.java",
|
||
|
"instrumentationtests/src/org/webrtc/HardwareVideoDecoderTest.java",
|
||
|
"instrumentationtests/src/org/webrtc/HardwareVideoEncoderTest.java",
|
||
|
"instrumentationtests/src/org/webrtc/MediaCodecVideoEncoderTest.java",
|
||
|
"instrumentationtests/src/org/webrtc/NetworkMonitorTest.java",
|
||
|
"instrumentationtests/src/org/webrtc/PeerConnectionFactoryTest.java",
|
||
|
"instrumentationtests/src/org/webrtc/PeerConnectionTest.java",
|
||
|
"instrumentationtests/src/org/webrtc/RendererCommonTest.java",
|
||
|
"instrumentationtests/src/org/webrtc/SurfaceTextureHelperTest.java",
|
||
|
"instrumentationtests/src/org/webrtc/SurfaceViewRendererOnMeasureTest.java",
|
||
|
"instrumentationtests/src/org/webrtc/VideoFileRendererTest.java",
|
||
|
"instrumentationtests/src/org/webrtc/WebRtcJniBootTest.java",
|
||
|
"instrumentationtests/src/org/webrtc/YuvHelperTest.java",
|
||
|
]
|
||
|
|
||
|
data = [
|
||
|
"../../sdk/android/instrumentationtests/src/org/webrtc/capturetestvideo.y4m",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":base_java",
|
||
|
":libjingle_peerconnection_java",
|
||
|
":libjingle_peerconnection_metrics_default_java",
|
||
|
":video_api_java",
|
||
|
"//base:base_java",
|
||
|
"//base:base_java_test_support",
|
||
|
"//rtc_base:base_java",
|
||
|
"//third_party/android_support_test_runner:rules_java",
|
||
|
"//third_party/android_support_test_runner:runner_java",
|
||
|
"//third_party/junit",
|
||
|
]
|
||
|
|
||
|
shared_libraries = [ "../../sdk/android:libjingle_peerconnection_so" ]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
# The native API is currently experimental and may change without notice.
|
||
|
group("native_api") {
|
||
|
deps = [
|
||
|
":native_api_audio_device_module",
|
||
|
":native_api_base",
|
||
|
":native_api_codecs",
|
||
|
":native_api_jni",
|
||
|
":native_api_peerconnection",
|
||
|
":native_api_video",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
rtc_static_library("native_api_base") {
|
||
|
visibility = [ "*" ]
|
||
|
sources = [
|
||
|
"native_api/base/init.cc",
|
||
|
"native_api/base/init.h",
|
||
|
"native_api/base/networkmonitor.cc",
|
||
|
"native_api/base/networkmonitor.h",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":base_jni",
|
||
|
":native_api_jni",
|
||
|
"//rtc_base:checks",
|
||
|
"//rtc_base:rtc_base",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
generate_jni("generated_native_api_jni") {
|
||
|
sources = [
|
||
|
"src/java/org/webrtc/JniHelper.java",
|
||
|
"src/java/org/webrtc/WebRtcClassLoader.java",
|
||
|
]
|
||
|
jni_package = ""
|
||
|
namespace = "webrtc::jni"
|
||
|
jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
|
||
|
}
|
||
|
|
||
|
# JNI helpers that are also needed from internal JNI code. Cannot depend on any
|
||
|
# other JNI targets than internal_jni.
|
||
|
rtc_static_library("native_api_jni") {
|
||
|
visibility = [ "*" ]
|
||
|
sources = [
|
||
|
"native_api/jni/class_loader.cc",
|
||
|
"native_api/jni/java_types.cc",
|
||
|
"native_api/jni/jvm.cc",
|
||
|
"src/jni/jni_generator_helper.cc",
|
||
|
"src/jni/jni_generator_helper.h",
|
||
|
]
|
||
|
|
||
|
public = [
|
||
|
"native_api/jni/class_loader.h",
|
||
|
"native_api/jni/java_types.h",
|
||
|
"native_api/jni/jni_int_wrapper.h",
|
||
|
"native_api/jni/jvm.h",
|
||
|
"native_api/jni/scoped_java_ref.h",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":generated_external_classes_jni",
|
||
|
":generated_native_api_jni",
|
||
|
":internal_jni",
|
||
|
"//api:optional",
|
||
|
"//rtc_base:checks",
|
||
|
"//rtc_base:rtc_base_approved",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
# API for wrapping Java VideoDecoderFactory/VideoEncoderFactory classes to C++
|
||
|
# objects.
|
||
|
rtc_static_library("native_api_codecs") {
|
||
|
visibility = [ "*" ]
|
||
|
allow_poison = [
|
||
|
"audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
|
||
|
"software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
|
||
|
]
|
||
|
sources = [
|
||
|
"native_api/codecs/wrapper.cc",
|
||
|
"native_api/codecs/wrapper.h",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":base_jni",
|
||
|
":video_jni",
|
||
|
"//api/video_codecs:video_codecs_api",
|
||
|
"//rtc_base:checks",
|
||
|
"//rtc_base:rtc_base_approved",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
# API for creating Java PeerConnectionFactory from C++ equivalents.
|
||
|
rtc_static_library("native_api_peerconnection") {
|
||
|
visibility = [ "*" ]
|
||
|
sources = [
|
||
|
"native_api/peerconnection/peerconnectionfactory.cc",
|
||
|
"native_api/peerconnection/peerconnectionfactory.h",
|
||
|
]
|
||
|
|
||
|
if (is_clang) {
|
||
|
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
||
|
suppressed_configs += [
|
||
|
"//build/config/clang:extra_warnings",
|
||
|
"//build/config/clang:find_bad_constructs",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
deps = [
|
||
|
":base_jni",
|
||
|
":peerconnection_jni",
|
||
|
"//api:libjingle_peerconnection_api",
|
||
|
"//api/video_codecs:video_codecs_api",
|
||
|
"//rtc_base:rtc_base",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
# API for creating C++ wrapper implementations of api/mediastreaminterface.h
|
||
|
# video interfaces from their Java equivalents.
|
||
|
rtc_static_library("native_api_video") {
|
||
|
visibility = [ "*" ]
|
||
|
allow_poison = [
|
||
|
"audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
|
||
|
"software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
|
||
|
]
|
||
|
sources = [
|
||
|
"native_api/video/videosource.cc",
|
||
|
"native_api/video/videosource.h",
|
||
|
"native_api/video/wrapper.cc",
|
||
|
"native_api/video/wrapper.h",
|
||
|
]
|
||
|
deps = [
|
||
|
":native_api_jni",
|
||
|
":video_jni",
|
||
|
"//api:libjingle_peerconnection_api",
|
||
|
"//api/video:video_frame",
|
||
|
"//rtc_base:rtc_base_approved",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
generate_jni("generated_native_unittests_jni") {
|
||
|
testonly = true
|
||
|
|
||
|
sources = [
|
||
|
"native_unittests/org/webrtc/ApplicationContextProvider.java",
|
||
|
"native_unittests/org/webrtc/BuildInfo.java",
|
||
|
"native_unittests/org/webrtc/JavaTypesTestHelper.java",
|
||
|
"native_unittests/org/webrtc/JavaVideoSourceTestHelper.java",
|
||
|
"native_unittests/org/webrtc/PeerConnectionFactoryInitializationHelper.java",
|
||
|
]
|
||
|
jni_package = ""
|
||
|
namespace = "webrtc::jni"
|
||
|
jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
|
||
|
}
|
||
|
|
||
|
rtc_android_library("native_unittests_java") {
|
||
|
testonly = true
|
||
|
|
||
|
java_files = [
|
||
|
"native_unittests/org/webrtc/ApplicationContextProvider.java",
|
||
|
"native_unittests/org/webrtc/BuildInfo.java",
|
||
|
"native_unittests/org/webrtc/JavaTypesTestHelper.java",
|
||
|
"native_unittests/org/webrtc/JavaVideoSourceTestHelper.java",
|
||
|
"native_unittests/org/webrtc/PeerConnectionFactoryInitializationHelper.java",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":libjingle_peerconnection_java",
|
||
|
"//third_party/android_support_test_runner:runner_java",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
rtc_source_set("native_unittests") {
|
||
|
testonly = true
|
||
|
|
||
|
sources = [
|
||
|
"native_unittests/audio_device/audio_device_unittest.cc",
|
||
|
"native_unittests/java_types_unittest.cc",
|
||
|
"native_unittests/peerconnection/peerconnectionfactory_unittest.cc",
|
||
|
"native_unittests/test_jni_onload.cc",
|
||
|
"native_unittests/video/videosource_unittest.cc",
|
||
|
]
|
||
|
|
||
|
data = [
|
||
|
"../../resources/audio_device/audio_short44.pcm",
|
||
|
"../../resources/audio_device/audio_short48.pcm",
|
||
|
]
|
||
|
|
||
|
if (is_clang) {
|
||
|
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
||
|
suppressed_configs += [
|
||
|
"//build/config/clang:extra_warnings",
|
||
|
"//build/config/clang:find_bad_constructs",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
deps = [
|
||
|
":audio_device_module_base",
|
||
|
":audio_jni",
|
||
|
":base_jni",
|
||
|
":generated_native_unittests_jni",
|
||
|
":media_jni",
|
||
|
":native_api_audio_device_module",
|
||
|
":native_api_base",
|
||
|
":native_api_jni",
|
||
|
":native_api_peerconnection",
|
||
|
":native_api_video",
|
||
|
":native_unittests_java",
|
||
|
":opensles_audio_device_module",
|
||
|
":video_jni",
|
||
|
"../../system_wrappers:system_wrappers",
|
||
|
"//api/audio_codecs:builtin_audio_decoder_factory",
|
||
|
"//api/audio_codecs:builtin_audio_encoder_factory",
|
||
|
"//api/video:video_frame",
|
||
|
"//media:rtc_audio_video",
|
||
|
"//media:rtc_internal_video_codecs",
|
||
|
"//media:rtc_media_base",
|
||
|
"//modules/audio_device:audio_device",
|
||
|
"//modules/audio_device:mock_audio_device",
|
||
|
"//modules/audio_processing:audio_processing",
|
||
|
"//modules/utility:utility",
|
||
|
"//pc:libjingle_peerconnection",
|
||
|
"//rtc_base:checks",
|
||
|
"//rtc_base:rtc_base_approved",
|
||
|
"//test:fileutils",
|
||
|
"//test:test_support",
|
||
|
"//testing/gtest",
|
||
|
]
|
||
|
}
|