| Index: webrtc/sdk/android/BUILD.gn
|
| diff --git a/webrtc/sdk/android/BUILD.gn b/webrtc/sdk/android/BUILD.gn
|
| index 9fcedf907b7a5ce823aba7d243ef468c458179b3..4a5bb31080b74d74fcad78f52ca51dd2263a0d85 100644
|
| --- a/webrtc/sdk/android/BUILD.gn
|
| +++ b/webrtc/sdk/android/BUILD.gn
|
| @@ -23,29 +23,73 @@ config("libjingle_peerconnection_jni_warnings_config") {
|
| }
|
|
|
| rtc_static_library("libjingle_peerconnection_jni") {
|
| + public_deps = [
|
| + ":audio_jni",
|
| + ":base_jni",
|
| + ":peerconnection_jni",
|
| + ":video_jni",
|
| + ]
|
| +}
|
| +
|
| +rtc_static_library("base_jni") {
|
| sources = [
|
| - "src/jni/androidhistogram_jni.cc",
|
| "src/jni/androidmediacodeccommon.h",
|
| + "src/jni/classreferenceholder.cc",
|
| + "src/jni/classreferenceholder.h",
|
| + "src/jni/jni_helpers.cc",
|
| + "src/jni/jni_helpers.h",
|
| + "src/jni/ownedfactoryandthreads.cc",
|
| + "src/jni/ownedfactoryandthreads.h",
|
| + ]
|
| +
|
| + deps = [
|
| + "//webrtc/api:libjingle_peerconnection_api",
|
| + "//webrtc/base:rtc_base",
|
| + "//webrtc/base:rtc_base_approved",
|
| + ]
|
| +
|
| + 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",
|
| + ]
|
| + }
|
| +}
|
| +
|
| +rtc_static_library("audio_jni") {
|
| + deps = [
|
| + ":base_jni",
|
| + "//webrtc/pc:pc_audio",
|
| + "//webrtc/pc:pc_media",
|
| + "//webrtc/voice_engine:voice_engine",
|
| + ]
|
| +}
|
| +
|
| +rtc_static_library("null_audio_jni") {
|
| + deps = [
|
| + ":base_jni",
|
| + "//webrtc/pc:pc_null_audio",
|
| + "//webrtc/pc:pc_null_media",
|
| + ]
|
| +}
|
| +
|
| +rtc_static_library("video_jni") {
|
| + sources = [
|
| + "src/jni/androidhistogram_jni.cc",
|
| "src/jni/androidmediadecoder_jni.cc",
|
| "src/jni/androidmediadecoder_jni.h",
|
| "src/jni/androidmediaencoder_jni.cc",
|
| "src/jni/androidmediaencoder_jni.h",
|
| - "src/jni/androidnetworkmonitor_jni.cc",
|
| - "src/jni/androidnetworkmonitor_jni.h",
|
| "src/jni/androidvideotracksource.cc",
|
| "src/jni/androidvideotracksource.h",
|
| "src/jni/androidvideotracksource_jni.cc",
|
| - "src/jni/classreferenceholder.cc",
|
| - "src/jni/classreferenceholder.h",
|
| - "src/jni/jni_helpers.cc",
|
| - "src/jni/jni_helpers.h",
|
| "src/jni/native_handle_impl.cc",
|
| "src/jni/native_handle_impl.h",
|
| - "src/jni/peerconnection_jni.cc",
|
| - "src/jni/rtcstatscollectorcallbackwrapper.cc",
|
| - "src/jni/rtcstatscollectorcallbackwrapper.h",
|
| "src/jni/surfacetexturehelper_jni.cc",
|
| "src/jni/surfacetexturehelper_jni.h",
|
| + "src/jni/video_jni.cc",
|
| + "src/jni/video_renderer_jni.cc",
|
| ]
|
|
|
| configs += [ ":libjingle_peerconnection_jni_warnings_config" ]
|
| @@ -69,20 +113,20 @@ rtc_static_library("libjingle_peerconnection_jni") {
|
| }
|
|
|
| deps = [
|
| - "../..:webrtc_common",
|
| - "../../api:video_frame_api",
|
| - "../../api/video_codecs:video_codecs_api",
|
| - "../../base:rtc_base",
|
| - "../../base:rtc_base_approved",
|
| - "../../base:rtc_task_queue",
|
| - "../../common_video:common_video",
|
| - "../../media:rtc_media",
|
| - "../../media:rtc_media_base",
|
| - "../../modules/utility:utility",
|
| - "../../modules/video_coding:video_coding_utility",
|
| - "../../system_wrappers:system_wrappers",
|
| - "../../voice_engine:voice_engine",
|
| - "//webrtc/pc:libjingle_peerconnection",
|
| + ":base_jni",
|
| + "//webrtc:webrtc_common",
|
| + "//webrtc/api:libjingle_peerconnection_api",
|
| + "//webrtc/api:video_frame_api",
|
| + "//webrtc/api/video_codecs:video_codecs_api",
|
| + "//webrtc/base:rtc_base",
|
| + "//webrtc/base:rtc_base_approved",
|
| + "//webrtc/base:rtc_task_queue",
|
| + "//webrtc/common_video:common_video",
|
| + "//webrtc/media:rtc_audio_video",
|
| + "//webrtc/media:rtc_media_base_data",
|
| + "//webrtc/modules/video_coding:video_coding_utility",
|
| + "//webrtc/pc:pc_media",
|
| + "//webrtc/system_wrappers:system_wrappers",
|
| ]
|
|
|
| if (rtc_build_libyuv) {
|
| @@ -96,6 +140,86 @@ rtc_static_library("libjingle_peerconnection_jni") {
|
| }
|
| }
|
|
|
| +rtc_static_library("null_video_jni") {
|
| + sources = [
|
| + "src/jni/null_video_jni.cc",
|
| + ]
|
| +
|
| + deps = [
|
| + ":base_jni",
|
| + "//webrtc/base:rtc_base_approved",
|
| + "//webrtc/pc:pc_null_media",
|
| + ]
|
| +
|
| + 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",
|
| + ]
|
| + }
|
| +}
|
| +
|
| +rtc_static_library("peerconnection_jni") {
|
| + sources = [
|
| + "src/jni/androidnetworkmonitor_jni.cc",
|
| + "src/jni/androidnetworkmonitor_jni.h",
|
| + "src/jni/peerconnection_jni.cc",
|
| + "src/jni/rtcstatscollectorcallbackwrapper.cc",
|
| + "src/jni/rtcstatscollectorcallbackwrapper.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",
|
| + "../..:webrtc_common",
|
| + "//webrtc/base:rtc_base",
|
| + "//webrtc/base:rtc_base_approved",
|
| + "//webrtc/base:rtc_task_queue",
|
| + "//webrtc/media:rtc_data",
|
| + "//webrtc/media:rtc_media_base_data",
|
| + "//webrtc/modules/utility:utility",
|
| + "//webrtc/pc:peerconnection",
|
| + "//webrtc/system_wrappers:system_wrappers",
|
| + ]
|
| +}
|
| +
|
| +rtc_static_library("metrics_jni") {
|
| + sources = [
|
| + "src/jni/androidmetrics_jni.cc",
|
| + ]
|
| +
|
| + configs += [ ":libjingle_peerconnection_jni_warnings_config" ]
|
| +
|
| + deps = [
|
| + ":base_jni",
|
| + ":peerconnection_jni",
|
| + "//webrtc/pc:peerconnection",
|
| + "//webrtc/system_wrappers",
|
| + "//webrtc/system_wrappers:field_trial_default",
|
| + "//webrtc/system_wrappers:metrics_default",
|
| + ]
|
| +}
|
| +
|
| rtc_static_library("libjingle_peerconnection_metrics_default_jni") {
|
| sources = [
|
| "src/jni/androidmetrics_jni.cc",
|
| @@ -105,13 +229,41 @@ rtc_static_library("libjingle_peerconnection_metrics_default_jni") {
|
|
|
| deps = [
|
| ":libjingle_peerconnection_jni",
|
| - "../../system_wrappers",
|
| "//webrtc/pc:libjingle_peerconnection",
|
| + "//webrtc/system_wrappers",
|
| "//webrtc/system_wrappers:field_trial_default",
|
| "//webrtc/system_wrappers:metrics_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.
|
| +#
|
| +# For example, to build WebRTC with datachannel support only, we would need the
|
| +# the peerconnection and the null implementation of the audio and video modules.
|
| +#
|
| +#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",
|
| +# ":metrics_jni",
|
| +# ":null_audio_jni",
|
| +# ":null_video_jni",
|
| +# ":peerconnection_jni",
|
| +# "//webrtc/base:rtc_base",
|
| +# "//webrtc/pc:peerconnection",
|
| +# ]
|
| +# output_extension = "so"
|
| +#}
|
| +
|
| rtc_shared_library("libjingle_peerconnection_so") {
|
| sources = [
|
| "src/jni/jni_onload.cc",
|
| @@ -123,7 +275,7 @@ rtc_shared_library("libjingle_peerconnection_so") {
|
| deps = [
|
| ":libjingle_peerconnection_jni",
|
| ":libjingle_peerconnection_metrics_default_jni",
|
| - "../../base:rtc_base",
|
| + "//webrtc/base:rtc_base",
|
| "//webrtc/pc:libjingle_peerconnection",
|
| ]
|
| output_extension = "so"
|
|
|