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