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

Unified Diff: device/capture/BUILD.gn

Issue 2214533002: move //media/capture to //device/capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « content/test/BUILD.gn ('k') | device/capture/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/capture/BUILD.gn
diff --git a/media/capture/BUILD.gn b/device/capture/BUILD.gn
similarity index 67%
rename from media/capture/BUILD.gn
rename to device/capture/BUILD.gn
index 337cd2c1c2ba24b3ab7d732eb3cdc03a7d35463e..1c3a9577a3edd64caaa74635e3088f28e08d384d 100644
--- a/media/capture/BUILD.gn
+++ b/device/capture/BUILD.gn
@@ -5,11 +5,19 @@
import("//build/config/features.gni")
import("//media/media_options.gni")
import("//testing/test.gni")
+if (is_android) {
+ import("//build/config/android/rules.gni") # For generate_jni().
+}
component("capture") {
defines = [ "CAPTURE_IMPLEMENTATION" ]
+
sources = [
"capture_export.h",
+ "content/android/screen_capture_jni_registrar.cc",
+ "content/android/screen_capture_jni_registrar.h",
+ "content/android/screen_capture_machine_android.cc",
+ "content/android/screen_capture_machine_android.h",
"content/animated_content_sampler.cc",
"content/animated_content_sampler.h",
"content/capture_resolution_chooser.cc",
@@ -26,6 +34,14 @@ component("capture") {
"device_monitor_mac.mm",
"system_message_window_win.cc",
"system_message_window_win.h",
+ "video/android/capture_jni_registrar.cc",
+ "video/android/capture_jni_registrar.h",
+ "video/android/photo_capabilities.cc",
+ "video/android/photo_capabilities.h",
+ "video/android/video_capture_device_android.cc",
+ "video/android/video_capture_device_android.h",
+ "video/android/video_capture_device_factory_android.cc",
+ "video/android/video_capture_device_factory_android.h",
"video/fake_video_capture_device.cc",
"video/fake_video_capture_device.h",
"video/fake_video_capture_device_factory.cc",
@@ -82,27 +98,13 @@ component("capture") {
"//media",
"//media/mojo/interfaces:image_capture",
"//skia",
+ "//third_party/libyuv",
"//ui/display",
"//ui/gfx",
]
- configs += [
- # TODO(mcasas): media/base should be a component and not a source_set, but
- # it depends on parts of media/filters, media/ffmpeg etc. Until then, we
- # pretend to be inside media.dll and duplicate the few symbols needed, see
- # https://crbug.com/590017.
- "//media:media_implementation",
- ]
-
if (is_android) {
- public_deps += [
- "content/android",
- "video/android",
- ]
- deps += [
- "content/android:screen_capture_jni_headers",
- "video/android:capture_jni_headers",
- ]
+ deps += [ ":capture_jni_headers" ]
}
if (is_mac) {
@@ -124,15 +126,13 @@ component("capture") {
}
if (is_win) {
- deps += [
- "//media/base", # For media_switches.
- "//media/base/win",
- ]
+ deps += [ "//media/base/win" ]
libs = [
"mf.lib",
"mfplat.lib",
"mfreadwrite.lib",
"mfuuid.lib",
+ "strmiids.lib",
]
ldflags = [
"/DELAYLOAD:mf.dll",
@@ -145,6 +145,48 @@ component("capture") {
}
}
+if (is_android) {
+ generate_jni("capture_jni_headers") {
+ sources = [
+ "content/android/java/src/org/chromium/device/ScreenCapture.java",
+ "video/android/java/src/org/chromium/device/PhotoCapabilities.java",
+ "video/android/java/src/org/chromium/device/VideoCapture.java",
+ "video/android/java/src/org/chromium/device/VideoCaptureFactory.java",
+ ]
+ jni_package = "device"
+ }
+
+ java_cpp_enum("capture_java_enums_srcjar") {
+ sources = [
+ "video/android/video_capture_device_android.h",
+ "video/video_capture_device_descriptor.h",
+ ]
+ }
+
+ android_library("capture_java") {
+ deps = [
+ ":capture",
+ ":capture_jni_headers",
+ "//base:base_java",
+ "//third_party/android_tools:android_support_annotations_java",
+ ]
+
+ srcjar_deps = [ ":capture_java_enums_srcjar" ]
+
+ java_files = [
+ "content/android/java/src/org/chromium/device/ScreenCapture.java",
+ "video/android/java/src/org/chromium/device/PhotoCapabilities.java",
+ "video/android/java/src/org/chromium/device/VideoCapture.java",
+ "video/android/java/src/org/chromium/device/VideoCaptureAndroid.java",
+ "video/android/java/src/org/chromium/device/VideoCaptureCamera.java",
+ "video/android/java/src/org/chromium/device/VideoCaptureCamera2.java",
+ "video/android/java/src/org/chromium/device/VideoCaptureFactory.java",
+ "video/android/java/src/org/chromium/device/VideoCaptureFormat.java",
+ "video/android/java/src/org/chromium/device/VideoCaptureTango.java",
+ ]
+ }
+}
+
test("capture_unittests") {
sources = [
"content/animated_content_sampler_unittest.cc",
@@ -161,6 +203,7 @@ test("capture_unittests") {
":capture",
"//base/test:run_all_unittests",
"//base/test:test_support",
+ "//media:test_support",
"//media/base:test_support",
"//media/mojo/interfaces:image_capture",
"//testing/gmock",
@@ -170,8 +213,8 @@ test("capture_unittests") {
if (is_android) {
deps += [
- "//media/capture/video/android",
- "//media/capture/video/android:capture_java",
+ ":capture_java",
+ ":capture_jni_headers",
]
}
« no previous file with comments | « content/test/BUILD.gn ('k') | device/capture/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698