mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 22:36:09 +03:00
216 lines
6.6 KiB
Plaintext
216 lines
6.6 KiB
Plaintext
|
# Copyright 2014 The Chromium Authors. All rights reserved.
|
||
|
# Use of this source code is governed by a BSD-style license that can be
|
||
|
# found in the LICENSE file.
|
||
|
|
||
|
import("//build/config/android/config.gni")
|
||
|
import("//build/config/arm.gni")
|
||
|
import("//build/config/jumbo.gni")
|
||
|
import("//build/config/ui.gni")
|
||
|
import("//media/media_options.gni")
|
||
|
|
||
|
if (is_android) {
|
||
|
import("//build/config/android/rules.gni")
|
||
|
|
||
|
# This is bundled into //media, so all dependencies should be on //media.
|
||
|
# APK targets that depend on this indirectly, should also
|
||
|
# depend on :media_java to get the corresponding Java classes.
|
||
|
jumbo_source_set("android") {
|
||
|
visibility = [
|
||
|
"//media",
|
||
|
"//media/filters",
|
||
|
]
|
||
|
sources = [
|
||
|
"android_cdm_factory.cc",
|
||
|
"android_cdm_factory.h",
|
||
|
"android_overlay.cc",
|
||
|
"android_overlay.h",
|
||
|
"android_util.cc",
|
||
|
"android_util.h",
|
||
|
"jni_hdr_metadata.cc",
|
||
|
"jni_hdr_metadata.h",
|
||
|
"media_codec_bridge.h",
|
||
|
"media_codec_bridge_impl.cc",
|
||
|
"media_codec_bridge_impl.h",
|
||
|
"media_codec_direction.h",
|
||
|
"media_codec_loop.cc",
|
||
|
"media_codec_loop.h",
|
||
|
"media_codec_util.cc",
|
||
|
"media_codec_util.h",
|
||
|
"media_crypto_context.h",
|
||
|
"media_crypto_context_impl.cc",
|
||
|
"media_crypto_context_impl.h",
|
||
|
"media_drm_bridge.cc",
|
||
|
"media_drm_bridge.h",
|
||
|
"media_drm_bridge_client.cc",
|
||
|
"media_drm_bridge_client.h",
|
||
|
"media_drm_bridge_delegate.cc",
|
||
|
"media_drm_bridge_delegate.h",
|
||
|
"media_drm_bridge_factory.cc",
|
||
|
"media_drm_bridge_factory.h",
|
||
|
"media_drm_storage.cc",
|
||
|
"media_drm_storage.h",
|
||
|
"media_drm_storage_bridge.cc",
|
||
|
"media_drm_storage_bridge.h",
|
||
|
"media_player_android.cc",
|
||
|
"media_player_android.h",
|
||
|
"media_player_bridge.cc",
|
||
|
"media_player_bridge.h",
|
||
|
"media_player_listener.cc",
|
||
|
"media_player_listener.h",
|
||
|
"media_player_manager.h",
|
||
|
"media_resource_getter.cc",
|
||
|
"media_resource_getter.h",
|
||
|
"media_server_crash_listener.cc",
|
||
|
"media_server_crash_listener.h",
|
||
|
"media_service_throttler.cc",
|
||
|
"media_service_throttler.h",
|
||
|
"media_url_interceptor.h",
|
||
|
"stream_texture_wrapper.h",
|
||
|
]
|
||
|
configs += [ "//media:subcomponent_config" ]
|
||
|
public_deps = [
|
||
|
":media_jni_headers",
|
||
|
]
|
||
|
deps = [
|
||
|
"//media/audio",
|
||
|
"//media/base",
|
||
|
"//media/cdm",
|
||
|
"//media/formats",
|
||
|
"//third_party/widevine/cdm:headers",
|
||
|
"//ui/gl",
|
||
|
"//url",
|
||
|
]
|
||
|
if (proprietary_codecs) {
|
||
|
sources += [
|
||
|
"extract_sps_and_pps.cc",
|
||
|
"extract_sps_and_pps.h",
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
source_set("unit_tests") {
|
||
|
testonly = true
|
||
|
sources = [
|
||
|
"media_codec_bridge_impl_unittest.cc",
|
||
|
"media_codec_loop_unittest.cc",
|
||
|
"media_codec_util_unittest.cc",
|
||
|
"media_drm_bridge_unittest.cc",
|
||
|
"media_player_bridge_unittest.cc",
|
||
|
"media_service_throttler_unittest.cc",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
"//base/test:test_support",
|
||
|
"//media:test_support",
|
||
|
"//testing/gmock",
|
||
|
"//testing/gtest",
|
||
|
"//third_party/libyuv",
|
||
|
"//third_party/widevine/cdm:headers",
|
||
|
"//ui/gfx:color_space",
|
||
|
]
|
||
|
configs += [ "//media:media_config" ]
|
||
|
}
|
||
|
|
||
|
static_library("test_support") {
|
||
|
testonly = true
|
||
|
sources = [
|
||
|
"mock_android_overlay.cc",
|
||
|
"mock_android_overlay.h",
|
||
|
"mock_media_codec_bridge.cc",
|
||
|
"mock_media_codec_bridge.h",
|
||
|
"mock_media_crypto_context.cc",
|
||
|
"mock_media_crypto_context.h",
|
||
|
"test_destruction_observable.cc",
|
||
|
"test_destruction_observable.h",
|
||
|
]
|
||
|
deps = [
|
||
|
"//media/base:test_support",
|
||
|
"//testing/gmock",
|
||
|
"//testing/gtest",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
generate_jni("media_jni_headers") {
|
||
|
sources = [
|
||
|
"java/src/org/chromium/media/AudioManagerAndroid.java",
|
||
|
"java/src/org/chromium/media/AudioRecordInput.java",
|
||
|
"java/src/org/chromium/media/AudioTrackOutputStream.java",
|
||
|
"java/src/org/chromium/media/CodecProfileLevelList.java",
|
||
|
"java/src/org/chromium/media/HdrMetadata.java",
|
||
|
"java/src/org/chromium/media/MediaCodecBridge.java",
|
||
|
"java/src/org/chromium/media/MediaCodecBridgeBuilder.java",
|
||
|
"java/src/org/chromium/media/MediaCodecUtil.java",
|
||
|
"java/src/org/chromium/media/MediaDrmBridge.java",
|
||
|
"java/src/org/chromium/media/MediaDrmStorageBridge.java",
|
||
|
"java/src/org/chromium/media/MediaPlayerBridge.java",
|
||
|
"java/src/org/chromium/media/MediaPlayerListener.java",
|
||
|
"java/src/org/chromium/media/MediaServerCrashListener.java",
|
||
|
]
|
||
|
jni_package = "media"
|
||
|
}
|
||
|
|
||
|
java_cpp_enum("java_enums") {
|
||
|
sources = [
|
||
|
"media_codec_bridge.h",
|
||
|
"media_codec_direction.h",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
android_resources("media_java_resources") {
|
||
|
custom_package = "org.chromium.media"
|
||
|
resource_dirs = [ "java/res" ]
|
||
|
}
|
||
|
|
||
|
android_library("media_java") {
|
||
|
deps = [
|
||
|
":media_java_resources",
|
||
|
"//base:base_java",
|
||
|
"//third_party/android_tools:android_support_annotations_java",
|
||
|
]
|
||
|
srcjar_deps = [
|
||
|
":java_enums",
|
||
|
"//media/base:java_enums",
|
||
|
]
|
||
|
java_files = [
|
||
|
"java/src/org/chromium/media/AudioManagerAndroid.java",
|
||
|
"java/src/org/chromium/media/AudioRecordInput.java",
|
||
|
"java/src/org/chromium/media/AudioTrackOutputStream.java",
|
||
|
"java/src/org/chromium/media/BitrateAdjuster.java",
|
||
|
"java/src/org/chromium/media/CodecProfileLevelList.java",
|
||
|
"java/src/org/chromium/media/HdrMetadata.java",
|
||
|
"java/src/org/chromium/media/MediaCodecBridge.java",
|
||
|
"java/src/org/chromium/media/MediaCodecBridgeBuilder.java",
|
||
|
"java/src/org/chromium/media/MediaCodecUtil.java",
|
||
|
"java/src/org/chromium/media/MediaCodecEncoder.java",
|
||
|
"java/src/org/chromium/media/MediaDrmBridge.java",
|
||
|
"java/src/org/chromium/media/MediaDrmSessionManager.java",
|
||
|
"java/src/org/chromium/media/MediaDrmStorageBridge.java",
|
||
|
"java/src/org/chromium/media/MediaFormatBuilder.java",
|
||
|
"java/src/org/chromium/media/MediaPlayerBridge.java",
|
||
|
"java/src/org/chromium/media/MediaPlayerListener.java",
|
||
|
"java/src/org/chromium/media/MediaServerCrashListener.java",
|
||
|
"java/src/org/chromium/media/MediaSwitches.java",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
junit_binary("media_base_junit_tests") {
|
||
|
java_files = [
|
||
|
"java/src/test/org/chromium/media/AudioTrackOutputStreamTest.java",
|
||
|
"java/src/test/org/chromium/media/BitrateAdjusterTest.java",
|
||
|
"java/src/test/org/chromium/media/MediaFormatBuilderTest.java",
|
||
|
]
|
||
|
deps = [
|
||
|
":media_java",
|
||
|
"//base:base_java",
|
||
|
"//base:base_java_test_support",
|
||
|
"//third_party/junit",
|
||
|
]
|
||
|
}
|
||
|
} else {
|
||
|
source_set("android") {
|
||
|
}
|
||
|
source_set("test_support") {
|
||
|
testonly = true
|
||
|
}
|
||
|
}
|