Only grant permissions to new extensions from sync if they have the expected version
[chromium-blink-merge.git] / chromecast / media / media.gyp
blob6237af1f178f4b960cb28903cff4429d49702189
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.
6   'variables': {
7     'chromium_code': 1,
8     'chromecast_branding%': 'public',
9     'libcast_media_gyp%': '',
10     'use_default_libcast_media%': 1,
11   },
12   'target_defaults': {
13     'include_dirs': [
14       '../public/', # Public APIs
15     ],
16   },
17   'targets': [
18     # TODO(gunsch): delete this target once Chromecast M44/earlier is obsolete.
19     # See: b/21639416
20     {
21       'target_name': 'libffmpegsumo',
22       'type': 'loadable_module',
23       'sources': ['empty.cc'],
24     },
25     {
26       'target_name': 'media_base',
27       'type': '<(component)',
28       'dependencies': [
29         '../../base/base.gyp:base',
30         '../../crypto/crypto.gyp:crypto',
31         '../../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
32         '<(libcast_media_gyp):libcast_media_1.0',
33       ],
34       'sources': [
35         'base/decrypt_context_impl.cc',
36         'base/decrypt_context_impl.h',
37         'base/decrypt_context_impl_clearkey.cc',
38         'base/decrypt_context_impl_clearkey.h',
39         'base/key_systems_common.cc',
40         'base/key_systems_common.h',
41         'base/media_caps.cc',
42         'base/media_caps.h',
43         'base/media_codec_support.cc',
44         'base/media_codec_support.h',
45         'base/media_message_loop.cc',
46         'base/media_message_loop.h',
47         'base/switching_media_renderer.cc',
48         'base/switching_media_renderer.h',
49       ],
50       'conditions': [
51         ['chromecast_branding!="public"', {
52           'dependencies': [
53             '../internal/chromecast_internal.gyp:media_base_internal',
54           ],
55         }, {
56           'sources': [
57             'base/key_systems_common_simple.cc',
58           ],
59         }],
60       ],
61     },
62     {
63       'target_name': 'media_cdm',
64       'type': '<(component)',
65       'dependencies': [
66         'media_base',
67         '../../base/base.gyp:base',
68         '../../media/media.gyp:media',
69       ],
70       'sources': [
71         'cdm/browser_cdm_cast.cc',
72         'cdm/browser_cdm_cast.h',
73         'cdm/chromecast_init_data.cc',
74         'cdm/chromecast_init_data.h',
75       ],
76       'conditions': [
77         ['use_playready==1', {
78           'sources': [
79             'cdm/playready_drm_delegate_android.cc',
80             'cdm/playready_drm_delegate_android.h',
81           ],
82         }],
83       ],
84     },
85     {
86       'target_name': 'cma_base',
87       'type': '<(component)',
88       'dependencies': [
89         '../chromecast.gyp:cast_base',
90         '../../base/base.gyp:base',
91         '../../media/media.gyp:media',
92       ],
93       'include_dirs': [
94         '../..',
95       ],
96       'sources': [
97         'cma/base/balanced_media_task_runner_factory.cc',
98         'cma/base/balanced_media_task_runner_factory.h',
99         'cma/base/buffering_controller.cc',
100         'cma/base/buffering_controller.h',
101         'cma/base/buffering_defs.cc',
102         'cma/base/buffering_defs.h',
103         'cma/base/buffering_frame_provider.cc',
104         'cma/base/buffering_frame_provider.h',
105         'cma/base/buffering_state.cc',
106         'cma/base/buffering_state.h',
107         'cma/base/cast_decoder_buffer_impl.cc',
108         'cma/base/cast_decoder_buffer_impl.h',
109         'cma/base/cast_decrypt_config_impl.cc',
110         'cma/base/cast_decrypt_config_impl.h',
111         'cma/base/cma_logging.h',
112         'cma/base/coded_frame_provider.cc',
113         'cma/base/coded_frame_provider.h',
114         'cma/base/decoder_buffer_adapter.cc',
115         'cma/base/decoder_buffer_adapter.h',
116         'cma/base/decoder_config_adapter.cc',
117         'cma/base/decoder_config_adapter.h',
118         'cma/base/media_task_runner.cc',
119         'cma/base/media_task_runner.h',
120         'cma/base/simple_media_task_runner.cc',
121         'cma/base/simple_media_task_runner.h',         
122       ],
123     },
124     {
125       'target_name': 'default_cma_backend',
126       'type': '<(component)',
127       'dependencies': [
128         '../chromecast.gyp:cast_base',
129         '../../base/base.gyp:base',
130       ],
131       'include_dirs': [
132         '../..',
133       ],
134       'sources': [
135         'cma/backend/audio_pipeline_device_default.cc',
136         'cma/backend/audio_pipeline_device_default.h',
137         'cma/backend/media_clock_device_default.cc',
138         'cma/backend/media_clock_device_default.h',
139         'cma/backend/media_component_device_default.cc',
140         'cma/backend/media_component_device_default.h',
141         'cma/backend/media_pipeline_backend_default.cc',
142         'cma/backend/media_pipeline_backend_default.h',
143         'cma/backend/video_pipeline_device_default.cc',
144         'cma/backend/video_pipeline_device_default.h',
145       ],
146     },
147     {
148       'target_name': 'cma_ipc',
149       'type': '<(component)',
150       'dependencies': [
151         '../../base/base.gyp:base',
152       ],
153       'sources': [
154         'cma/ipc/media_memory_chunk.cc',
155         'cma/ipc/media_memory_chunk.h',
156         'cma/ipc/media_message.cc',
157         'cma/ipc/media_message.h',
158         'cma/ipc/media_message_fifo.cc',
159         'cma/ipc/media_message_fifo.h',
160       ],
161     },
162     {
163       'target_name': 'cma_ipc_streamer',
164       'type': '<(component)',
165       'dependencies': [
166         '../../base/base.gyp:base',
167         '../../media/media.gyp:media',
168         'cma_base',
169       ],
170       'sources': [
171         'cma/ipc_streamer/audio_decoder_config_marshaller.cc',
172         'cma/ipc_streamer/audio_decoder_config_marshaller.h',
173         'cma/ipc_streamer/av_streamer_proxy.cc',
174         'cma/ipc_streamer/av_streamer_proxy.h',
175         'cma/ipc_streamer/coded_frame_provider_host.cc',
176         'cma/ipc_streamer/coded_frame_provider_host.h',
177         'cma/ipc_streamer/decoder_buffer_base_marshaller.cc',
178         'cma/ipc_streamer/decoder_buffer_base_marshaller.h',
179         'cma/ipc_streamer/decrypt_config_marshaller.cc',
180         'cma/ipc_streamer/decrypt_config_marshaller.h',
181         'cma/ipc_streamer/video_decoder_config_marshaller.cc',
182         'cma/ipc_streamer/video_decoder_config_marshaller.h',
183       ],
184     },
185     {
186       'target_name': 'cma_pipeline',
187       'type': '<(component)',
188       'dependencies': [
189         'cma_base',
190         'media_base',
191         'media_cdm',
192         '../../base/base.gyp:base',
193         '../../crypto/crypto.gyp:crypto',
194         '../../media/media.gyp:media',
195         '../../third_party/boringssl/boringssl.gyp:boringssl',
196       ],
197       'sources': [
198         'cma/pipeline/audio_pipeline.cc',
199         'cma/pipeline/audio_pipeline.h',
200         'cma/pipeline/audio_pipeline_impl.cc',
201         'cma/pipeline/audio_pipeline_impl.h',
202         'cma/pipeline/av_pipeline_client.cc',
203         'cma/pipeline/av_pipeline_client.h',
204         'cma/pipeline/av_pipeline_impl.cc',
205         'cma/pipeline/av_pipeline_impl.h',
206         'cma/pipeline/decrypt_util.cc',
207         'cma/pipeline/decrypt_util.h',
208         'cma/pipeline/frame_status_cb_impl.cc',
209         'cma/pipeline/frame_status_cb_impl.h',
210         'cma/pipeline/load_type.h',
211         'cma/pipeline/media_component_device_client_impl.cc',
212         'cma/pipeline/media_component_device_client_impl.h',
213         'cma/pipeline/media_pipeline.h',
214         'cma/pipeline/media_pipeline_client.cc',
215         'cma/pipeline/media_pipeline_client.h',
216         'cma/pipeline/media_pipeline_impl.cc',
217         'cma/pipeline/media_pipeline_impl.h',
218         'cma/pipeline/video_pipeline.cc',
219         'cma/pipeline/video_pipeline.h',
220         'cma/pipeline/video_pipeline_client.cc',
221         'cma/pipeline/video_pipeline_client.h',
222         'cma/pipeline/video_pipeline_device_client_impl.cc',
223         'cma/pipeline/video_pipeline_device_client_impl.h',
224         'cma/pipeline/video_pipeline_impl.cc',
225         'cma/pipeline/video_pipeline_impl.h',
226       ],
227     },
228     {
229       'target_name': 'cma_filters',
230       'type': '<(component)',
231       'dependencies': [
232         '../../base/base.gyp:base',
233         '../../media/media.gyp:media',
234         'cma_base',
235       ],
236       'sources': [
237         'cma/filters/cma_renderer.cc',
238         'cma/filters/cma_renderer.h',
239         'cma/filters/demuxer_stream_adapter.cc',
240         'cma/filters/demuxer_stream_adapter.h',
241         'cma/filters/hole_frame_factory.cc',
242         'cma/filters/hole_frame_factory.h',
243       ],
244     },
245     {
246       'target_name': 'cast_media',
247       'type': 'none',
248       'dependencies': [
249         'cma_base',
250         'cma_filters',
251         'cma_ipc',
252         'cma_ipc_streamer',
253         'cma_pipeline',
254         'default_cma_backend',
255         'media_cdm',
256       ],
257     },
258     {
259       'target_name': 'cast_media_unittests',
260       'type': '<(gtest_target_type)',
261       'dependencies': [
262         'cast_media',
263         '../../base/base.gyp:base',
264         '../../base/base.gyp:base_i18n',
265         '../../base/base.gyp:test_support_base',
266         '../../chromecast/chromecast.gyp:cast_metrics_test_support',
267         '../../gpu/gpu.gyp:gpu_unittest_utils',
268         '../../media/media.gyp:media_test_support',
269         '../../testing/gmock.gyp:gmock',
270         '../../testing/gtest.gyp:gtest',
271         '../../testing/gtest.gyp:gtest_main',
272         '../../ui/gfx/gfx.gyp:gfx_test_support',
273       ],
274       'sources': [
275         'cdm/chromecast_init_data_unittest.cc',
276         'cma/backend/audio_video_pipeline_device_unittest.cc',
277         'cma/base/balanced_media_task_runner_unittest.cc',
278         'cma/base/buffering_controller_unittest.cc',
279         'cma/base/buffering_frame_provider_unittest.cc',
280         'cma/filters/demuxer_stream_adapter_unittest.cc',
281         'cma/filters/multi_demuxer_stream_adapter_unittest.cc',
282         'cma/ipc/media_message_fifo_unittest.cc',
283         'cma/ipc/media_message_unittest.cc',
284         'cma/ipc_streamer/av_streamer_unittest.cc',
285         'cma/pipeline/audio_video_pipeline_impl_unittest.cc',
286         'cma/test/cma_end_to_end_test.cc',
287         'cma/test/demuxer_stream_for_test.cc',
288         'cma/test/demuxer_stream_for_test.h',
289         'cma/test/frame_generator_for_test.cc',
290         'cma/test/frame_generator_for_test.h',
291         'cma/test/frame_segmenter_for_test.cc',
292         'cma/test/frame_segmenter_for_test.h',
293         'cma/test/media_component_device_feeder_for_test.cc',
294         'cma/test/media_component_device_feeder_for_test.h',
295         'cma/test/mock_frame_consumer.cc',
296         'cma/test/mock_frame_consumer.h',
297         'cma/test/mock_frame_provider.cc',
298         'cma/test/mock_frame_provider.h',
299         'cma/test/run_all_unittests.cc',
300       ],
301     },
302   ], # end of targets
303   'conditions': [
304     ['use_default_libcast_media==1', {
305       'targets': [
306         {
307           'target_name': 'libcast_media_1.0',
308           'type': 'shared_library',
309           'dependencies': [
310             '../../chromecast/chromecast.gyp:cast_public_api',
311             'default_cma_backend'
312           ],
313           'include_dirs': [
314             '../..',
315           ],
316           'sources': [
317             'base/cast_media_default.cc',
318           ],
319         }
320       ]
321     }],
322   ],