Reland: Web MIDI: split build rules for media/midi
[chromium-blink-merge.git] / media / base / android / BUILD.gn
blob9ab526566b8149ec640e0793e1e49d017eb57906
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_client_android.cc",
23     "media_client_android.h",
24     "media_codec_bridge.cc",
25     "media_codec_bridge.h",
26     "media_decoder_job.cc",
27     "media_decoder_job.h",
28     "media_drm_bridge.cc",
29     "media_drm_bridge.h",
30     "media_drm_bridge_delegate.cc",
31     "media_drm_bridge_delegate.h",
32     "media_jni_registrar.cc",
33     "media_jni_registrar.h",
34     "media_player_android.cc",
35     "media_player_android.h",
36     "media_player_bridge.cc",
37     "media_player_bridge.h",
38     "media_player_listener.cc",
39     "media_player_listener.h",
40     "media_player_manager.h",
41     "media_resource_getter.cc",
42     "media_resource_getter.h",
43     "media_source_player.cc",
44     "media_source_player.h",
45     "media_url_interceptor.h",
46     "video_decoder_job.cc",
47     "video_decoder_job.h",
48     "webaudio_media_codec_bridge.cc",
49     "webaudio_media_codec_bridge.h",
50     "webaudio_media_codec_info.h",
51   ]
52   configs += [
53     "//media:media_config",
54     "//media:media_implementation",
55   ]
56   deps = [
57     ":media_jni_headers",
58     "//media:shared_memory_support",
59     "//third_party/widevine/cdm:version_h",
60     "//ui/gl",
61     "//url",
62   ]
65 source_set("unittests") {
66   testonly = true
67   sources = [
68     "media_codec_bridge_unittest.cc",
69     "media_drm_bridge_unittest.cc",
70     "media_source_player_unittest.cc",
71   ]
72   deps = [
73     ":android",
74     "//media/base:test_support",
75     "//testing/gmock",
76     "//testing/gtest",
77     "//third_party/widevine/cdm:version_h",
78   ]
79   configs += [ "//media:media_config" ]
82 generate_jni("media_jni_headers") {
83   sources = [
84     "java/src/org/chromium/media/AudioManagerAndroid.java",
85     "java/src/org/chromium/media/AudioRecordInput.java",
86     "java/src/org/chromium/media/MediaCodecBridge.java",
87     "java/src/org/chromium/media/MediaDrmBridge.java",
88     "java/src/org/chromium/media/MediaPlayerBridge.java",
89     "java/src/org/chromium/media/MediaPlayerListener.java",
90     "java/src/org/chromium/media/WebAudioMediaCodecBridge.java",
91   ]
92   jni_package = "media"
95 generate_jni("video_capture_jni_headers") {
96   sources = [
97     "java/src/org/chromium/media/VideoCapture.java",
98     "java/src/org/chromium/media/VideoCaptureFactory.java",
99   ]
100   jni_package = "media"
103 java_cpp_enum("media_java_enums_srcjar") {
104   sources = [
105     "//media/video/capture/android/video_capture_device_android.h",
106     "//media/video/capture/video_capture_device.h",
107   ]
108   outputs = [
109     "org/chromium/media/AndroidImageFormat.java",
110     "org/chromium/media/CaptureApiType.java",
111   ]
114 android_library("media_java") {
115   deps = [
116     "//base:base_java",
117   ]
119   srcjar_deps = [ ":media_java_enums_srcjar" ]
121   DEPRECATED_java_in_dir = "java/src"