OLD | NEW |
| (Empty) |
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 | |
5 { | |
6 'variables': { | |
7 'chromium_code': 1, | |
8 'chromecast_branding%': 'public', | |
9 'use_alsa%': 0, | |
10 | |
11 # Set true if the ALSA library being used supports raw timestamps | |
12 'use_alsa_monotonic_raw_tstamps%': 0, | |
13 }, | |
14 'target_defaults': { | |
15 'include_dirs': [ | |
16 '../..', # Root of Chromium checkout | |
17 '../public/', # Public APIs | |
18 ], | |
19 'target_conditions': [ | |
20 ['_type=="executable"', { | |
21 'ldflags': [ | |
22 # Allow OEMs to override default libraries that are shipped with | |
23 # cast receiver package by installed OEM-specific libraries in | |
24 # /oem_cast_shlib. | |
25 '-Wl,-rpath=/oem_cast_shlib', | |
26 # Some shlibs are built in same directory of executables. | |
27 '-Wl,-rpath=\$$ORIGIN', | |
28 ], | |
29 }], | |
30 ], | |
31 }, | |
32 'targets': [ | |
33 { | |
34 'target_name': 'media_audio', | |
35 'type': '<(component)', | |
36 'dependencies': [ | |
37 '../../media/media.gyp:media', | |
38 'cma_backend_manager', | |
39 ], | |
40 'sources': [ | |
41 'audio/cast_audio_manager.cc', | |
42 'audio/cast_audio_manager.h', | |
43 'audio/cast_audio_manager_factory.cc', | |
44 'audio/cast_audio_manager_factory.h', | |
45 'audio/cast_audio_output_stream.cc', | |
46 'audio/cast_audio_output_stream.h', | |
47 ], | |
48 }, | |
49 { | |
50 'target_name': 'media_base', | |
51 'type': '<(component)', | |
52 'dependencies': [ | |
53 'libcast_media_1.0', | |
54 '../../base/base.gyp:base', | |
55 '../../crypto/crypto.gyp:crypto', | |
56 '../../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h'
, | |
57 ], | |
58 'sources': [ | |
59 'base/decrypt_context_impl.cc', | |
60 'base/decrypt_context_impl.h', | |
61 'base/decrypt_context_impl_clearkey.cc', | |
62 'base/decrypt_context_impl_clearkey.h', | |
63 'base/key_systems_common.cc', | |
64 'base/key_systems_common.h', | |
65 'base/media_caps.cc', | |
66 'base/media_caps.h', | |
67 'base/media_codec_support.cc', | |
68 'base/media_codec_support.h', | |
69 'base/media_message_loop.cc', | |
70 'base/media_message_loop.h', | |
71 'base/media_resource_tracker.cc', | |
72 'base/media_resource_tracker.h', | |
73 'base/video_plane_controller.cc', | |
74 'base/video_plane_controller.h', | |
75 ], | |
76 }, | |
77 { | |
78 'target_name': 'media_cdm', | |
79 'type': '<(component)', | |
80 'dependencies': [ | |
81 'media_base', | |
82 '../../base/base.gyp:base', | |
83 '../../media/media.gyp:media', | |
84 ], | |
85 'sources': [ | |
86 'cdm/browser_cdm_cast.cc', | |
87 'cdm/browser_cdm_cast.h', | |
88 'cdm/chromecast_init_data.cc', | |
89 'cdm/chromecast_init_data.h', | |
90 ], | |
91 }, | |
92 { | |
93 'target_name': 'cma_base', | |
94 'type': '<(component)', | |
95 'dependencies': [ | |
96 '../chromecast.gyp:cast_base', | |
97 '../../base/base.gyp:base', | |
98 '../../media/media.gyp:media', | |
99 ], | |
100 'include_dirs': [ | |
101 '../..', | |
102 ], | |
103 'sources': [ | |
104 'cma/base/balanced_media_task_runner_factory.cc', | |
105 'cma/base/balanced_media_task_runner_factory.h', | |
106 'cma/base/buffering_controller.cc', | |
107 'cma/base/buffering_controller.h', | |
108 'cma/base/buffering_defs.cc', | |
109 'cma/base/buffering_defs.h', | |
110 'cma/base/buffering_frame_provider.cc', | |
111 'cma/base/buffering_frame_provider.h', | |
112 'cma/base/buffering_state.cc', | |
113 'cma/base/buffering_state.h', | |
114 'cma/base/cast_decrypt_config_impl.cc', | |
115 'cma/base/cast_decrypt_config_impl.h', | |
116 'cma/base/cma_logging.h', | |
117 'cma/base/coded_frame_provider.cc', | |
118 'cma/base/coded_frame_provider.h', | |
119 'cma/base/decoder_buffer_adapter.cc', | |
120 'cma/base/decoder_buffer_adapter.h', | |
121 'cma/base/decoder_config_adapter.cc', | |
122 'cma/base/decoder_config_adapter.h', | |
123 'cma/base/demuxer_stream_adapter.cc', | |
124 'cma/base/demuxer_stream_adapter.h', | |
125 'cma/base/media_task_runner.cc', | |
126 'cma/base/media_task_runner.h', | |
127 'cma/base/simple_media_task_runner.cc', | |
128 'cma/base/simple_media_task_runner.h', | |
129 ], | |
130 }, | |
131 { | |
132 'target_name': 'default_cma_backend', | |
133 'type': '<(component)', | |
134 'dependencies': [ | |
135 '../../base/base.gyp:base', | |
136 ], | |
137 'include_dirs': [ | |
138 '../..', | |
139 ], | |
140 'sources': [ | |
141 'cma/backend/audio_decoder_default.cc', | |
142 'cma/backend/audio_decoder_default.h', | |
143 'cma/backend/media_pipeline_backend_default.cc', | |
144 'cma/backend/media_pipeline_backend_default.h', | |
145 'cma/backend/video_decoder_default.cc', | |
146 'cma/backend/video_decoder_default.h', | |
147 ], | |
148 }, | |
149 { | |
150 'target_name': 'cma_backend_manager', | |
151 'type': '<(component)', | |
152 'dependencies': [ | |
153 '../../base/base.gyp:base', | |
154 ], | |
155 'include_dirs': [ | |
156 '../..', | |
157 ], | |
158 'sources': [ | |
159 'cma/backend/audio_decoder_wrapper.cc', | |
160 'cma/backend/audio_decoder_wrapper.h', | |
161 'cma/backend/media_pipeline_backend_manager.cc', | |
162 'cma/backend/media_pipeline_backend_manager.h', | |
163 'cma/backend/media_pipeline_backend_wrapper.cc', | |
164 'cma/backend/media_pipeline_backend_wrapper.h', | |
165 ], | |
166 }, | |
167 { | |
168 'target_name': 'cma_decoder', | |
169 'type': '<(component)', | |
170 'dependencies': [ | |
171 'cma_base', | |
172 '../../base/base.gyp:base', | |
173 '../../media/media.gyp:media', | |
174 ], | |
175 'sources': [ | |
176 'cma/decoder/cast_audio_decoder.h', | |
177 'cma/decoder/cast_audio_decoder_android.cc', | |
178 'cma/decoder/cast_audio_decoder_linux.cc', | |
179 ], | |
180 }, | |
181 { | |
182 'target_name': 'cma_ipc', | |
183 'type': '<(component)', | |
184 'dependencies': [ | |
185 '../../base/base.gyp:base', | |
186 ], | |
187 'sources': [ | |
188 'cma/ipc/media_memory_chunk.cc', | |
189 'cma/ipc/media_memory_chunk.h', | |
190 'cma/ipc/media_message.cc', | |
191 'cma/ipc/media_message.h', | |
192 'cma/ipc/media_message_fifo.cc', | |
193 'cma/ipc/media_message_fifo.h', | |
194 ], | |
195 }, | |
196 { | |
197 'target_name': 'cma_ipc_streamer', | |
198 'type': '<(component)', | |
199 'dependencies': [ | |
200 '../../base/base.gyp:base', | |
201 '../../media/media.gyp:media', | |
202 'cma_base', | |
203 ], | |
204 'sources': [ | |
205 'cma/ipc_streamer/audio_decoder_config_marshaller.cc', | |
206 'cma/ipc_streamer/audio_decoder_config_marshaller.h', | |
207 'cma/ipc_streamer/av_streamer_proxy.cc', | |
208 'cma/ipc_streamer/av_streamer_proxy.h', | |
209 'cma/ipc_streamer/coded_frame_provider_host.cc', | |
210 'cma/ipc_streamer/coded_frame_provider_host.h', | |
211 'cma/ipc_streamer/decoder_buffer_base_marshaller.cc', | |
212 'cma/ipc_streamer/decoder_buffer_base_marshaller.h', | |
213 'cma/ipc_streamer/decrypt_config_marshaller.cc', | |
214 'cma/ipc_streamer/decrypt_config_marshaller.h', | |
215 'cma/ipc_streamer/encryption_scheme_marshaller.cc', | |
216 'cma/ipc_streamer/encryption_scheme_marshaller.h', | |
217 'cma/ipc_streamer/video_decoder_config_marshaller.cc', | |
218 'cma/ipc_streamer/video_decoder_config_marshaller.h', | |
219 ], | |
220 }, | |
221 { | |
222 'target_name': 'cma_pipeline', | |
223 'type': '<(component)', | |
224 'dependencies': [ | |
225 'cma_base', | |
226 'cma_decoder', | |
227 'media_base', | |
228 'media_cdm', | |
229 '../../base/base.gyp:base', | |
230 '../../crypto/crypto.gyp:crypto', | |
231 '../../media/media.gyp:media', | |
232 '../../third_party/boringssl/boringssl.gyp:boringssl', | |
233 ], | |
234 'sources': [ | |
235 'cma/pipeline/audio_decoder_software_wrapper.cc', | |
236 'cma/pipeline/audio_decoder_software_wrapper.h', | |
237 'cma/pipeline/audio_pipeline_impl.cc', | |
238 'cma/pipeline/audio_pipeline_impl.h', | |
239 'cma/pipeline/av_pipeline_client.cc', | |
240 'cma/pipeline/av_pipeline_client.h', | |
241 'cma/pipeline/av_pipeline_impl.cc', | |
242 'cma/pipeline/av_pipeline_impl.h', | |
243 'cma/pipeline/decrypt_util.cc', | |
244 'cma/pipeline/decrypt_util.h', | |
245 'cma/pipeline/load_type.h', | |
246 'cma/pipeline/media_pipeline_client.cc', | |
247 'cma/pipeline/media_pipeline_client.h', | |
248 'cma/pipeline/media_pipeline_impl.cc', | |
249 'cma/pipeline/media_pipeline_impl.h', | |
250 'cma/pipeline/video_pipeline_client.cc', | |
251 'cma/pipeline/video_pipeline_client.h', | |
252 'cma/pipeline/video_pipeline_impl.cc', | |
253 'cma/pipeline/video_pipeline_impl.h', | |
254 ], | |
255 }, | |
256 { | |
257 'target_name': 'cast_media', | |
258 'type': 'none', | |
259 'dependencies': [ | |
260 'cma_base', | |
261 'cma_ipc', | |
262 'cma_ipc_streamer', | |
263 'cma_pipeline', | |
264 'default_cma_backend', | |
265 'media_audio', | |
266 'media_cdm', | |
267 ], | |
268 }, | |
269 { | |
270 'target_name': 'cast_media_unittests', | |
271 'type': '<(gtest_target_type)', | |
272 'dependencies': [ | |
273 'cast_media', | |
274 '../../base/base.gyp:base', | |
275 '../../base/base.gyp:base_i18n', | |
276 '../../base/base.gyp:test_support_base', | |
277 '../../chromecast/chromecast.gyp:cast_metrics_test_support', | |
278 '../../gpu/gpu.gyp:gpu_unittest_utils', | |
279 '../../media/media.gyp:media_test_support', | |
280 '../../testing/gmock.gyp:gmock', | |
281 '../../testing/gtest.gyp:gtest', | |
282 '../../testing/gtest.gyp:gtest_main', | |
283 '../../ui/gfx/gfx.gyp:gfx_test_support', | |
284 ], | |
285 'sources': [ | |
286 'audio/cast_audio_output_stream_unittest.cc', | |
287 'base/media_resource_tracker_unittest.cc', | |
288 'cdm/chromecast_init_data_unittest.cc', | |
289 'cma/backend/audio_video_pipeline_device_unittest.cc', | |
290 'cma/base/balanced_media_task_runner_unittest.cc', | |
291 'cma/base/buffering_controller_unittest.cc', | |
292 'cma/base/buffering_frame_provider_unittest.cc', | |
293 'cma/base/demuxer_stream_adapter_unittest.cc', | |
294 'cma/base/demuxer_stream_for_test.cc', | |
295 'cma/base/demuxer_stream_for_test.h', | |
296 'cma/base/multi_demuxer_stream_adapter_unittest.cc', | |
297 'cma/ipc/media_message_fifo_unittest.cc', | |
298 'cma/ipc/media_message_unittest.cc', | |
299 'cma/ipc_streamer/av_streamer_unittest.cc', | |
300 'cma/pipeline/audio_video_pipeline_impl_unittest.cc', | |
301 'cma/test/frame_generator_for_test.cc', | |
302 'cma/test/frame_generator_for_test.h', | |
303 'cma/test/frame_segmenter_for_test.cc', | |
304 'cma/test/frame_segmenter_for_test.h', | |
305 'cma/test/mock_frame_consumer.cc', | |
306 'cma/test/mock_frame_consumer.h', | |
307 'cma/test/mock_frame_provider.cc', | |
308 'cma/test/mock_frame_provider.h', | |
309 'cma/test/run_all_unittests.cc', | |
310 ], | |
311 'conditions': [ | |
312 ['chromecast_branding=="public"', { | |
313 'dependencies': [ | |
314 # Link default libcast_media_1.0 statically not to link dummy one | |
315 # dynamically for public unittests. | |
316 'libcast_media_1.0_default_core', | |
317 ], | |
318 }], | |
319 ], | |
320 }, | |
321 { | |
322 'target_name': 'cast_multizone_backend_unittests', | |
323 'type': '<(gtest_target_type)', | |
324 'dependencies': [ | |
325 'cast_media', | |
326 '../../base/base.gyp:base', | |
327 '../../base/base.gyp:test_support_base', | |
328 '../../chromecast/chromecast.gyp:cast_metrics_test_support', | |
329 '../../media/media.gyp:media_test_support', | |
330 '../../testing/gmock.gyp:gmock', | |
331 '../../testing/gtest.gyp:gtest', | |
332 '../../testing/gtest.gyp:gtest_main', | |
333 ], | |
334 'sources': [ | |
335 'cma/backend/multizone_backend_unittest.cc', | |
336 'cma/test/run_all_unittests.cc', | |
337 ], | |
338 'conditions': [ | |
339 ['chromecast_branding=="public"', { | |
340 'dependencies': [ | |
341 # Link default libcast_media_1.0 statically not to link dummy one | |
342 # dynamically for public unittests. | |
343 'libcast_media_1.0_default_core', | |
344 ], | |
345 }], | |
346 ], | |
347 }, | |
348 { # Target for OEM partners to override media shared library, i.e. | |
349 # libcast_media_1.0.so. This target is only used to build executables | |
350 # with correct linkage information. | |
351 'target_name': 'libcast_media_1.0', | |
352 'type': 'shared_library', | |
353 'dependencies': [ | |
354 '../../chromecast/chromecast.gyp:cast_public_api', | |
355 ], | |
356 'sources': [ | |
357 'base/cast_media_dummy.cc', | |
358 ], | |
359 }, | |
360 { # This target can be statically linked into unittests, but production | |
361 # binaries should not depend on this target. | |
362 'target_name': 'libcast_media_1.0_default_core', | |
363 'type': '<(component)', | |
364 'dependencies': [ | |
365 '<(DEPTH)/base/base.gyp:base', | |
366 '<(DEPTH)/chromecast/chromecast.gyp:cast_base', | |
367 '../../chromecast/chromecast.gyp:cast_public_api', | |
368 'default_cma_backend' | |
369 ], | |
370 'sources': [ | |
371 'base/cast_media_default.cc', | |
372 ], | |
373 }, | |
374 { # Default implementation of libcast_media_1.0.so. | |
375 'target_name': 'libcast_media_1.0_default', | |
376 'type': 'loadable_module', | |
377 # Cannot depend on libcast_media_1.0_default_core since a loadable_module | |
378 # include only symbols necessary for source files. So, it should include | |
379 # top-level .cc, here cast_media_default.cc explicitly. | |
380 'dependencies': [ | |
381 '../../chromecast/chromecast.gyp:cast_public_api', | |
382 'default_cma_backend' | |
383 ], | |
384 'sources': [ | |
385 'base/cast_media_default.cc', | |
386 ], | |
387 }, | |
388 { # Alsa implementation of CMA backend. | |
389 'target_name': 'alsa_cma_backend', | |
390 'type': '<(component)', | |
391 'dependencies': [ | |
392 'chromecast_alsa_features', | |
393 'cma_base', | |
394 'cma_decoder', | |
395 'default_cma_backend', | |
396 '<(DEPTH)/base/base.gyp:base', | |
397 '<(DEPTH)/chromecast/chromecast.gyp:cast_base', | |
398 '<(DEPTH)/chromecast/chromecast.gyp:cast_public_api', | |
399 '<(DEPTH)/media/media.gyp:media', | |
400 ], | |
401 'sources': [ | |
402 'cma/backend/alsa/alsa_wrapper.cc', | |
403 'cma/backend/alsa/alsa_wrapper.h', | |
404 'cma/backend/alsa/audio_decoder_alsa.cc', | |
405 'cma/backend/alsa/audio_decoder_alsa.h', | |
406 'cma/backend/alsa/media_pipeline_backend_alsa.cc', | |
407 'cma/backend/alsa/media_pipeline_backend_alsa.h', | |
408 'cma/backend/alsa/stream_mixer_alsa.cc', | |
409 'cma/backend/alsa/stream_mixer_alsa.h', | |
410 'cma/backend/alsa/stream_mixer_alsa_input.cc', | |
411 'cma/backend/alsa/stream_mixer_alsa_input.h', | |
412 'cma/backend/alsa/stream_mixer_alsa_input_impl.cc', | |
413 'cma/backend/alsa/stream_mixer_alsa_input_impl.h', | |
414 ], | |
415 }, # end of target 'alsa_cma_backend' | |
416 { | |
417 # GN target: //chromecast/media/cma/backend/alsa:alsa_features | |
418 'target_name': 'chromecast_alsa_features', | |
419 'includes': [ '../../build/buildflag_header.gypi' ], | |
420 'variables': { | |
421 'buildflag_header_path': 'chromecast/media/cma/backend/alsa/alsa_feature
s.h', | |
422 'buildflag_flags': [ | |
423 'ALSA_MONOTONIC_RAW_TSTAMPS=<(use_alsa_monotonic_raw_tstamps)', | |
424 ] | |
425 } | |
426 }, # end of target 'alsa_features' | |
427 { # Alsa implementation of libcast_media_1.0. | |
428 'target_name': 'libcast_media_1.0_audio', | |
429 'type': 'loadable_module', | |
430 'dependencies': [ | |
431 'alsa_cma_backend', | |
432 '<(DEPTH)/base/base.gyp:base', | |
433 '<(DEPTH)/chromecast/chromecast.gyp:cast_base', | |
434 '<(DEPTH)/chromecast/chromecast.gyp:cast_public_api', | |
435 '<(DEPTH)/chromecast/media/media.gyp:default_cma_backend', | |
436 ], | |
437 'sources': [ | |
438 'cma/backend/alsa/cast_media_shlib.cc', | |
439 'cma/backend/alsa/media_codec_support_cast_audio.cc', | |
440 # NOTE: can't depend on media_base because that pulls in libcast_media. | |
441 '<(DEPTH)/chromecast/media/base/media_caps.cc', | |
442 '<(DEPTH)/chromecast/media/base/media_caps.h', | |
443 ], | |
444 }, # end of target 'libcast_media_1.0_audio' | |
445 ], # end of targets | |
446 'conditions': [ | |
447 ['use_alsa==1', { | |
448 'targets': [ | |
449 { | |
450 'target_name': 'cast_alsa_cma_backend_unittests', | |
451 'type': '<(gtest_target_type)', | |
452 'dependencies': [ | |
453 'alsa_cma_backend', | |
454 '<(DEPTH)/base/base.gyp:run_all_unittests', | |
455 '<(DEPTH)/testing/gmock.gyp:gmock', | |
456 '<(DEPTH)/testing/gtest.gyp:gtest', | |
457 ], | |
458 'sources': [ | |
459 'cma/backend/alsa/mock_alsa_wrapper.cc', | |
460 'cma/backend/alsa/mock_alsa_wrapper.h', | |
461 'cma/backend/alsa/stream_mixer_alsa_unittest.cc', | |
462 ], | |
463 }, # end of target 'cast_alsa_cma_backend_unittests' | |
464 ], # end of targets | |
465 }], | |
466 ], # end of conditions | |
467 } | |
OLD | NEW |