| # 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. |
| |
| if (is_android) { |
| 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", |
| ] |
| } |
| } |
| |
| ##################### |
| # Aggregate targets # |
| ##################### |
| |
| 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", |
| ":default_video_codec_factory_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", |
| ":swcodecs_java", |
| ":video_api_java", |
| ":video_java", |
| "../../modules/audio_device:audio_device_java", |
| "../../rtc_base:base_java", |
| ] |
| } |
| |
| # 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", |
| ] |
| } |
| |
| # 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", |
| ] |
| } |
| |
| 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", |
| ] |
| } |
| |
| 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 = [ # no-presubmit-check TODO(webrtc:8603) |
| ":audio_jni", |
| ":base_jni", |
| ":java_audio_device_module_jni", |
| ":media_jni", |
| ":peerconnection_jni", |
| ":video_jni", |
| "../../pc:create_pc_factory", |
| ] |
| } |
| |
| rtc_static_library("libjingle_peerconnection_metrics_default_jni") { |
| visibility = [ "*" ] |
| |
| allow_poison = [ "software_video_codecs" ] # TODO(bugs.webrtc.org/7925): Remove. |
| |
| sources = [ |
| "src/jni/androidmetrics.cc", |
| ] |
| |
| deps = [ |
| ":base_jni", |
| ":generated_metrics_jni", |
| ":native_api_jni", |
| ":peerconnection_jni", |
| "../../pc:peerconnection", |
| "../../system_wrappers:metrics", |
| ] |
| } |
| |
| 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" |
| } |
| |
| # 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" |
| } |
| |
| ####################### |
| # Public Java modules # |
| ####################### |
| |
| # Core targets. |
| |
| # 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("audio_api_java") { |
| java_files = [ "api/org/webrtc/audio/AudioDeviceModule.java" ] |
| |
| deps = [ |
| ":base_java", |
| "//rtc_base:base_java", |
| ] |
| } |
| |
| rtc_android_library("video_api_java") { |
| java_files = [ |
| "api/org/webrtc/EncodedImage.java", |
| "api/org/webrtc/VideoCodecInfo.java", |
| "api/org/webrtc/CapturerObserver.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/VideoSink.java", |
| ] |
| |
| deps = [ |
| ":base_java", |
| "//rtc_base:base_java", |
| ] |
| } |
| |
| rtc_android_library("video_java") { |
| java_files = [ |
| "api/org/webrtc/EglBase.java", |
| "api/org/webrtc/EglRenderer.java", |
| "api/org/webrtc/GlRectDrawer.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/VideoCapturer.java", |
| "api/org/webrtc/VideoDecoderFallback.java", |
| "api/org/webrtc/VideoEncoderFallback.java", |
| "api/org/webrtc/VideoFrameDrawer.java", |
| "api/org/webrtc/YuvConverter.java", |
| "api/org/webrtc/YuvHelper.java", |
| "src/java/org/webrtc/EglBase10.java", |
| "src/java/org/webrtc/EglBase14.java", |
| "src/java/org/webrtc/GlGenericDrawer.java", |
| "src/java/org/webrtc/H264Utils.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("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/CryptoOptions.java", |
| "api/org/webrtc/DataChannel.java", |
| "api/org/webrtc/DtmfSender.java", |
| "api/org/webrtc/FecControllerFactoryFactoryInterface.java", |
| "api/org/webrtc/MediaTransportFactoryFactory.java", |
| "api/org/webrtc/FrameDecryptor.java", |
| "api/org/webrtc/FrameEncryptor.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/PeerConnectionDependencies.java", |
| "api/org/webrtc/PeerConnectionFactory.java", |
| "api/org/webrtc/RtcCertificatePem.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/SSLCertificateVerifier.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", |
| "src/java/org/webrtc/NativeCapturerObserver.java", |
| ] |
| |
| deps = [ |
| ":audio_api_java", |
| ":base_java", |
| ":default_video_codec_factory_java", |
| ":logging_java", |
| ":swcodecs_java", |
| ":video_api_java", |
| ":video_java", |
| "//modules/audio_device:audio_device_java", |
| "//rtc_base:base_java", |
| ] |
| } |
| |
| # Modules, in alphabetical order. |
| |
| 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("default_video_codec_factory_java") { |
| java_files = [ |
| "api/org/webrtc/DefaultVideoDecoderFactory.java", |
| "api/org/webrtc/DefaultVideoEncoderFactory.java", |
| ] |
| |
| deps = [ |
| ":hwcodecs_java", |
| ":swcodecs_java", |
| ":video_api_java", |
| ":video_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", |
| ] |
| } |
| |
| rtc_android_library("hwcodecs_java") { |
| java_files = [ |
| "api/org/webrtc/HardwareVideoDecoderFactory.java", |
| "api/org/webrtc/HardwareVideoEncoderFactory.java", |
| "api/org/webrtc/PlatformSoftwareVideoDecoderFactory.java", |
| "src/java/org/webrtc/AndroidVideoDecoder.java", |
| "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/HardwareVideoEncoder.java", |
| "src/java/org/webrtc/MediaCodecUtils.java", |
| "src/java/org/webrtc/MediaCodecVideoDecoderFactory.java", |
| "src/java/org/webrtc/MediaCodecWrapper.java", |
| "src/java/org/webrtc/MediaCodecWrapperFactory.java", |
| "src/java/org/webrtc/MediaCodecWrapperFactoryImpl.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", |
| ] |
| } |
| |
| 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", |
| ] |
| } |
| |
| 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("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", |
| ] |
| } |
| |
| ################################ |
| # JNI targets for Java modules # |
| ################################ |
| |
| # Mirrors the order of targets in the section above. |
| |
| 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", |
| "../../rtc_base:checks", |
| "../../rtc_base:rtc_base", |
| "../../rtc_base:rtc_base_approved", |
| "../../system_wrappers:metrics", |
| "//third_party/abseil-cpp/absl/memory", |
| "//third_party/abseil-cpp/absl/types:optional", |
| ] |
| } |
| |
| 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_static_library("video_jni") { |
| sources = [] |
| deps = [ |
| "../../system_wrappers:field_trial", |
| ] |
| |
| sources += [ |
| "src/jni/androidmediacodeccommon.h", |
| "src/jni/androidmediadecoder.cc", |
| "src/jni/androidmediaencoder.cc", |
| "src/jni/androidvideotracksource.cc", |
| "src/jni/androidvideotracksource.h", |
| "src/jni/encodedimage.cc", |
| "src/jni/encodedimage.h", |
| "src/jni/h264utils.cc", |
| "src/jni/javai420buffer.cc", |
| "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/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/videosink.cc", |
| "src/jni/videosink.h", |
| "src/jni/videosource.cc", |
| "src/jni/videotrack.cc", |
| "src/jni/yuvhelper.cc", |
| ] |
| |
| deps += [ |
| ":base_jni", |
| ":generated_video_jni", |
| ":native_api_jni", |
| ":videoframe_jni", |
| ":vp8_jni", # TODO(bugs.webrtc.org/7925): Remove. |
| ":vp9_jni", # TODO(bugs.webrtc.org/7925): Remove. |
| "../..:webrtc_common", |
| "../../api:libjingle_peerconnection_api", |
| "../../api/video:encoded_image", |
| "../../api/video:video_frame", |
| "../../api/video_codecs:builtin_video_decoder_factory", |
| "../../api/video_codecs:builtin_video_encoder_factory", |
| "../../api/video_codecs:rtc_software_fallback_wrappers", |
| "../../api/video_codecs:video_codecs_api", |
| "../../common_video:common_video", |
| "../../media:rtc_audio_video", |
| "../../media:rtc_h264_profile_id", |
| "../../media:rtc_internal_video_codecs", |
| "../../media:rtc_media_base", |
| "../../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", |
| "//third_party/libyuv", |
| ] |
| } |
| |
| 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/cryptooptions.cc", |
| "src/jni/pc/cryptooptions.h", |
| "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/rtccertificate.cc", |
| "src/jni/pc/rtccertificate.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/sslcertificateverifierwrapper.cc", |
| "src/jni/pc/sslcertificateverifierwrapper.h", |
| "src/jni/pc/statsobserver.cc", |
| "src/jni/pc/statsobserver.h", |
| "src/jni/pc/turncustomizer.cc", |
| "src/jni/pc/turncustomizer.h", |
| ] |
| |
| 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", |
| "//third_party/abseil-cpp/absl/memory", |
| "//third_party/abseil-cpp/absl/types:optional", |
| ] |
| } |
| |
| # 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", |
| ] |
| } |
| |
| ###################### |
| # Native API targets # |
| ###################### |
| |
| # Core targets. |
| |
| # 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", |
| "//rtc_base:checks", |
| "//rtc_base:rtc_base_approved", |
| "//third_party/abseil-cpp/absl/types:optional", |
| ] |
| } |
| |
| 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", |
| "//third_party/abseil-cpp/absl/memory", |
| ] |
| } |
| |
| # Modules, in alphabetical order. |
| |
| 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", |
| "//third_party/abseil-cpp/absl/memory", |
| ] |
| if (rtc_enable_android_aaudio) { |
| deps += [ ":aaudio_audio_device_module" ] |
| } |
| } |
| |
| # 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", |
| ":native_api_jni", |
| ":video_jni", |
| "//api/video_codecs:video_codecs_api", |
| "//rtc_base:checks", |
| "//rtc_base:rtc_base_approved", |
| "//third_party/abseil-cpp/absl/memory", |
| ] |
| } |
| |
| # API for creating Java PeerConnectionFactory from C++ equivalents. |
| rtc_static_library("native_api_peerconnection") { |
| visibility = [ "*" ] |
| |
| allow_poison = [ "software_video_codecs" ] # TODO(bugs.webrtc.org/7925): Remove. |
| |
| sources = [ |
| "native_api/peerconnection/peerconnectionfactory.cc", |
| "native_api/peerconnection/peerconnectionfactory.h", |
| ] |
| |
| 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", |
| ":videoframe_jni", |
| "//api:libjingle_peerconnection_api", |
| "//api/video:video_frame", |
| "//rtc_base:rtc_base", |
| "//rtc_base:rtc_base_approved", |
| "//third_party/abseil-cpp/absl/memory", |
| ] |
| } |
| |
| #################### |
| # Internal targets # |
| #################### |
| |
| rtc_android_library("logging_java") { |
| java_files = [ "src/java/org/webrtc/JNILogging.java" ] |
| |
| deps = [ |
| ":base_java", |
| "//rtc_base:base_java", |
| ] |
| } |
| |
| rtc_static_library("null_audio_jni") { |
| sources = [ |
| "src/jni/pc/null_audio.cc", |
| ] |
| |
| deps = [ |
| ":base_jni", |
| ] |
| } |
| |
| rtc_static_library("null_video_jni") { |
| sources = [ |
| "src/jni/pc/null_video.cc", |
| ] |
| |
| deps = [ |
| ":base_jni", |
| "../../api/video_codecs:video_codecs_api", |
| ] |
| } |
| |
| rtc_static_library("null_media_jni") { |
| sources = [ |
| "src/jni/pc/null_media.cc", |
| ] |
| |
| deps = [ |
| ":base_jni", |
| ] |
| } |
| |
| 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", |
| ] |
| } |
| |
| # 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_static_library("videoframe_jni") { |
| sources = [ |
| "src/jni/videoframe.cc", |
| "src/jni/videoframe.h", |
| "src/jni/wrapped_native_i420_buffer.cc", |
| "src/jni/wrapped_native_i420_buffer.h", |
| ] |
| |
| deps = [ |
| ":base_jni", |
| ":generated_video_jni", |
| ":native_api_jni", |
| "../../api/video:video_frame", |
| "../../common_video:common_video", |
| "../../rtc_base:checks", |
| "../../rtc_base:rtc_base", |
| "../../rtc_base:rtc_base_approved", |
| ] |
| } |
| |
| rtc_static_library("vp8_jni") { |
| sources = [ |
| "src/jni/vp8codec.cc", |
| ] |
| |
| deps = [ |
| ":base_jni", |
| ":generated_vp8_jni", |
| "../../modules/video_coding:webrtc_vp8", |
| ] |
| } |
| |
| rtc_static_library("vp9_jni") { |
| sources = [ |
| "src/jni/vp9codec.cc", |
| ] |
| |
| deps = [ |
| ":base_jni", |
| ":generated_vp9_jni", |
| "../../modules/video_coding:webrtc_vp9", |
| ] |
| } |
| |
| 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_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", |
| "../../modules/audio_device:audio_device_api", |
| "../../modules/audio_device:audio_device_buffer", |
| "../../rtc_base:checks", |
| "../../rtc_base:rtc_base_approved", |
| "../../system_wrappers:metrics", |
| "//third_party/abseil-cpp/absl/types:optional", |
| ] |
| } |
| |
| 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", |
| "../../modules/audio_device:audio_device", |
| "../../modules/audio_device:audio_device_buffer", |
| "../../rtc_base:checks", |
| "../../rtc_base:rtc_base_approved", |
| "../../system_wrappers:metrics", |
| "//third_party/abseil-cpp/absl/types:optional", |
| ] |
| } |
| |
| 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", |
| "../../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", |
| "//third_party/abseil-cpp/absl/types:optional", |
| ] |
| } |
| } |
| |
| 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", |
| "../../modules/audio_device:audio_device", |
| "../../modules/audio_device:audio_device_buffer", |
| "../../rtc_base:checks", |
| "../../rtc_base:rtc_base_approved", |
| "//third_party/abseil-cpp/absl/memory", |
| "//third_party/abseil-cpp/absl/types:optional", |
| ] |
| } |
| |
| ######################### |
| # Generated JNI targets # |
| ######################### |
| |
| 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" |
| } |
| |
| 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" |
| } |
| |
| # Generated JNI for public JNI targets, matching order of targets |
| |
| 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_jni("generated_video_jni") { |
| sources = [ |
| "api/org/webrtc/EncodedImage.java", |
| "api/org/webrtc/JavaI420Buffer.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/VideoSink.java", |
| "api/org/webrtc/VideoSource.java", |
| "api/org/webrtc/VideoTrack.java", |
| "api/org/webrtc/YuvHelper.java", |
| "src/java/org/webrtc/H264Utils.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", |
| ] |
| jni_package = "" |
| namespace = "webrtc::jni" |
| jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h" |
| } |
| |
| 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" |
| } |
| |
| 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" |
| } |
| |
| generate_jni("generated_peerconnection_jni") { |
| sources = [ |
| "api/org/webrtc/AudioTrack.java", |
| "api/org/webrtc/CallSessionFileRotatingLogSink.java", |
| "api/org/webrtc/CryptoOptions.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/RtcCertificatePem.java", |
| "api/org/webrtc/RtpParameters.java", |
| "api/org/webrtc/RtpReceiver.java", |
| "api/org/webrtc/RtpSender.java", |
| "api/org/webrtc/RtpTransceiver.java", |
| "api/org/webrtc/SSLCertificateVerifier.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" |
| } |
| |
| 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" |
| } |
| |
| # Generated JNI for native API targets |
| |
| 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" |
| } |
| |
| # Generated JNI for internal targets. |
| |
| 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" |
| } |
| |
| 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" |
| } |
| |
| ################ |
| # Test targets # |
| ################ |
| |
| if (rtc_include_tests) { |
| rtc_instrumentation_test_apk("android_instrumentation_test_apk") { |
| apk_name = "android_instrumentation_test_apk" |
| android_manifest = "instrumentationtests/AndroidManifest.xml" |
| |
| java_files = [ |
| "instrumentationtests/src/org/webrtc/AndroidVideoDecoderInstrumentationTest.java", |
| "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/HardwareVideoEncoderTest.java", |
| "instrumentationtests/src/org/webrtc/LoggableTest.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/RtcCertificatePemTest.java", |
| "instrumentationtests/src/org/webrtc/SurfaceTextureHelperTest.java", |
| "instrumentationtests/src/org/webrtc/SurfaceViewRendererOnMeasureTest.java", |
| "instrumentationtests/src/org/webrtc/TestConstants.java", |
| "instrumentationtests/src/org/webrtc/VideoFileRendererTest.java", |
| "instrumentationtests/src/org/webrtc/VideoFrameBufferTest.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", |
| ":default_video_codec_factory_java", |
| ":libjingle_peerconnection_java", |
| ":libjingle_peerconnection_metrics_default_java", |
| ":video_api_java", |
| ":video_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/google-truth:google_truth_java", |
| "//third_party/junit", |
| ] |
| |
| shared_libraries = [ |
| "../../sdk/android:libjingle_peerconnection_instrumentationtests_so", |
| ] |
| } |
| } |
| |
| rtc_shared_library("libjingle_peerconnection_instrumentationtests_so") { |
| testonly = true |
| 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 = [ |
| ":instrumentationtests_jni", |
| ":libjingle_peerconnection_jni", |
| ":libjingle_peerconnection_metrics_default_jni", |
| "../../pc:libjingle_peerconnection", |
| "../../rtc_base:rtc_base", |
| ] |
| output_extension = "so" |
| } |
| |
| rtc_static_library("instrumentationtests_jni") { |
| testonly = true |
| sources = [ |
| "instrumentationtests/loggable_test.cc", |
| ] |
| |
| deps = [ |
| ":base_jni", |
| ":native_api_jni", |
| "../../rtc_base:rtc_base_approved", |
| ] |
| } |
| |
| rtc_source_set("native_unittests") { |
| testonly = true |
| |
| sources = [ |
| "native_unittests/audio_device/audio_device_unittest.cc", |
| "native_unittests/codecs/wrapper_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: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_codecs", |
| ":native_api_jni", |
| ":native_api_peerconnection", |
| ":native_api_video", |
| ":opensles_audio_device_module", |
| ":video_jni", |
| "../../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", |
| "../../system_wrappers:system_wrappers", |
| "../../test:fileutils", |
| "../../test:test_support", |
| "../../testing/gtest", |
| "//third_party/abseil-cpp/absl/memory", |
| ] |
| } |
| |
| 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/CodecsWrapperTestHelper.java", |
| "native_unittests/org/webrtc/JavaTypesTestHelper.java", |
| "native_unittests/org/webrtc/JavaVideoSourceTestHelper.java", |
| "native_unittests/org/webrtc/PeerConnectionFactoryInitializationHelper.java", |
| ] |
| |
| deps = [ |
| ":base_java", |
| ":java_audio_device_module_java", |
| ":peerconnection_java", |
| ":video_api_java", |
| ":video_java", |
| "../../rtc_base:base_java", |
| "//third_party/android_support_test_runner:runner_java", |
| ] |
| } |
| |
| 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/CodecsWrapperTestHelper.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" |
| } |
| } |