summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorcjhopman <cjhopman@chromium.org>2014-09-09 01:55:54 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-09 08:58:14 +0000
commit394dfd1052e53e64083daef7cc66055557256dcb (patch)
tree732ab90590a2c25f9804404696a521dace44809a /media
parent92516216d2dc3ce3ab3a56500126dc2dcd54e746 (diff)
downloadchromium_src-394dfd1052e53e64083daef7cc66055557256dcb.zip
chromium_src-394dfd1052e53e64083daef7cc66055557256dcb.tar.gz
chromium_src-394dfd1052e53e64083daef7cc66055557256dcb.tar.bz2
Add content_shell_test_apk and several dependencies
This adds support for android_apk targets without any java included directly in the target (only included through deps). This adds the following targets: //base:base_javatests //content/public/android:content_javatests //content/shell/android:content_shell_test_apk //media/android:media_android_imageformat_list (moved) //media/android:media_java (moved+fixed) BUG=359249 Review URL: https://codereview.chromium.org/525533003 Cr-Commit-Position: refs/heads/master@{#293897}
Diffstat (limited to 'media')
-rw-r--r--media/BUILD.gn79
-rw-r--r--media/base/android/BUILD.gn22
-rw-r--r--media/media.gyp7
3 files changed, 54 insertions, 54 deletions
diff --git a/media/BUILD.gn b/media/BUILD.gn
index 2835e90..3764aee 100644
--- a/media/BUILD.gn
+++ b/media/BUILD.gn
@@ -298,7 +298,7 @@ component("media") {
"//media/base/android:video_capture_jni_headers",
]
if (!is_android_webview_build) {
- deps += [ ":media_java" ]
+ deps += [ "//media/base/android:media_java" ]
}
}
@@ -483,7 +483,30 @@ test("media_unittests") {
"formats/webm/webm_webvtt_parser_unittest.cc",
]
- if (!is_android) {
+ deps = [
+ ":media",
+ ":test_support",
+ "//base/allocator",
+ "//base/test:test_support",
+ "//media/audio:unittests",
+ "//media/audio:test_support",
+ "//media/base:unittests",
+ "//media/base:test_support",
+ "//skia", # Direct dependency required to inherit config.
+ "//testing/gmock",
+ "//testing/gtest",
+ "//third_party/widevine/cdm:version_h",
+ "//ui/gfx:test_support",
+ "//url",
+ ]
+
+ if (is_android) {
+ deps += [
+ "//media/base/android",
+ # TODO(GYP)
+ #"//testing/android:native_test_native_code"
+ ]
+ } else {
sources += [
"ffmpeg/ffmpeg_common_unittest.cc",
"filters/audio_decoder_unittest.cc",
@@ -496,12 +519,6 @@ test("media_unittests") {
"filters/pipeline_integration_test.cc",
"filters/pipeline_integration_test_base.cc",
]
- } else {
-# TODO(ajwong): Blocked on android.
-# deps += [
-# ":player_android",
-# "//testing/android:native_test_native_code"
-# ]
}
if (cpu_arch != "arm" && is_chromeos && use_x11) {
@@ -552,32 +569,6 @@ test("media_unittests") {
configs += [ ":media_config" ]
-# TODO(ajwong): This was in the original gyp, but it seems silly.
-# ['os_posix==1 and OS!="mac"', {
-# 'conditions': [
-# ['use_allocator!="none"', {
-# 'dependencies': [
-# '../base/allocator/allocator.gyp:allocator',
-# ],
-# }],
-# ],
-# }],
- deps = [
- ":media",
- ":test_support",
- "//base/test:test_support",
- "//media/audio:unittests",
- "//media/audio:test_support",
- "//media/base:unittests",
- "//media/base:test_support",
- "//skia", # Direct dependency required to inherit config.
- "//testing/gmock",
- "//testing/gtest",
- # TODO(dalecurtis): Port the rest of Widevine stuff.
- "//third_party/widevine/cdm:version_h",
- "//ui/gfx:test_support",
- "//url",
- ]
if (media_use_ffmpeg) {
deps += [
"//third_party/ffmpeg", # Direct dependency required to inherit config.
@@ -734,23 +725,3 @@ if (use_x11) {
]
}
}
-
-if (is_android) {
- import("//build/config/android/rules.gni")
- android_library("media_java") {
- srcjar_deps = [
- ":media_android_imageformat_list",
- ]
- java_files = []
- }
-
- java_cpp_template("media_android_imageformat_list") {
- sources = [
- "base/android/java/src/org/chromium/media/ImageFormat.template",
- ]
- inputs = [
- "video/capture/android/imageformat_list.h"
- ]
- package_name = "org/chromium/media"
- }
-}
diff --git a/media/base/android/BUILD.gn b/media/base/android/BUILD.gn
index f5d6f42..c179931 100644
--- a/media/base/android/BUILD.gn
+++ b/media/base/android/BUILD.gn
@@ -90,3 +90,25 @@ generate_jni("video_capture_jni_headers") {
]
jni_package = "media"
}
+
+java_cpp_template("media_android_imageformat_list") {
+ package_name = "org/chromium/media"
+ sources = [
+ "java/src/org/chromium/media/ImageFormat.template",
+ ]
+ inputs = [
+ "//media/video/capture/android/imageformat_list.h"
+ ]
+}
+
+android_library("media_java") {
+ deps = [
+ "//base:base_java",
+ ]
+
+ srcjar_deps = [
+ ":media_android_imageformat_list",
+ ]
+
+ DEPRECATED_java_in_dir = "java/src"
+}
diff --git a/media/media.gyp b/media/media.gyp
index 5fb0366..355312e 100644
--- a/media/media.gyp
+++ b/media/media.gyp
@@ -1620,6 +1620,7 @@
['OS=="android"', {
'targets': [
{
+ # TODO(GN)
'target_name': 'media_unittests_apk',
'type': 'none',
'dependencies': [
@@ -1632,6 +1633,7 @@
'includes': ['../build/apk_test.gypi'],
},
{
+ # TODO(GN)
'target_name': 'media_perftests_apk',
'type': 'none',
'dependencies': [
@@ -1644,6 +1646,7 @@
'includes': ['../build/apk_test.gypi'],
},
{
+ # GN: //media/base/android:media_android_jni_headers
'target_name': 'media_android_jni_headers',
'type': 'none',
'sources': [
@@ -1663,6 +1666,7 @@
'includes': ['../build/jni_generator.gypi'],
},
{
+ # GN: //media/base/android:video_capture_android_jni_headers
'target_name': 'video_capture_android_jni_headers',
'type': 'none',
'sources': [
@@ -1675,6 +1679,7 @@
'includes': ['../build/jni_generator.gypi'],
},
{
+ # GN: //media/base/android:android
'target_name': 'player_android',
'type': 'static_library',
'sources': [
@@ -1720,6 +1725,7 @@
],
},
{
+ # GN: //media/base/android:media_java
'target_name': 'media_java',
'type': 'none',
'dependencies': [
@@ -1735,6 +1741,7 @@
'includes': ['../build/java.gypi'],
},
{
+ # GN: //media/base/android:media_android_imageformat_list
'target_name': 'media_android_imageformat_list',
'type': 'none',
'sources': [