summaryrefslogtreecommitdiff
path: root/chromium/media/blink/BUILD.gn
blob: 42535b556899d764b825a852f060afe9d651f1d3 (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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# 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("//media/media_options.gni")
import("//testing/test.gni")
import("//tools/v8_context_snapshot/v8_context_snapshot.gni")

component("blink") {
  output_name = "media_blink"

  sources = [
    "buffered_data_source_host_impl.cc",
    "buffered_data_source_host_impl.h",
    "cache_util.cc",
    "cache_util.h",
    "cdm_result_promise.h",
    "cdm_result_promise_helper.cc",
    "cdm_result_promise_helper.h",
    "cdm_session_adapter.cc",
    "cdm_session_adapter.h",
    "interval_map.h",
    "key_system_config_selector.cc",
    "key_system_config_selector.h",
    "lru.h",
    "media_blink_export.h",
    "multibuffer.cc",
    "multibuffer.h",
    "multibuffer_data_source.cc",
    "multibuffer_data_source.h",
    "multibuffer_reader.cc",
    "multibuffer_reader.h",
    "new_session_cdm_result_promise.cc",
    "new_session_cdm_result_promise.h",
    "remote_playback_client_wrapper_impl.cc",
    "remote_playback_client_wrapper_impl.h",
    "resource_fetch_context.h",
    "resource_multibuffer_data_provider.cc",
    "resource_multibuffer_data_provider.h",
    "texttrack_impl.cc",
    "texttrack_impl.h",
    "url_index.cc",
    "url_index.h",
    "video_decode_stats_reporter.cc",
    "video_decode_stats_reporter.h",
    "video_frame_compositor.cc",
    "video_frame_compositor.h",
    "watch_time_component.cc",
    "watch_time_component.h",
    "watch_time_reporter.cc",
    "watch_time_reporter.h",
    "webaudiosourceprovider_impl.cc",
    "webaudiosourceprovider_impl.h",
    "webcontentdecryptionmodule_impl.cc",
    "webcontentdecryptionmodule_impl.h",
    "webcontentdecryptionmoduleaccess_impl.cc",
    "webcontentdecryptionmoduleaccess_impl.h",
    "webcontentdecryptionmodulesession_impl.cc",
    "webcontentdecryptionmodulesession_impl.h",
    "webencryptedmediaclient_impl.cc",
    "webencryptedmediaclient_impl.h",
    "webinbandtexttrack_impl.cc",
    "webinbandtexttrack_impl.h",
    "webmediacapabilitiesclient_impl.cc",
    "webmediacapabilitiesclient_impl.h",
    "webmediaplayer_delegate.h",
    "webmediaplayer_params.cc",
    "webmediaplayer_params.h",
    "webmediaplayer_util.cc",
    "webmediaplayer_util.h",
    "webmediasource_impl.cc",
    "webmediasource_impl.h",
    "websourcebuffer_impl.cc",
    "websourcebuffer_impl.h",
  ]

  defines = [ "MEDIA_BLINK_IMPLEMENTATION" ]

  deps = [
    "//base",
    "//cc",
    "//gpu",
    "//media",
    "//media:shared_memory_support",
    "//media/mojo/interfaces",
    "//net",
    "//services/service_manager/public/cpp:cpp",
    "//skia",
    "//third_party/blink/public:blink",
    "//ui/gfx",
    "//ui/gfx/geometry",
    "//url",
  ]

  if (media_use_ffmpeg || !is_android) {
    sources += [
      "webmediaplayer_impl.cc",
      "webmediaplayer_impl.h",
    ]
    if (is_android) {
      sources += [
        "webmediaplayer_cast_android.cc",
        "webmediaplayer_cast_android.h",
      ]
      deps += [ "//gpu/command_buffer/client:gles2_interface" ]
    }
  }
}

test("media_blink_unittests") {
  deps = [
    ":blink",
    "//base",
    "//base/test:test_support",
    "//cc",
    "//gin",
    "//media:test_support",
    "//media/mojo/interfaces",
    "//media/mojo/services",
    "//mojo/core/embedder",
    "//net",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party/blink/public:blink",
    "//third_party/blink/public:test_support",
    "//tools/v8_context_snapshot",
    "//ui/gfx:test_support",
    "//ui/gfx/geometry",
    "//url",
  ]

  data = [
    "//media/test/data/",
  ]

  configs += [
    "//build/config/compiler:no_size_t_to_int_warning",
    "//tools/v8_context_snapshot:use_v8_context_snapshot",
    "//v8:external_startup_data",
  ]

  sources = [
    "buffered_data_source_host_impl_unittest.cc",
    "cache_util_unittest.cc",
    "interval_map_unittest.cc",
    "key_system_config_selector_unittest.cc",
    "lru_unittest.cc",
    "mock_resource_fetch_context.cc",
    "mock_resource_fetch_context.h",
    "mock_webassociatedurlloader.cc",
    "mock_webassociatedurlloader.h",
    "multibuffer_data_source_unittest.cc",
    "multibuffer_unittest.cc",
    "resource_multibuffer_data_provider_unittest.cc",
    "run_all_unittests.cc",
    "test_response_generator.cc",
    "test_response_generator.h",
    "url_index_unittest.cc",
    "video_decode_stats_reporter_unittest.cc",
    "video_frame_compositor_unittest.cc",
    "watch_time_component_unittest.cc",
    "watch_time_reporter_unittest.cc",
    "webaudiosourceprovider_impl_unittest.cc",
    "webmediacapabilitiesclient_impl_unittest.cc",
    "webmediaplayer_impl_unittest.cc",
  ]

  if (is_android) {
    deps += [ "//media/base/android:media_java" ]
    if (use_v8_context_snapshot) {
      deps += [ "//tools/v8_context_snapshot:v8_context_snapshot_assets" ]
    } else {
      deps += [ "//v8:v8_external_startup_data_assets" ]
    }
  }
}