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.
4
5import("//build/config/android/config.gni")
6import("//build/config/android/rules.gni")
7import("//build/config/arm.gni")
8import("//build/config/ui.gni")
9import("//media/media_options.gni")
10
11assert(is_android)
12
13source_set("android") {
14  sources = [
15    "audio_decoder_job.cc",
16    "audio_decoder_job.h",
17    "browser_cdm_factory_android.cc",
18    "demuxer_android.h",
19    "demuxer_stream_player_params.cc",
20    "demuxer_stream_player_params.h",
21    "media_codec_bridge.cc",
22    "media_codec_bridge.h",
23    "media_decoder_job.cc",
24    "media_decoder_job.h",
25    "media_drm_bridge.cc",
26    "media_drm_bridge.h",
27    "media_jni_registrar.cc",
28    "media_jni_registrar.h",
29    "media_player_android.cc",
30    "media_player_android.h",
31    "media_player_bridge.cc",
32    "media_player_bridge.h",
33    "media_player_listener.cc",
34    "media_player_listener.h",
35    "media_player_manager.h",
36    "media_resource_getter.cc",
37    "media_resource_getter.h",
38    "media_source_player.cc",
39    "media_source_player.h",
40    "media_url_interceptor.h",
41    "video_decoder_job.cc",
42    "video_decoder_job.h",
43    "webaudio_media_codec_bridge.cc",
44    "webaudio_media_codec_bridge.h",
45    "webaudio_media_codec_info.h",
46  ]
47  configs += [ "//media:media_config" ]
48  deps = [
49    ":media_jni_headers",
50    "//third_party/widevine/cdm:version_h",
51  ]
52}
53
54source_set("unittests") {
55  testonly = true
56  sources = [
57    "media_codec_bridge_unittest.cc",
58    "media_drm_bridge_unittest.cc",
59    "media_source_player_unittest.cc",
60  ]
61  deps = [
62    ":android",
63    "//media/base:test_support",
64    "//testing/gmock",
65    "//testing/gtest",
66    "//third_party/widevine/cdm:version_h",
67  ]
68  configs += [ "//media:media_config" ]
69}
70
71generate_jni("media_jni_headers") {
72  sources = [
73    "java/src/org/chromium/media/AudioManagerAndroid.java",
74    "java/src/org/chromium/media/AudioRecordInput.java",
75    "java/src/org/chromium/media/MediaCodecBridge.java",
76    "java/src/org/chromium/media/MediaDrmBridge.java",
77    "java/src/org/chromium/media/MediaPlayerBridge.java",
78    "java/src/org/chromium/media/MediaPlayerListener.java",
79    "java/src/org/chromium/media/UsbMidiDeviceAndroid.java",
80    "java/src/org/chromium/media/UsbMidiDeviceFactoryAndroid.java",
81    "java/src/org/chromium/media/WebAudioMediaCodecBridge.java",
82  ]
83  jni_package = "media"
84}
85
86generate_jni("video_capture_jni_headers") {
87  sources = [
88    "java/src/org/chromium/media/VideoCapture.java",
89    "java/src/org/chromium/media/VideoCaptureFactory.java",
90  ]
91  jni_package = "media"
92}
93
94java_cpp_template("media_android_imageformat_list") {
95  package_name = "org/chromium/media"
96  sources = [
97    "java/src/org/chromium/media/ImageFormat.template",
98  ]
99  inputs = [
100    "//media/video/capture/android/imageformat_list.h"
101  ]
102}
103
104android_library("media_java") {
105  deps = [
106    "//base:base_java",
107  ]
108
109  srcjar_deps = [
110    ":media_android_imageformat_list",
111  ]
112
113  DEPRECATED_java_in_dir = "java/src"
114}
115