Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: media/mojo/services/BUILD.gn

Issue 1968833002: media: Make media mojo services a component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn tweak Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/mojo/BUILD.gn ('k') | media/mojo/services/media_mojo_export.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//media/media_options.gni") 5 import("//media/media_options.gni")
6 import("//testing/test.gni") 6 import("//testing/test.gni")
7 import("//mojo/public/mojo_application.gni") 7 import("//mojo/public/mojo_application.gni")
8 import("//mojo/public/mojo_application_manifest.gni") 8 import("//mojo/public/mojo_application_manifest.gni")
9 9
10 # Target naming conventions: 10 # Target naming conventions:
(...skipping 30 matching lines...) Expand all
41 } else if (mojo_media_host == "utility") { 41 } else if (mojo_media_host == "utility") {
42 defines += [ "ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS" ] 42 defines += [ "ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS" ]
43 } else { 43 } else {
44 assert(false, "Invalid mojo media host: $mojo_media_host") 44 assert(false, "Invalid mojo media host: $mojo_media_host")
45 } 45 }
46 } 46 }
47 } 47 }
48 48
49 # Implementations of media C++ interfaces using corresponding mojo services. 49 # Implementations of media C++ interfaces using corresponding mojo services.
50 source_set("proxy") { 50 source_set("proxy") {
51 deps = [
watk 2016/05/11 17:28:18 Drive by :) gn style guide prefers to put this aft
52 "//base",
53 "//media",
54 "//media/mojo/common",
55 "//media/mojo/interfaces",
56 "//mojo/common",
57 "//mojo/public/c/system:for_component",
58 "//services/shell/public/cpp:sources",
59 "//services/shell/public/interfaces",
60 ]
61
62 public_configs = [ ":mojo_media_config" ]
63
51 sources = [ 64 sources = [
52 "mojo_audio_decoder.cc", 65 "mojo_audio_decoder.cc",
53 "mojo_audio_decoder.h", 66 "mojo_audio_decoder.h",
54 "mojo_cdm.cc", 67 "mojo_cdm.cc",
55 "mojo_cdm.h", 68 "mojo_cdm.h",
56 "mojo_cdm_factory.cc", 69 "mojo_cdm_factory.cc",
57 "mojo_cdm_factory.h", 70 "mojo_cdm_factory.h",
58 "mojo_decoder_factory.cc", 71 "mojo_decoder_factory.cc",
59 "mojo_decoder_factory.h", 72 "mojo_decoder_factory.h",
60 "mojo_decryptor.cc", 73 "mojo_decryptor.cc",
61 "mojo_decryptor.h", 74 "mojo_decryptor.h",
62 "mojo_demuxer_stream_impl.cc", 75 "mojo_demuxer_stream_impl.cc",
63 "mojo_demuxer_stream_impl.h", 76 "mojo_demuxer_stream_impl.h",
64 "mojo_renderer_factory.cc", 77 "mojo_renderer_factory.cc",
65 "mojo_renderer_factory.h", 78 "mojo_renderer_factory.h",
66 "mojo_renderer_impl.cc", 79 "mojo_renderer_impl.cc",
67 "mojo_renderer_impl.h", 80 "mojo_renderer_impl.h",
68 "mojo_type_trait.h", 81 "mojo_type_trait.h",
69 "mojo_video_decoder.cc", 82 "mojo_video_decoder.cc",
70 "mojo_video_decoder.h", 83 "mojo_video_decoder.h",
71 ] 84 ]
85 }
72 86
73 public_configs = [ ":mojo_media_config" ] 87 component("services") {
88 output_name = "media_mojo_services"
74 89
75 deps = [ 90 deps = [
76 "//base", 91 "//base",
77 "//media", 92 "//media",
93 "//media:shared_memory_support",
78 "//media/mojo/common", 94 "//media/mojo/common",
79 "//media/mojo/interfaces", 95 "//media/mojo/interfaces",
80 "//mojo/common", 96 "//mojo/common",
81 "//mojo/public/c/system:for_component", 97 "//mojo/public/c/system:for_component",
98 "//services/shell/public/cpp",
82 "//services/shell/public/cpp:sources", 99 "//services/shell/public/cpp:sources",
83 "//services/shell/public/interfaces", 100 "//services/shell/public/interfaces",
84 ]
85 }
86
87 source_set("cdm_service") {
88 deps = [
89 "//base",
90 "//media",
91 "//media/mojo/common",
92 "//media/mojo/interfaces",
93 "//mojo/common",
94 "//mojo/public/c/system:for_component",
95 "//services/shell/public/interfaces",
96 "//url", 101 "//url",
97 ] 102 ]
98 103
104 defines = [ "MEDIA_MOJO_IMPLEMENTATION" ]
105 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
106 public_configs = [ ":mojo_media_config" ]
107
99 sources = [ 108 sources = [
109 "demuxer_stream_provider_shim.cc",
110 "demuxer_stream_provider_shim.h",
111 "mojo_audio_decoder_service.cc",
112 "mojo_audio_decoder_service.h",
100 "mojo_cdm_allocator.cc", 113 "mojo_cdm_allocator.cc",
101 "mojo_cdm_allocator.h", 114 "mojo_cdm_allocator.h",
102 "mojo_cdm_promise.cc", 115 "mojo_cdm_promise.cc",
103 "mojo_cdm_promise.h", 116 "mojo_cdm_promise.h",
104 "mojo_cdm_service.cc", 117 "mojo_cdm_service.cc",
105 "mojo_cdm_service.h", 118 "mojo_cdm_service.h",
106 "mojo_cdm_service_context.cc", 119 "mojo_cdm_service_context.cc",
107 "mojo_cdm_service_context.h", 120 "mojo_cdm_service_context.h",
108 "mojo_decryptor_service.cc", 121 "mojo_decryptor_service.cc",
109 "mojo_decryptor_service.h", 122 "mojo_decryptor_service.h",
123 "mojo_demuxer_stream_adapter.cc",
124 "mojo_demuxer_stream_adapter.h",
125 "mojo_media_application.cc",
126 "mojo_media_application.h",
127 "mojo_media_application_factory.cc",
128 "mojo_media_application_factory.h",
129 "mojo_media_client.cc",
130 "mojo_media_client.h",
131 "mojo_renderer_service.cc",
132 "mojo_renderer_service.h",
110 "mojo_type_trait.h", 133 "mojo_type_trait.h",
134 "service_factory_impl.cc",
135 "service_factory_impl.h",
111 ] 136 ]
112 137
113 if (is_android) { 138 if (is_android) {
114 sources += [ 139 sources += [
115 "mojo_provision_fetcher.cc", 140 "mojo_provision_fetcher.cc",
116 "mojo_provision_fetcher.h", 141 "mojo_provision_fetcher.h",
117 ] 142 ]
118 } 143 }
119 144
120 # TODO(xhwang): Needed because targets can depend on cdm_service directly,
121 # which is a bit hacky since we need to access CdmService directly
122 # from C++ code (AVDA). In the future we'll make those decoders part of
123 # MojoMediaApplication, then we won't need this.
124 public_configs = [ ":mojo_media_config" ]
125
126 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
127 }
128
129 source_set("audio_decoder_service") {
130 sources = [
131 "mojo_audio_decoder_service.cc",
132 "mojo_audio_decoder_service.h",
133 ]
134
135 deps = [
136 ":cdm_service",
137 "//base",
138 "//media",
139 "//media:shared_memory_support",
140 "//media/mojo/common",
141 "//media/mojo/interfaces",
142 "//mojo/common",
143 ]
144 }
145
146 source_set("renderer_service") {
147 sources = [
148 "demuxer_stream_provider_shim.cc",
149 "demuxer_stream_provider_shim.h",
150 "mojo_demuxer_stream_adapter.cc",
151 "mojo_demuxer_stream_adapter.h",
152 "mojo_renderer_service.cc",
153 "mojo_renderer_service.h",
154 ]
155
156 deps = [
157 ":cdm_service",
158 "//base",
159 "//media",
160 "//media:shared_memory_support",
161 "//media/mojo/common",
162 "//media/mojo/interfaces",
163 "//mojo/common",
164 ]
165 }
166
167 source_set("application") {
168 sources = [
169 "mojo_media_application.cc",
170 "mojo_media_application.h",
171 "mojo_media_client.cc",
172 "mojo_media_client.h",
173 "service_factory_impl.cc",
174 "service_factory_impl.h",
175 ]
176
177 public_configs = [ ":mojo_media_config" ]
178
179 deps = [
180 ":audio_decoder_service",
181 ":cdm_service",
182 ":renderer_service",
183 "//base",
184 "//media",
185 "//media/mojo/interfaces",
186 "//services/shell/public/cpp",
187 ]
188 }
189
190 source_set("application_factory") {
191 sources = [
192 "mojo_media_application_factory.cc",
193 "mojo_media_application_factory.h",
194 ]
195
196 public_configs = [ ":mojo_media_config" ]
197
198 deps = [
199 ":application",
200 "//base",
201 "//media",
202 "//services/shell/public/cpp:sources",
203 ]
204
205 if (enable_test_mojo_media_client) { 145 if (enable_test_mojo_media_client) {
206 defines = [ "ENABLE_TEST_MOJO_MEDIA_CLIENT" ] 146 defines += [ "ENABLE_TEST_MOJO_MEDIA_CLIENT" ]
207 sources += [ 147 sources += [
208 "test_mojo_media_client.cc", 148 "test_mojo_media_client.cc",
209 "test_mojo_media_client.h", 149 "test_mojo_media_client.h",
210 ] 150 ]
211 } else if (is_android) { 151 } else if (is_android) {
212 sources += [ 152 sources += [
213 "android_mojo_media_client.cc", 153 "android_mojo_media_client.cc",
214 "android_mojo_media_client.h", 154 "android_mojo_media_client.h",
215 ] 155 ]
216 } else { 156 } else {
217 sources += [ 157 sources += [
218 "default_mojo_media_client.cc", 158 "default_mojo_media_client.cc",
219 "default_mojo_media_client.h", 159 "default_mojo_media_client.h",
220 ] 160 ]
221 } 161 }
222 } 162 }
223 163
224 mojo_native_application("media") { 164 mojo_native_application("media") {
225 testonly = true 165 testonly = true
226 166
227 sources = [ 167 sources = [
228 "main.cc", 168 "main.cc",
229 "test_mojo_media_client.cc", 169 "test_mojo_media_client.cc",
230 "test_mojo_media_client.h", 170 "test_mojo_media_client.h",
231 ] 171 ]
232 172
233 deps = [ 173 deps = [
234 ":application", 174 ":services",
235 "//base", 175 "//base",
236 "//media", 176 "//media",
237 "//mojo/logging", 177 "//mojo/logging",
238 "//mojo/public/c/system:for_shared_library", 178 "//mojo/public/c/system:for_shared_library",
239 "//services/shell/public/cpp:sources", 179 "//services/shell/public/cpp:sources",
240 ] 180 ]
241 } 181 }
242 182
243 mojo_application_manifest("media_manifest") { 183 mojo_application_manifest("media_manifest") {
244 application_name = "media" 184 application_name = "media"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 ":media", 228 ":media",
289 ":pipeline_test_manifest", 229 ":pipeline_test_manifest",
290 ] 230 ]
291 } 231 }
292 232
293 mojo_application_manifest("pipeline_test_manifest") { 233 mojo_application_manifest("pipeline_test_manifest") {
294 application_name = "media_pipeline_integration_unittests" 234 application_name = "media_pipeline_integration_unittests"
295 type = "exe" 235 type = "exe"
296 source = "pipeline_test_manifest.json" 236 source = "pipeline_test_manifest.json"
297 } 237 }
OLDNEW
« no previous file with comments | « media/mojo/BUILD.gn ('k') | media/mojo/services/media_mojo_export.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698