summaryrefslogtreecommitdiffstats
path: root/media/base/android/BUILD.gn
blob: 5db57a33e2473197822d92ad0c85e7451dbdecbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# 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/android/rules.gni")
import("//build/config/arm.gni")
import("//build/config/ui.gni")
import("//media/media_options.gni")

assert(is_android)

source_set("android") {
  sources = [
    "access_unit_queue.cc",
    "access_unit_queue.h",
    "audio_decoder_job.cc",
    "audio_decoder_job.h",
    "browser_cdm_factory_android.cc",
    "browser_cdm_factory_android.h",
    "demuxer_android.h",
    "demuxer_stream_player_params.cc",
    "demuxer_stream_player_params.h",
    "media_client_android.cc",
    "media_client_android.h",
    "media_codec_audio_decoder.cc",
    "media_codec_audio_decoder.h",
    "media_codec_bridge.cc",
    "media_codec_bridge.h",
    "media_codec_decoder.cc",
    "media_codec_decoder.h",
    "media_codec_player.cc",
    "media_codec_player.h",
    "media_codec_video_decoder.cc",
    "media_codec_video_decoder.h",
    "media_decoder_job.cc",
    "media_decoder_job.h",
    "media_drm_bridge.cc",
    "media_drm_bridge.h",
    "media_drm_bridge_delegate.cc",
    "media_drm_bridge_delegate.h",
    "media_jni_registrar.cc",
    "media_jni_registrar.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_source_player.cc",
    "media_source_player.h",
    "media_url_interceptor.h",
    "video_decoder_job.cc",
    "video_decoder_job.h",
    "webaudio_media_codec_bridge.cc",
    "webaudio_media_codec_bridge.h",
    "webaudio_media_codec_info.h",
  ]
  configs += [
    "//media:media_config",
    "//media:media_implementation",
  ]
  deps = [
    ":media_jni_headers",
    "//media:shared_memory_support",
    "//third_party/widevine/cdm:version_h",
    "//ui/gl",
    "//url",
  ]
}

source_set("unittests") {
  testonly = true
  sources = [
    "access_unit_queue_unittest.cc",
    "media_codec_bridge_unittest.cc",
    "media_codec_decoder_unittest.cc",
    "media_drm_bridge_unittest.cc",
    "media_source_player_unittest.cc",
    "test_data_factory.cc",
    "test_data_factory.h",
  ]
  deps = [
    ":android",
    "//media/base:test_support",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party/widevine/cdm:version_h",
  ]
  configs += [ "//media:media_config" ]
}

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/MediaCodecBridge.java",
    "java/src/org/chromium/media/MediaDrmBridge.java",
    "java/src/org/chromium/media/MediaPlayerBridge.java",
    "java/src/org/chromium/media/MediaPlayerListener.java",
    "java/src/org/chromium/media/WebAudioMediaCodecBridge.java",
  ]
  jni_package = "media"
}

generate_jni("video_capture_jni_headers") {
  sources = [
    "java/src/org/chromium/media/VideoCapture.java",
    "java/src/org/chromium/media/VideoCaptureFactory.java",
  ]
  jni_package = "media"
}

java_cpp_enum("media_java_enums_srcjar") {
  sources = [
    "//media/video/capture/android/video_capture_device_android.h",
    "//media/video/capture/video_capture_device.h",
  ]
  outputs = [
    "org/chromium/media/AndroidImageFormat.java",
    "org/chromium/media/CaptureApiType.java",
  ]
}

android_library("media_java") {
  deps = [
    "//base:base_java",
  ]

  srcjar_deps = [ ":media_java_enums_srcjar" ]

  DEPRECATED_java_in_dir = "java/src"
}