Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(909)

Unified Diff: webrtc/examples/BUILD.gn

Issue 2993273002: Add Android Camera To Unity Plugin (Closed)
Patch Set: Presubmit Fix Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/examples/unityplugin/ANDROID_INSTRUCTION » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/examples/BUILD.gn
diff --git a/webrtc/examples/BUILD.gn b/webrtc/examples/BUILD.gn
index 655d6ff0a5f6d5dbb55c81efb2c0516688f77a3b..55fe0f24293287783777f1a8ee072b5210c916eb 100644
--- a/webrtc/examples/BUILD.gn
+++ b/webrtc/examples/BUILD.gn
@@ -612,7 +612,7 @@ if (is_linux || is_win) {
}
}
-if (is_win) {
+if (is_win || is_android) {
rtc_shared_library("webrtc_unity_plugin") {
testonly = true
sources = [
@@ -623,15 +623,26 @@ if (is_win) {
"unityplugin/video_observer.cc",
"unityplugin/video_observer.h",
]
+
+ if (is_android) {
+ sources += [
+ "unityplugin/classreferenceholder.cc",
+ "unityplugin/classreferenceholder.h",
+ "unityplugin/jni_onload.cc",
+ ]
+ }
+
if (!build_with_chromium && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
- cflags = [ "/wd4245" ]
- configs += [
- "//build/config/win:windowed",
- ":peerconnection_client_warnings_config",
- ]
+ if (is_win) {
+ cflags = [ "/wd4245" ]
+ configs += [
+ "//build/config/win:windowed",
+ ":peerconnection_client_warnings_config",
+ ]
+ }
deps = [
"../api:libjingle_peerconnection_test_api",
"../api:video_frame_api",
@@ -639,9 +650,37 @@ if (is_win) {
"../media:rtc_media_base",
"../modules/video_capture:video_capture_module",
"../pc:libjingle_peerconnection",
+ "../rtc_base:rtc_base",
"../system_wrappers:field_trial_default",
"../system_wrappers:metrics_default",
]
+ if (is_android) {
+ deps += [ "../sdk/android:libjingle_peerconnection_jni" ]
+ }
+ }
+}
+
+if (is_android) {
+ android_library("webrtc_unity_java") {
+ java_files = [ "unityplugin/java/src/org/webrtc/UnityUtility.java" ]
+ deps = [
+ "../rtc_base:base_java",
+ "../sdk/android:libjingle_peerconnection_java",
+ ]
+ }
+
+ dist_jar("libwebrtc_unity") {
+ _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_interface_jars = false
+ deps = [
+ ":webrtc_unity_java",
+ "../modules/audio_device:audio_device_java",
+ "../rtc_base:base_java",
+ "../sdk/android:libjingle_peerconnection_java",
+ "../sdk/android:libjingle_peerconnection_metrics_default_java",
+ ]
}
}
« no previous file with comments | « no previous file | webrtc/examples/unityplugin/ANDROID_INSTRUCTION » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698