Re-subimission of https://codereview.chromium.org/1041213003/
[chromium-blink-merge.git] / media / base / android / BUILD.gn
blobf6f910e5a88b4babd89b032b0da960f3aed11f1b
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/android/config.gni")
6 import("//build/config/android/rules.gni")
7 import("//build/config/arm.gni")
8 import("//build/config/ui.gni")
9 import("//media/media_options.gni")
11 assert(is_android)
13 source_set("android") {
14   sources = [
15     "audio_decoder_job.cc",
16     "audio_decoder_job.h",
17     "browser_cdm_factory_android.cc",
18     "browser_cdm_factory_android.h",
19     "demuxer_android.h",
20     "demuxer_stream_player_params.cc",
21     "demuxer_stream_player_params.h",
22     "media_codec_bridge.cc",
23     "media_codec_bridge.h",
24     "media_decoder_job.cc",
25     "media_decoder_job.h",
26     "media_drm_bridge.cc",
27     "media_drm_bridge.h",
28     "media_jni_registrar.cc",
29     "media_jni_registrar.h",
30     "media_player_android.cc",
31     "media_player_android.h",
32     "media_player_bridge.cc",
33     "media_player_bridge.h",
34     "media_player_listener.cc",
35     "media_player_listener.h",
36     "media_player_manager.h",
37     "media_resource_getter.cc",
38     "media_resource_getter.h",
39     "media_source_player.cc",
40     "media_source_player.h",
41     "media_url_interceptor.h",
42     "video_decoder_job.cc",
43     "video_decoder_job.h",
44     "webaudio_media_codec_bridge.cc",
45     "webaudio_media_codec_bridge.h",
46     "webaudio_media_codec_info.h",
47   ]
48   configs += [ "//media:media_config" ]
49   deps = [
50     ":media_jni_headers",
51     "//media:shared_memory_support",
52     "//media/base",
53     "//third_party/widevine/cdm:version_h",
54     "//ui/gl",
55     "//url",
56   ]
59 source_set("unittests") {
60   testonly = true
61   sources = [
62     "media_codec_bridge_unittest.cc",
63     "media_drm_bridge_unittest.cc",
64     "media_source_player_unittest.cc",
65   ]
66   deps = [
67     ":android",
68     "//media/base:test_support",
69     "//testing/gmock",
70     "//testing/gtest",
71     "//third_party/widevine/cdm:version_h",
72   ]
73   configs += [ "//media:media_config" ]
76 generate_jni("media_jni_headers") {
77   sources = [
78     "java/src/org/chromium/media/AudioManagerAndroid.java",
79     "java/src/org/chromium/media/AudioRecordInput.java",
80     "java/src/org/chromium/media/MediaCodecBridge.java",
81     "java/src/org/chromium/media/MediaDrmBridge.java",
82     "java/src/org/chromium/media/MediaPlayerBridge.java",
83     "java/src/org/chromium/media/MediaPlayerListener.java",
84     "java/src/org/chromium/media/UsbMidiDeviceAndroid.java",
85     "java/src/org/chromium/media/UsbMidiDeviceFactoryAndroid.java",
86     "java/src/org/chromium/media/WebAudioMediaCodecBridge.java",
87   ]
88   jni_package = "media"
91 generate_jni("video_capture_jni_headers") {
92   sources = [
93     "java/src/org/chromium/media/VideoCapture.java",
94     "java/src/org/chromium/media/VideoCaptureFactory.java",
95   ]
96   jni_package = "media"
99 java_cpp_enum("media_java_enums_srcjar") {
100   sources = [
101     "//media/video/capture/android/video_capture_device_android.h",
102     "//media/video/capture/video_capture_device.h",
103   ]
104   outputs = [
105     "org/chromium/media/AndroidImageFormat.java",
106     "org/chromium/media/CaptureApiType.java",
107   ]
110 android_library("media_java") {
111   deps = [
112     "//base:base_java",
113   ]
115   srcjar_deps = [ ":media_java_enums_srcjar" ]
117   DEPRECATED_java_in_dir = "java/src"