1 # Copyright (c) 2012 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.
8 # Override to dynamically link the cras (ChromeOS audio) library.
10 # Option e.g. for Linux distributions to link pulseaudio directly
11 # (DT_NEEDED) instead of using dlopen. This helps with automated
12 # detection of ABI mismatches and prevents silent errors.
13 'linux_link_pulseaudio%': 0,
15 ['OS=="android" or OS=="ios"', {
16 # Android and iOS don't use ffmpeg or libvpx.
17 'media_use_ffmpeg%': 0,
18 'media_use_libvpx%': 0,
19 }, { # 'OS!="android" and OS!="ios"'
20 'media_use_ffmpeg%': 1,
21 'media_use_libvpx%': 1,
23 # Enable ALSA and Pulse for runtime selection.
24 ['(OS=="linux" or OS=="freebsd" or OS=="solaris") and (embedded!=1 or (chromecast==1 and target_arch!="arm"))', {
25 # ALSA is always needed for Web MIDI even if the cras is enabled.
39 'pkg-config': '../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)" "<(system_libdir)"',
41 'pkg-config': 'pkg-config'
43 # low memory buffer is used in non-Android based chromecast build due to hardware limitation.
44 ['chromecast==1 and OS!="android"', {
45 'use_low_memory_buffer%': 1,
47 'use_low_memory_buffer%': 0,
57 'target_name': 'media',
58 'type': '<(component)',
60 '../base/base.gyp:base',
61 '../base/base.gyp:base_i18n',
62 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
63 '../crypto/crypto.gyp:crypto',
64 '../gpu/gpu.gyp:command_buffer_common',
65 '../skia/skia.gyp:skia',
66 '../third_party/libyuv/libyuv.gyp:libyuv',
67 '../third_party/opus/opus.gyp:opus',
68 '../ui/events/events.gyp:events_base',
69 '../ui/gfx/gfx.gyp:gfx',
70 '../ui/gfx/gfx.gyp:gfx_geometry',
71 '../url/url.gyp:url_lib',
72 'shared_memory_support',
75 'MEDIA_IMPLEMENTATION',
81 'audio/agc_audio_stream.h',
82 'audio/alsa/alsa_input.cc',
83 'audio/alsa/alsa_input.h',
84 'audio/alsa/alsa_output.cc',
85 'audio/alsa/alsa_output.h',
86 'audio/alsa/alsa_util.cc',
87 'audio/alsa/alsa_util.h',
88 'audio/alsa/alsa_wrapper.cc',
89 'audio/alsa/alsa_wrapper.h',
90 'audio/alsa/audio_manager_alsa.cc',
91 'audio/alsa/audio_manager_alsa.h',
92 'audio/android/audio_manager_android.cc',
93 'audio/android/audio_manager_android.h',
94 'audio/android/audio_record_input.cc',
95 'audio/android/audio_record_input.h',
96 'audio/android/opensles_input.cc',
97 'audio/android/opensles_input.h',
98 'audio/android/opensles_output.cc',
99 'audio/android/opensles_output.h',
100 'audio/android/opensles_wrapper.cc',
101 'audio/audio_device_name.cc',
102 'audio/audio_device_name.h',
103 'audio/audio_device_thread.cc',
104 'audio/audio_device_thread.h',
105 'audio/audio_input_controller.cc',
106 'audio/audio_input_controller.h',
107 'audio/audio_input_device.cc',
108 'audio/audio_input_device.h',
109 'audio/audio_input_ipc.cc',
110 'audio/audio_input_ipc.h',
112 'audio/audio_manager.cc',
113 'audio/audio_manager.h',
114 'audio/audio_manager_base.cc',
115 'audio/audio_manager_base.h',
116 'audio/audio_output_controller.cc',
117 'audio/audio_output_controller.h',
118 'audio/audio_output_device.cc',
119 'audio/audio_output_device.h',
120 'audio/audio_output_dispatcher.cc',
121 'audio/audio_output_dispatcher.h',
122 'audio/audio_output_dispatcher_impl.cc',
123 'audio/audio_output_dispatcher_impl.h',
124 'audio/audio_output_ipc.cc',
125 'audio/audio_output_ipc.h',
126 'audio/audio_output_proxy.cc',
127 'audio/audio_output_proxy.h',
128 'audio/audio_output_resampler.cc',
129 'audio/audio_output_resampler.h',
130 'audio/audio_output_stream_sink.cc',
131 'audio/audio_output_stream_sink.h',
132 'audio/audio_power_monitor.cc',
133 'audio/audio_power_monitor.h',
134 'audio/audio_source_diverter.h',
135 'audio/clockless_audio_sink.cc',
136 'audio/clockless_audio_sink.h',
137 'audio/cras/audio_manager_cras.cc',
138 'audio/cras/audio_manager_cras.h',
139 'audio/cras/cras_input.cc',
140 'audio/cras/cras_input.h',
141 'audio/cras/cras_unified.cc',
142 'audio/cras/cras_unified.h',
143 'audio/fake_audio_consumer.cc',
144 'audio/fake_audio_consumer.h',
145 'audio/fake_audio_input_stream.cc',
146 'audio/fake_audio_input_stream.h',
147 'audio/fake_audio_log_factory.h',
148 'audio/fake_audio_log_factory.cc',
149 'audio/fake_audio_manager.cc',
150 'audio/fake_audio_manager.h',
151 'audio/fake_audio_output_stream.cc',
152 'audio/fake_audio_output_stream.h',
153 'audio/linux/audio_manager_linux.cc',
154 'audio/mac/audio_auhal_mac.cc',
155 'audio/mac/audio_auhal_mac.h',
156 'audio/mac/audio_device_listener_mac.cc',
157 'audio/mac/audio_device_listener_mac.h',
158 'audio/mac/audio_input_mac.cc',
159 'audio/mac/audio_input_mac.h',
160 'audio/mac/audio_low_latency_input_mac.cc',
161 'audio/mac/audio_low_latency_input_mac.h',
162 'audio/mac/audio_manager_mac.cc',
163 'audio/mac/audio_manager_mac.h',
164 'audio/null_audio_sink.cc',
165 'audio/null_audio_sink.h',
166 'audio/openbsd/audio_manager_openbsd.cc',
167 'audio/openbsd/audio_manager_openbsd.h',
168 'audio/pulse/audio_manager_pulse.cc',
169 'audio/pulse/audio_manager_pulse.h',
170 'audio/pulse/pulse_input.cc',
171 'audio/pulse/pulse_input.h',
172 'audio/pulse/pulse_output.cc',
173 'audio/pulse/pulse_output.h',
174 'audio/pulse/pulse_util.cc',
175 'audio/pulse/pulse_util.h',
176 'audio/sample_rates.cc',
177 'audio/sample_rates.h',
178 'audio/scoped_task_runner_observer.cc',
179 'audio/scoped_task_runner_observer.h',
180 'audio/simple_sources.cc',
181 'audio/simple_sources.h',
182 'audio/sounds/audio_stream_handler.cc',
183 'audio/sounds/audio_stream_handler.h',
184 'audio/sounds/sounds_manager.cc',
185 'audio/sounds/sounds_manager.h',
186 'audio/sounds/wav_audio_handler.cc',
187 'audio/sounds/wav_audio_handler.h',
188 'audio/virtual_audio_input_stream.cc',
189 'audio/virtual_audio_input_stream.h',
190 'audio/virtual_audio_output_stream.cc',
191 'audio/virtual_audio_output_stream.h',
192 'audio/win/audio_device_listener_win.cc',
193 'audio/win/audio_device_listener_win.h',
194 'audio/win/audio_low_latency_input_win.cc',
195 'audio/win/audio_low_latency_input_win.h',
196 'audio/win/audio_low_latency_output_win.cc',
197 'audio/win/audio_low_latency_output_win.h',
198 'audio/win/audio_manager_win.cc',
199 'audio/win/audio_manager_win.h',
200 'audio/win/avrt_wrapper_win.cc',
201 'audio/win/avrt_wrapper_win.h',
202 'audio/win/core_audio_util_win.cc',
203 'audio/win/core_audio_util_win.h',
204 'audio/win/device_enumeration_win.cc',
205 'audio/win/device_enumeration_win.h',
206 'audio/win/wavein_input_win.cc',
207 'audio/win/wavein_input_win.h',
208 'audio/win/waveout_output_win.cc',
209 'audio/win/waveout_output_win.h',
210 'base/audio_block_fifo.cc',
211 'base/audio_block_fifo.h',
212 'base/audio_buffer.cc',
213 'base/audio_buffer.h',
214 'base/audio_buffer_queue.cc',
215 'base/audio_buffer_queue.h',
216 'base/audio_buffer_converter.cc',
217 'base/audio_buffer_converter.h',
218 'base/audio_capturer_source.h',
219 'base/audio_converter.cc',
220 'base/audio_converter.h',
221 'base/audio_decoder.cc',
222 'base/audio_decoder.h',
223 'base/audio_decoder_config.cc',
224 'base/audio_decoder_config.h',
225 'base/audio_discard_helper.cc',
226 'base/audio_discard_helper.h',
227 'base/audio_fifo.cc',
229 'base/audio_hardware_config.cc',
230 'base/audio_hardware_config.h',
231 'base/audio_hash.cc',
233 'base/audio_pull_fifo.cc',
234 'base/audio_pull_fifo.h',
235 'base/audio_renderer.cc',
236 'base/audio_renderer.h',
237 'base/audio_renderer_mixer.cc',
238 'base/audio_renderer_mixer.h',
239 'base/audio_renderer_mixer_input.cc',
240 'base/audio_renderer_mixer_input.h',
241 'base/audio_renderer_sink.h',
242 'base/audio_shifter.cc',
243 'base/audio_shifter.h',
244 'base/audio_splicer.cc',
245 'base/audio_splicer.h',
246 'base/audio_timestamp_helper.cc',
247 'base/audio_timestamp_helper.h',
248 'base/audio_video_metadata_extractor.cc',
249 'base/audio_video_metadata_extractor.h',
250 'base/bind_to_current_loop.h',
251 'base/bit_reader.cc',
253 'base/bit_reader_core.cc',
254 'base/bit_reader_core.h',
255 'base/bitstream_buffer.h',
256 'base/buffering_state.h',
258 'base/byte_queue.cc',
260 'base/cdm_callback_promise.cc',
261 'base/cdm_callback_promise.h',
262 'base/cdm_context.cc',
263 'base/cdm_context.h',
264 'base/cdm_factory.cc',
265 'base/cdm_factory.h',
266 'base/cdm_key_information.cc',
267 'base/cdm_key_information.h',
268 'base/cdm_promise.cc',
269 'base/cdm_promise.h',
270 'base/cdm_promise_adapter.cc',
271 'base/cdm_promise_adapter.h',
272 'base/channel_mixer.cc',
273 'base/channel_mixer.h',
274 'base/channel_mixing_matrix.cc',
275 'base/channel_mixing_matrix.h',
276 'base/container_names.cc',
277 'base/container_names.h',
278 'base/data_buffer.cc',
279 'base/data_buffer.h',
280 'base/data_source.cc',
281 'base/data_source.h',
282 'base/decoder_buffer.cc',
283 'base/decoder_buffer.h',
284 'base/decoder_buffer_queue.cc',
285 'base/decoder_buffer_queue.h',
286 'base/decrypt_config.cc',
287 'base/decrypt_config.h',
292 'base/demuxer_stream.cc',
293 'base/demuxer_stream.h',
294 'base/demuxer_stream_provider.cc',
295 'base/demuxer_stream_provider.h',
298 'base/eme_constants.h',
299 'base/key_system_info.cc',
300 'base/key_system_info.h',
301 'base/key_systems_support_uma.cc',
302 'base/key_systems_support_uma.h',
303 'base/key_systems.cc',
304 'base/key_systems.h',
305 'base/keyboard_event_counter.cc',
306 'base/keyboard_event_counter.h',
307 'base/mac/avfoundation_glue.h',
308 'base/mac/avfoundation_glue.mm',
309 'base/mac/coremedia_glue.h',
310 'base/mac/coremedia_glue.mm',
311 'base/mac/corevideo_glue.h',
312 'base/mac/videotoolbox_glue.h',
313 'base/mac/videotoolbox_glue.mm',
314 'base/mac/video_frame_mac.h',
315 'base/mac/video_frame_mac.cc',
318 'base/media_client.cc',
319 'base/media_client.h',
320 'base/media_file_checker.cc',
321 'base/media_file_checker.h',
322 'base/media_keys.cc',
326 'base/media_log_event.h',
327 'base/media_posix.cc',
328 'base/media_switches.cc',
329 'base/media_switches.h',
331 'base/multi_channel_resampler.cc',
332 'base/multi_channel_resampler.h',
335 'base/pipeline_status.h',
336 'base/player_tracker.cc',
337 'base/player_tracker.h',
342 'base/renderer_factory.cc',
343 'base/renderer_factory.h',
344 'base/sample_format.cc',
345 'base/sample_format.h',
346 'base/scoped_histogram_timer.h',
347 'base/seekable_buffer.cc',
348 'base/seekable_buffer.h',
349 'base/serial_runner.cc',
350 'base/serial_runner.h',
351 'base/simd/convert_rgb_to_yuv.h',
352 'base/simd/convert_rgb_to_yuv_c.cc',
353 'base/simd/convert_yuv_to_rgb.h',
354 'base/simd/convert_yuv_to_rgb_c.cc',
355 'base/simd/filter_yuv.h',
356 'base/simd/filter_yuv_c.cc',
357 'base/sinc_resampler.cc',
358 'base/sinc_resampler.h',
359 'base/stream_parser.cc',
360 'base/stream_parser.h',
361 'base/stream_parser_buffer.cc',
362 'base/stream_parser_buffer.h',
365 'base/text_ranges.cc',
366 'base/text_ranges.h',
367 'base/text_renderer.cc',
368 'base/text_renderer.h',
370 'base/text_track_config.cc',
371 'base/text_track_config.h',
372 'base/time_delta_interpolator.cc',
373 'base/time_delta_interpolator.h',
374 'base/time_source.h',
375 'base/user_input_monitor.cc',
376 'base/user_input_monitor.h',
377 'base/user_input_monitor_linux.cc',
378 'base/user_input_monitor_mac.cc',
379 'base/user_input_monitor_win.cc',
380 'base/video_decoder.cc',
381 'base/video_decoder.h',
382 'base/video_decoder_config.cc',
383 'base/video_decoder_config.h',
384 'base/video_frame.cc',
385 'base/video_frame.h',
386 'base/video_frame_pool.cc',
387 'base/video_frame_pool.h',
388 'base/video_renderer.cc',
389 'base/video_renderer.h',
390 'base/video_rotation.h',
391 'base/video_util.cc',
393 'base/yuv_convert.cc',
394 'base/yuv_convert.h',
395 'base/wall_clock_time_source.cc',
396 'base/wall_clock_time_source.h',
397 'cdm/aes_decryptor.cc',
398 'cdm/aes_decryptor.h',
399 'cdm/default_cdm_factory.cc',
400 'cdm/default_cdm_factory.h',
401 'cdm/json_web_key.cc',
402 'cdm/json_web_key.h',
403 'cdm/key_system_names.cc',
404 'cdm/key_system_names.h',
405 'cdm/player_tracker_impl.cc',
406 'cdm/player_tracker_impl.h',
407 'cdm/proxy_decryptor.cc',
408 'cdm/proxy_decryptor.h',
409 'ffmpeg/ffmpeg_common.cc',
410 'ffmpeg/ffmpeg_common.h',
411 'ffmpeg/ffmpeg_deleters.h',
412 'filters/audio_clock.cc',
413 'filters/audio_clock.h',
414 'filters/audio_file_reader.cc',
415 'filters/audio_file_reader.h',
416 'filters/audio_renderer_algorithm.cc',
417 'filters/audio_renderer_algorithm.h',
418 'filters/audio_renderer_impl.cc',
419 'filters/audio_renderer_impl.h',
420 'filters/blocking_url_protocol.cc',
421 'filters/blocking_url_protocol.h',
422 'filters/chunk_demuxer.cc',
423 'filters/chunk_demuxer.h',
424 'filters/context_3d.h',
425 'filters/decoder_selector.cc',
426 'filters/decoder_selector.h',
427 'filters/decoder_stream.cc',
428 'filters/decoder_stream.h',
429 'filters/decoder_stream_traits.cc',
430 'filters/decoder_stream_traits.h',
431 'filters/decrypting_audio_decoder.cc',
432 'filters/decrypting_audio_decoder.h',
433 'filters/decrypting_demuxer_stream.cc',
434 'filters/decrypting_demuxer_stream.h',
435 'filters/decrypting_video_decoder.cc',
436 'filters/decrypting_video_decoder.h',
437 'filters/default_renderer_factory.cc',
438 'filters/default_renderer_factory.h',
439 'filters/ffmpeg_audio_decoder.cc',
440 'filters/ffmpeg_audio_decoder.h',
441 'filters/ffmpeg_bitstream_converter.h',
442 'filters/ffmpeg_demuxer.cc',
443 'filters/ffmpeg_demuxer.h',
444 'filters/ffmpeg_glue.cc',
445 'filters/ffmpeg_glue.h',
446 'filters/ffmpeg_video_decoder.cc',
447 'filters/ffmpeg_video_decoder.h',
448 'filters/file_data_source.cc',
449 'filters/file_data_source.h',
450 'filters/frame_processor.cc',
451 'filters/frame_processor.h',
452 'filters/gpu_video_accelerator_factories.cc',
453 'filters/gpu_video_accelerator_factories.h',
454 'filters/gpu_video_decoder.cc',
455 'filters/gpu_video_decoder.h',
456 'filters/h264_bit_reader.cc',
457 'filters/h264_bit_reader.h',
458 'filters/h264_parser.cc',
459 'filters/h264_parser.h',
460 'filters/in_memory_url_protocol.cc',
461 'filters/in_memory_url_protocol.h',
462 'filters/jpeg_parser.cc',
463 'filters/jpeg_parser.h',
464 'filters/opus_audio_decoder.cc',
465 'filters/opus_audio_decoder.h',
466 'filters/renderer_impl.cc',
467 'filters/renderer_impl.h',
468 'filters/skcanvas_video_renderer.cc',
469 'filters/skcanvas_video_renderer.h',
470 'filters/source_buffer_range.cc',
471 'filters/source_buffer_range.h',
472 'filters/source_buffer_stream.cc',
473 'filters/source_buffer_stream.h',
474 'filters/stream_parser_factory.cc',
475 'filters/stream_parser_factory.h',
476 'filters/video_frame_scheduler.h',
477 'filters/video_frame_scheduler_impl.cc',
478 'filters/video_frame_scheduler_impl.h',
479 'filters/video_frame_scheduler_proxy.cc',
480 'filters/video_frame_scheduler_proxy.h',
481 'filters/video_renderer_impl.cc',
482 'filters/video_renderer_impl.h',
483 'filters/vp8_bool_decoder.cc',
484 'filters/vp8_bool_decoder.h',
485 'filters/vp8_parser.cc',
486 'filters/vp8_parser.h',
487 'filters/vpx_video_decoder.cc',
488 'filters/vpx_video_decoder.h',
489 'filters/webvtt_util.h',
490 'filters/wsola_internals.cc',
491 'filters/wsola_internals.h',
492 'midi/midi_manager.cc',
493 'midi/midi_manager.h',
494 'midi/midi_manager_alsa.cc',
495 'midi/midi_manager_alsa.h',
496 'midi/midi_manager_android.cc',
497 'midi/midi_manager_mac.cc',
498 'midi/midi_manager_mac.h',
499 'midi/midi_manager_usb.cc',
500 'midi/midi_manager_usb.h',
501 'midi/midi_manager_win.cc',
502 'midi/midi_manager_win.h',
503 'midi/midi_message_queue.cc',
504 'midi/midi_message_queue.h',
505 'midi/midi_message_util.cc',
506 'midi/midi_message_util.h',
507 'midi/midi_port_info.cc',
508 'midi/midi_port_info.h',
509 'midi/usb_midi_descriptor_parser.cc',
510 'midi/usb_midi_descriptor_parser.h',
511 'midi/usb_midi_device.h',
512 'midi/usb_midi_device_android.cc',
513 'midi/usb_midi_device_android.h',
514 'midi/usb_midi_device_factory_android.cc',
515 'midi/usb_midi_device_factory_android.h',
516 'midi/usb_midi_input_stream.cc',
517 'midi/usb_midi_input_stream.h',
518 'midi/usb_midi_jack.h',
519 'midi/usb_midi_output_stream.cc',
520 'midi/usb_midi_output_stream.h',
521 'ozone/media_ozone_platform.cc',
522 'ozone/media_ozone_platform.h',
523 'video/capture/android/video_capture_device_android.cc',
524 'video/capture/android/video_capture_device_android.h',
525 'video/capture/android/video_capture_device_factory_android.cc',
526 'video/capture/android/video_capture_device_factory_android.h',
527 'video/capture/fake_video_capture_device.cc',
528 'video/capture/fake_video_capture_device.h',
529 'video/capture/fake_video_capture_device_factory.h',
530 'video/capture/fake_video_capture_device_factory.cc',
531 'video/capture/file_video_capture_device.cc',
532 'video/capture/file_video_capture_device.h',
533 'video/capture/file_video_capture_device_factory.h',
534 'video/capture/file_video_capture_device_factory.cc',
535 'video/capture/linux/video_capture_device_factory_linux.cc',
536 'video/capture/linux/video_capture_device_factory_linux.h',
537 'video/capture/linux/video_capture_device_linux.cc',
538 'video/capture/linux/video_capture_device_linux.h',
539 'video/capture/linux/video_capture_device_chromeos.cc',
540 'video/capture/linux/video_capture_device_chromeos.h',
541 'video/capture/mac/platform_video_capturing_mac.h',
542 'video/capture/mac/video_capture_device_avfoundation_mac.h',
543 'video/capture/mac/video_capture_device_avfoundation_mac.mm',
544 'video/capture/mac/video_capture_device_decklink_mac.h',
545 'video/capture/mac/video_capture_device_decklink_mac.mm',
546 'video/capture/mac/video_capture_device_factory_mac.h',
547 'video/capture/mac/video_capture_device_factory_mac.mm',
548 'video/capture/mac/video_capture_device_mac.h',
549 'video/capture/mac/video_capture_device_mac.mm',
550 'video/capture/mac/video_capture_device_qtkit_mac.h',
551 'video/capture/mac/video_capture_device_qtkit_mac.mm',
552 'video/capture/video_capture_device.cc',
553 'video/capture/video_capture_device.h',
554 'video/capture/video_capture_device_factory.cc',
555 'video/capture/video_capture_device_factory.h',
556 'video/capture/video_capture_device_info.cc',
557 'video/capture/video_capture_device_info.h',
558 'video/capture/video_capture_types.cc',
559 'video/capture/video_capture_types.h',
560 'video/capture/win/capability_list_win.cc',
561 'video/capture/win/capability_list_win.h',
562 'video/capture/win/filter_base_win.cc',
563 'video/capture/win/filter_base_win.h',
564 'video/capture/win/pin_base_win.cc',
565 'video/capture/win/pin_base_win.h',
566 'video/capture/win/sink_filter_observer_win.h',
567 'video/capture/win/sink_filter_win.cc',
568 'video/capture/win/sink_filter_win.h',
569 'video/capture/win/sink_input_pin_win.cc',
570 'video/capture/win/sink_input_pin_win.h',
571 'video/capture/win/video_capture_device_factory_win.cc',
572 'video/capture/win/video_capture_device_factory_win.h',
573 'video/capture/win/video_capture_device_mf_win.cc',
574 'video/capture/win/video_capture_device_mf_win.h',
575 'video/capture/win/video_capture_device_win.cc',
576 'video/capture/win/video_capture_device_win.h',
581 'video/video_decode_accelerator.cc',
582 'video/video_decode_accelerator.h',
583 'video/video_encode_accelerator.cc',
584 'video/video_encode_accelerator.h',
585 'formats/common/offset_byte_queue.cc',
586 'formats/common/offset_byte_queue.h',
587 'formats/webm/webm_audio_client.cc',
588 'formats/webm/webm_audio_client.h',
589 'formats/webm/webm_cluster_parser.cc',
590 'formats/webm/webm_cluster_parser.h',
591 'formats/webm/webm_constants.cc',
592 'formats/webm/webm_constants.h',
593 'formats/webm/webm_content_encodings.cc',
594 'formats/webm/webm_content_encodings.h',
595 'formats/webm/webm_content_encodings_client.cc',
596 'formats/webm/webm_content_encodings_client.h',
597 'formats/webm/webm_crypto_helpers.cc',
598 'formats/webm/webm_crypto_helpers.h',
599 'formats/webm/webm_info_parser.cc',
600 'formats/webm/webm_info_parser.h',
601 'formats/webm/webm_parser.cc',
602 'formats/webm/webm_parser.h',
603 'formats/webm/webm_stream_parser.cc',
604 'formats/webm/webm_stream_parser.h',
605 'formats/webm/webm_tracks_parser.cc',
606 'formats/webm/webm_tracks_parser.h',
607 'formats/webm/webm_video_client.cc',
608 'formats/webm/webm_video_client.h',
609 'formats/webm/webm_webvtt_parser.cc',
610 'formats/webm/webm_webvtt_parser.h'
612 'direct_dependent_settings': {
623 ['media_use_ffmpeg==1', {
625 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
627 }, { # media_use_ffmpeg==0
628 # Exclude the sources that depend on ffmpeg.
630 'base/audio_video_metadata_extractor.cc',
631 'base/audio_video_metadata_extractor.h',
632 'base/container_names.cc',
633 'base/container_names.h',
634 'base/media_file_checker.cc',
635 'base/media_file_checker.h',
636 'base/media_posix.cc',
637 'ffmpeg/ffmpeg_common.cc',
638 'ffmpeg/ffmpeg_common.h',
639 'filters/audio_file_reader.cc',
640 'filters/audio_file_reader.h',
641 'filters/blocking_url_protocol.cc',
642 'filters/blocking_url_protocol.h',
643 'filters/ffmpeg_aac_bitstream_converter.cc',
644 'filters/ffmpeg_aac_bitstream_converter.h',
645 'filters/ffmpeg_audio_decoder.cc',
646 'filters/ffmpeg_audio_decoder.h',
647 'filters/ffmpeg_bitstream_converter.h',
648 'filters/ffmpeg_demuxer.cc',
649 'filters/ffmpeg_demuxer.h',
650 'filters/ffmpeg_glue.cc',
651 'filters/ffmpeg_glue.h',
652 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc',
653 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.h',
654 'filters/ffmpeg_video_decoder.cc',
655 'filters/ffmpeg_video_decoder.h',
656 'filters/in_memory_url_protocol.cc',
657 'filters/in_memory_url_protocol.h',
660 'MEDIA_DISABLE_FFMPEG',
662 'direct_dependent_settings': {
664 'MEDIA_DISABLE_FFMPEG',
668 ['media_use_libvpx==1', {
670 '<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx',
672 }, { # media_use_libvpx==0
674 'MEDIA_DISABLE_LIBVPX',
676 'direct_dependent_settings': {
678 'MEDIA_DISABLE_LIBVPX',
681 # Exclude the sources that depend on libvpx.
683 'filters/vpx_video_decoder.cc',
684 'filters/vpx_video_decoder.h',
687 ['enable_browser_cdms==1', {
689 'base/browser_cdm.cc',
690 'base/browser_cdm.h',
691 'base/browser_cdm_factory.cc',
692 'base/browser_cdm_factory.h',
697 'media_android_jni_headers',
699 'video_capture_android_jni_headers',
704 'base/media_stub.cc',
707 'filters/default_renderer_factory.cc',
708 'filters/default_renderer_factory.h',
709 'filters/opus_audio_decoder.cc',
710 'filters/opus_audio_decoder.h',
713 ['android_webview_build==0', {
720 'DISABLE_USER_INPUT_MONITOR',
723 # For VaapiVideoEncodeAccelerator.
724 ['target_arch != "arm" and chromeos == 1', {
726 'filters/h264_bitstream_buffer.cc',
727 'filters/h264_bitstream_buffer.h',
741 ['exclude', '(^|/)alsa/'],
742 ['exclude', '_alsa\\.(h|cc)$'],
747 'audio/openbsd/audio_manager_openbsd.cc',
748 'audio/openbsd/audio_manager_openbsd.h',
755 '../build/linux/system.gyp:x11',
756 '../build/linux/system.gyp:xdamage',
757 '../build/linux/system.gyp:xext',
758 '../build/linux/system.gyp:xfixes',
759 '../build/linux/system.gyp:xtst',
760 '../ui/gfx/x/gfx_x11.gyp:gfx_x11',
762 }, { # else: use_x11==0
764 'base/user_input_monitor_linux.cc',
767 'DISABLE_USER_INPUT_MONITOR',
772 '<!@(<(pkg-config) --cflags libcras)',
776 '<!@(<(pkg-config) --libs libcras)',
782 }, { # else: use_cras==0
784 'audio/cras/audio_manager_cras.cc',
785 'audio/cras/audio_manager_cras.h',
786 'audio/cras/cras_input.cc',
787 'audio/cras/cras_input.h',
788 'audio/cras/cras_unified.cc',
789 'audio/cras/cras_unified.h',
796 'platform_list_txt_file': '<(SHARED_INTERMEDIATE_DIR)/ui/ozone/platform_list.txt',
797 'constructor_list_cc_file': '<(INTERMEDIATE_DIR)/media/ozone/constructor_list.cc',
800 # Used for the generated listing header (ui/ozone/platform_list.h)
801 '<(SHARED_INTERMEDIATE_DIR)',
804 '<(constructor_list_cc_file)',
807 '../ui/ozone/ozone.gyp:ozone',
811 # Ozone platform objects are auto-generated using similar
812 # patterns for naming and classes constructors. Here we build the
813 # object MediaOzonePlatform.
814 'action_name': 'generate_constructor_list',
816 'generator_path': '../ui/ozone/generate_constructor_list.py',
820 '<(platform_list_txt_file)',
823 '<(constructor_list_cc_file)',
828 '--platform_list=<(platform_list_txt_file)',
829 '--output_cc=<(constructor_list_cc_file)',
831 '--typename=MediaOzonePlatform',
832 '--include="media/ozone/media_ozone_platform.h"'
838 'ozone/media_ozone_platform.cc',
839 'ozone/media_ozone_platform.h',
844 'audio/cras/audio_manager_cras.cc',
845 'audio/cras/audio_manager_cras.h',
846 'audio/cras/cras_input.cc',
847 'audio/cras/cras_input.h',
848 'audio/cras/cras_unified.cc',
849 'audio/cras/cras_unified.h',
852 ['use_pulseaudio==1', {
854 '<!@(<(pkg-config) --cflags libpulse)',
860 ['linux_link_pulseaudio==0', {
865 'generate_stubs_script': '../tools/generate_stubs/generate_stubs.py',
866 'extra_header': 'audio/pulse/pulse_stub_header.fragment',
867 'sig_files': ['audio/pulse/pulse.sigs'],
868 'outfile_type': 'posix_stubs',
869 'stubs_filename_root': 'pulse_stubs',
870 'project_path': 'media/audio/pulse',
871 'intermediate_dir': '<(INTERMEDIATE_DIR)',
872 'output_root': '<(SHARED_INTERMEDIATE_DIR)/pulse',
879 'action_name': 'generate_stubs',
881 '<(generate_stubs_script)',
886 '<(intermediate_dir)/<(stubs_filename_root).cc',
887 '<(output_root)/<(project_path)/<(stubs_filename_root).h',
890 '<(generate_stubs_script)',
891 '-i', '<(intermediate_dir)',
892 '-o', '<(output_root)/<(project_path)',
893 '-t', '<(outfile_type)',
894 '-e', '<(extra_header)',
895 '-s', '<(stubs_filename_root)',
896 '-p', '<(project_path)',
899 'process_outputs_as_sources': 1,
900 'message': 'Generating Pulse stubs for dynamic loading',
904 # Linux/Solaris need libdl for dlopen() and friends.
905 ['OS=="linux" or OS=="solaris"', {
913 }, { # else: linux_link_pulseaudio==0
916 '<!@(<(pkg-config) --libs-only-L --libs-only-other libpulse)',
919 '<!@(<(pkg-config) --libs-only-l libpulse)',
924 }, { # else: use_pulseaudio==0
926 'audio/pulse/audio_manager_pulse.cc',
927 'audio/pulse/audio_manager_pulse.h',
928 'audio/pulse/pulse_input.cc',
929 'audio/pulse/pulse_input.h',
930 'audio/pulse/pulse_output.cc',
931 'audio/pulse/pulse_output.h',
932 'audio/pulse/pulse_util.cc',
933 'audio/pulse/pulse_util.h',
938 '../third_party/decklink/decklink.gyp:decklink',
942 '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
943 '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
944 '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
945 '$(SDKROOT)/System/Library/Frameworks/CoreMIDI.framework',
946 '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
947 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
948 '$(SDKROOT)/System/Library/Frameworks/QTKit.framework',
961 # Specify delayload for media.dll.
971 # Specify delayload for components that link with media.lib.
972 'all_dependent_settings': {
983 # TODO(wolenetz): Fix size_t to int truncations in win64. See
984 # http://crbug.com/171009
986 ['target_arch=="x64"', {
987 'msvs_disabled_warnings': [ 4267, ],
991 ['proprietary_codecs==1', {
993 'filters/ffmpeg_aac_bitstream_converter.cc',
994 'filters/ffmpeg_aac_bitstream_converter.h',
995 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc',
996 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.h',
997 'filters/h264_to_annex_b_bitstream_converter.cc',
998 'filters/h264_to_annex_b_bitstream_converter.h',
999 'formats/mp2t/es_adapter_video.cc',
1000 'formats/mp2t/es_adapter_video.h',
1001 'formats/mp2t/es_parser.cc',
1002 'formats/mp2t/es_parser.h',
1003 'formats/mp2t/es_parser_adts.cc',
1004 'formats/mp2t/es_parser_adts.h',
1005 'formats/mp2t/es_parser_h264.cc',
1006 'formats/mp2t/es_parser_h264.h',
1007 'formats/mp2t/es_parser_mpeg1audio.cc',
1008 'formats/mp2t/es_parser_mpeg1audio.h',
1009 'formats/mp2t/mp2t_common.h',
1010 'formats/mp2t/mp2t_stream_parser.cc',
1011 'formats/mp2t/mp2t_stream_parser.h',
1012 'formats/mp2t/timestamp_unroller.cc',
1013 'formats/mp2t/timestamp_unroller.h',
1014 'formats/mp2t/ts_packet.cc',
1015 'formats/mp2t/ts_packet.h',
1016 'formats/mp2t/ts_section.h',
1017 'formats/mp2t/ts_section_pat.cc',
1018 'formats/mp2t/ts_section_pat.h',
1019 'formats/mp2t/ts_section_pes.cc',
1020 'formats/mp2t/ts_section_pes.h',
1021 'formats/mp2t/ts_section_pmt.cc',
1022 'formats/mp2t/ts_section_pmt.h',
1023 'formats/mp2t/ts_section_psi.cc',
1024 'formats/mp2t/ts_section_psi.h',
1025 'formats/mp4/aac.cc',
1026 'formats/mp4/aac.h',
1027 'formats/mp4/avc.cc',
1028 'formats/mp4/avc.h',
1029 'formats/mp4/box_definitions.cc',
1030 'formats/mp4/box_definitions.h',
1031 'formats/mp4/box_reader.cc',
1032 'formats/mp4/box_reader.h',
1033 'formats/mp4/cenc.cc',
1034 'formats/mp4/cenc.h',
1035 'formats/mp4/es_descriptor.cc',
1036 'formats/mp4/es_descriptor.h',
1037 'formats/mp4/mp4_stream_parser.cc',
1038 'formats/mp4/mp4_stream_parser.h',
1039 'formats/mp4/sample_to_group_iterator.cc',
1040 'formats/mp4/sample_to_group_iterator.h',
1041 'formats/mp4/track_run_iterator.cc',
1042 'formats/mp4/track_run_iterator.h',
1043 'formats/mpeg/adts_constants.cc',
1044 'formats/mpeg/adts_constants.h',
1045 'formats/mpeg/adts_stream_parser.cc',
1046 'formats/mpeg/adts_stream_parser.h',
1047 'formats/mpeg/mpeg_audio_stream_parser_base.cc',
1048 'formats/mpeg/mpeg_audio_stream_parser_base.h',
1049 'formats/mpeg/mpeg1_audio_stream_parser.cc',
1050 'formats/mpeg/mpeg1_audio_stream_parser.h',
1053 ['target_arch=="ia32" or target_arch=="x64"', {
1059 'base/simd/convert_yuv_to_rgb_x86.cc',
1062 ['OS!="linux" and OS!="win"', {
1064 'base/keyboard_event_counter.cc',
1065 'base/keyboard_event_counter.h',
1068 ['use_low_memory_buffer==1', {
1070 'filters/source_buffer_platform_lowmem.cc',
1071 'filters/source_buffer_platform.h',
1073 }, { # 'use_low_memory_buffer==0'
1075 'filters/source_buffer_platform.cc',
1076 'filters/source_buffer_platform.h',
1080 'target_conditions': [
1081 ['OS == "ios" and _toolset != "host"', {
1083 # Pull in specific Mac files for iOS (which have been filtered out
1084 # by file name rules).
1085 ['include', '^base/mac/coremedia_glue\\.h$'],
1086 ['include', '^base/mac/coremedia_glue\\.mm$'],
1087 ['include', '^base/mac/corevideo_glue\\.h$'],
1088 ['include', '^base/mac/videotoolbox_glue\\.h$'],
1089 ['include', '^base/mac/videotoolbox_glue\\.mm$'],
1090 ['include', '^base/mac/video_frame_mac\\.h$'],
1091 ['include', '^base/mac/video_frame_mac\\.cc$'],
1094 ], # target_conditions
1097 # GN version: //media:media_unittests
1098 'target_name': 'media_unittests',
1099 'type': '<(gtest_target_type)',
1102 'media_test_support',
1103 'shared_memory_support',
1104 '../base/base.gyp:base',
1105 '../base/base.gyp:base_i18n',
1106 '../base/base.gyp:test_support_base',
1107 '../gpu/gpu.gyp:command_buffer_common',
1108 '../skia/skia.gyp:skia',
1109 '../testing/gmock.gyp:gmock',
1110 '../testing/gtest.gyp:gtest',
1111 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
1112 '../ui/gfx/gfx.gyp:gfx',
1113 '../ui/gfx/gfx.gyp:gfx_geometry',
1114 '../ui/gfx/gfx.gyp:gfx_test_support',
1115 '../url/url.gyp:url_lib',
1118 'audio/android/audio_android_unittest.cc',
1119 'audio/alsa/alsa_output_unittest.cc',
1120 'audio/audio_input_controller_unittest.cc',
1121 'audio/audio_input_unittest.cc',
1122 'audio/audio_input_volume_unittest.cc',
1123 'audio/audio_low_latency_input_output_unittest.cc',
1124 'audio/audio_manager_unittest.cc',
1125 'audio/audio_output_controller_unittest.cc',
1126 'audio/audio_output_device_unittest.cc',
1127 'audio/audio_output_proxy_unittest.cc',
1128 'audio/audio_parameters_unittest.cc',
1129 'audio/audio_power_monitor_unittest.cc',
1130 'audio/fake_audio_consumer_unittest.cc',
1131 'audio/mac/audio_auhal_mac_unittest.cc',
1132 'audio/mac/audio_device_listener_mac_unittest.cc',
1133 'audio/mac/audio_low_latency_input_mac_unittest.cc',
1134 'audio/simple_sources_unittest.cc',
1135 'audio/sounds/audio_stream_handler_unittest.cc',
1136 'audio/sounds/sounds_manager_unittest.cc',
1137 'audio/sounds/test_data.cc',
1138 'audio/sounds/test_data.h',
1139 'audio/sounds/wav_audio_handler_unittest.cc',
1140 'audio/virtual_audio_input_stream_unittest.cc',
1141 'audio/virtual_audio_output_stream_unittest.cc',
1142 'audio/win/audio_device_listener_win_unittest.cc',
1143 'audio/win/audio_low_latency_input_win_unittest.cc',
1144 'audio/win/audio_low_latency_output_win_unittest.cc',
1145 'audio/win/audio_output_win_unittest.cc',
1146 'audio/win/core_audio_util_win_unittest.cc',
1147 'base/android/media_codec_bridge_unittest.cc',
1148 'base/android/media_drm_bridge_unittest.cc',
1149 'base/android/media_source_player_unittest.cc',
1150 'base/audio_block_fifo_unittest.cc',
1151 'base/audio_buffer_converter_unittest.cc',
1152 'base/audio_buffer_unittest.cc',
1153 'base/audio_buffer_queue_unittest.cc',
1154 'base/audio_bus_unittest.cc',
1155 'base/audio_converter_unittest.cc',
1156 'base/audio_discard_helper_unittest.cc',
1157 'base/audio_fifo_unittest.cc',
1158 'base/audio_hardware_config_unittest.cc',
1159 'base/audio_hash_unittest.cc',
1160 'base/audio_pull_fifo_unittest.cc',
1161 'base/audio_renderer_mixer_input_unittest.cc',
1162 'base/audio_renderer_mixer_unittest.cc',
1163 'base/audio_shifter_unittest.cc',
1164 'base/audio_splicer_unittest.cc',
1165 'base/audio_timestamp_helper_unittest.cc',
1166 'base/audio_video_metadata_extractor_unittest.cc',
1167 'base/bind_to_current_loop_unittest.cc',
1168 'base/bit_reader_unittest.cc',
1169 'base/callback_holder.h',
1170 'base/callback_holder_unittest.cc',
1171 'base/channel_mixer_unittest.cc',
1172 'base/channel_mixing_matrix_unittest.cc',
1173 'base/container_names_unittest.cc',
1174 'base/data_buffer_unittest.cc',
1175 'base/decoder_buffer_queue_unittest.cc',
1176 'base/decoder_buffer_unittest.cc',
1177 'base/djb2_unittest.cc',
1178 'base/gmock_callback_support_unittest.cc',
1179 'base/key_systems_unittest.cc',
1180 'base/mac/video_frame_mac_unittests.cc',
1181 'base/media_file_checker_unittest.cc',
1182 'base/multi_channel_resampler_unittest.cc',
1183 'base/pipeline_unittest.cc',
1184 'base/ranges_unittest.cc',
1185 'base/run_all_unittests.cc',
1186 'base/scoped_histogram_timer_unittest.cc',
1187 'base/serial_runner_unittest.cc',
1188 'base/seekable_buffer_unittest.cc',
1189 'base/sinc_resampler_unittest.cc',
1190 'base/stream_parser_unittest.cc',
1191 'base/text_ranges_unittest.cc',
1192 'base/text_renderer_unittest.cc',
1193 'base/time_delta_interpolator_unittest.cc',
1194 'base/user_input_monitor_unittest.cc',
1195 'base/vector_math_testing.h',
1196 'base/vector_math_unittest.cc',
1197 'base/video_frame_unittest.cc',
1198 'base/video_frame_pool_unittest.cc',
1199 'base/video_util_unittest.cc',
1200 'base/wall_clock_time_source_unittest.cc',
1201 'base/yuv_convert_unittest.cc',
1202 'cdm/aes_decryptor_unittest.cc',
1203 'cdm/json_web_key_unittest.cc',
1204 'ffmpeg/ffmpeg_common_unittest.cc',
1205 'filters/audio_clock_unittest.cc',
1206 'filters/audio_decoder_unittest.cc',
1207 'filters/audio_decoder_selector_unittest.cc',
1208 'filters/audio_file_reader_unittest.cc',
1209 'filters/audio_renderer_algorithm_unittest.cc',
1210 'filters/audio_renderer_impl_unittest.cc',
1211 'filters/blocking_url_protocol_unittest.cc',
1212 'filters/chunk_demuxer_unittest.cc',
1213 'filters/decrypting_audio_decoder_unittest.cc',
1214 'filters/decrypting_demuxer_stream_unittest.cc',
1215 'filters/decrypting_video_decoder_unittest.cc',
1216 'filters/fake_demuxer_stream.cc',
1217 'filters/fake_demuxer_stream.h',
1218 'filters/fake_demuxer_stream_unittest.cc',
1219 'filters/fake_video_decoder.cc',
1220 'filters/fake_video_decoder.h',
1221 'filters/fake_video_decoder_unittest.cc',
1222 'filters/ffmpeg_demuxer_unittest.cc',
1223 'filters/ffmpeg_glue_unittest.cc',
1224 'filters/ffmpeg_video_decoder_unittest.cc',
1225 'filters/file_data_source_unittest.cc',
1226 'filters/frame_processor_unittest.cc',
1227 'filters/h264_bit_reader_unittest.cc',
1228 'filters/h264_parser_unittest.cc',
1229 'filters/in_memory_url_protocol_unittest.cc',
1230 'filters/jpeg_parser_unittest.cc',
1231 'filters/renderer_impl_unittest.cc',
1232 'filters/skcanvas_video_renderer_unittest.cc',
1233 'filters/source_buffer_stream_unittest.cc',
1234 'filters/video_decoder_selector_unittest.cc',
1235 'filters/video_frame_scheduler_impl_unittest.cc',
1236 'filters/video_frame_scheduler_unittest.cc',
1237 'filters/video_frame_stream_unittest.cc',
1238 'filters/video_renderer_impl_unittest.cc',
1239 'filters/vp8_bool_decoder_unittest.cc',
1240 'filters/vp8_parser_unittest.cc',
1241 'midi/midi_manager_unittest.cc',
1242 'midi/midi_manager_usb_unittest.cc',
1243 'midi/midi_message_queue_unittest.cc',
1244 'midi/midi_message_util_unittest.cc',
1245 'midi/usb_midi_descriptor_parser_unittest.cc',
1246 'midi/usb_midi_input_stream_unittest.cc',
1247 'midi/usb_midi_output_stream_unittest.cc',
1248 'video/capture/fake_video_capture_device_unittest.cc',
1249 'video/capture/video_capture_device_unittest.cc',
1250 'video/h264_poc_unittest.cc',
1251 'formats/common/offset_byte_queue_unittest.cc',
1252 'formats/webm/cluster_builder.cc',
1253 'formats/webm/cluster_builder.h',
1254 'formats/webm/tracks_builder.cc',
1255 'formats/webm/tracks_builder.h',
1256 'formats/webm/webm_cluster_parser_unittest.cc',
1257 'formats/webm/webm_content_encodings_client_unittest.cc',
1258 'formats/webm/webm_parser_unittest.cc',
1259 'formats/webm/webm_tracks_parser_unittest.cc',
1260 'formats/webm/webm_webvtt_parser_unittest.cc',
1261 'test/pipeline_integration_test.cc',
1262 'test/pipeline_integration_test_base.cc',
1265 # Needed by media_drm_bridge.cc.
1266 '<(SHARED_INTERMEDIATE_DIR)',
1274 ['media_use_ffmpeg==1', {
1276 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1278 }, { # media_use_ffmpeg== 0
1280 'base/audio_video_metadata_extractor_unittest.cc',
1281 'base/container_names_unittest.cc',
1282 'base/media_file_checker_unittest.cc',
1283 'ffmpeg/ffmpeg_common_unittest.cc',
1284 'filters/audio_decoder_unittest.cc',
1285 'filters/audio_file_reader_unittest.cc',
1286 'filters/blocking_url_protocol_unittest.cc',
1287 'filters/ffmpeg_aac_bitstream_converter_unittest.cc',
1288 'filters/ffmpeg_demuxer_unittest.cc',
1289 'filters/ffmpeg_glue_unittest.cc',
1290 'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc',
1291 'filters/ffmpeg_video_decoder_unittest.cc',
1292 'filters/in_memory_url_protocol_unittest.cc',
1293 'test/pipeline_integration_test.cc',
1294 'test/pipeline_integration_test_base.cc',
1302 ['use_pulseaudio==1', {
1307 ['os_posix==1 and OS!="mac"', {
1309 ['use_allocator!="none"', {
1311 '../base/allocator/allocator.gyp:allocator',
1318 'audio/audio_input_volume_unittest.cc',
1321 '../testing/android/native_test.gyp:native_test_native_code',
1329 'audio/cras/cras_input_unittest.cc',
1330 'audio/cras/cras_unified_unittest.cc',
1338 ['target_arch != "arm" and chromeos == 1 and use_x11 == 1', {
1340 'filters/h264_bitstream_buffer_unittest.cc',
1345 'audio/alsa/alsa_output_unittest.cc',
1346 'audio/audio_low_latency_input_output_unittest.cc',
1349 ['target_arch=="ia32" or target_arch=="x64"', {
1351 'base/simd/convert_rgb_to_yuv_unittest.cc',
1354 ['proprietary_codecs==1', {
1356 'filters/ffmpeg_aac_bitstream_converter_unittest.cc',
1357 'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc',
1358 'filters/h264_to_annex_b_bitstream_converter_unittest.cc',
1359 'formats/common/stream_parser_test_base.cc',
1360 'formats/common/stream_parser_test_base.h',
1361 'formats/mp2t/es_adapter_video_unittest.cc',
1362 'formats/mp2t/es_parser_adts_unittest.cc',
1363 'formats/mp2t/es_parser_h264_unittest.cc',
1364 'formats/mp2t/es_parser_mpeg1audio_unittest.cc',
1365 'formats/mp2t/es_parser_test_base.cc',
1366 'formats/mp2t/es_parser_test_base.h',
1367 'formats/mp2t/mp2t_stream_parser_unittest.cc',
1368 'formats/mp2t/timestamp_unroller_unittest.cc',
1369 'formats/mp4/aac_unittest.cc',
1370 'formats/mp4/avc_unittest.cc',
1371 'formats/mp4/box_reader_unittest.cc',
1372 'formats/mp4/es_descriptor_unittest.cc',
1373 'formats/mp4/mp4_stream_parser_unittest.cc',
1374 'formats/mp4/sample_to_group_iterator_unittest.cc',
1375 'formats/mp4/track_run_iterator_unittest.cc',
1376 'formats/mpeg/adts_stream_parser_unittest.cc',
1377 'formats/mpeg/mpeg1_audio_stream_parser_unittest.cc',
1380 # TODO(wolenetz): Fix size_t to int truncations in win64. See
1381 # http://crbug.com/171009
1382 ['OS=="win" and target_arch=="x64"', {
1383 'msvs_disabled_warnings': [ 4267, ],
1387 'video/capture/mac/video_capture_device_factory_mac_unittest.mm',
1393 # GN version: //media:media_perftests
1394 'target_name': 'media_perftests',
1395 'type': '<(gtest_target_type)',
1397 '../base/base.gyp:test_support_base',
1398 '../testing/gmock.gyp:gmock',
1399 '../testing/gtest.gyp:gtest',
1400 '../testing/perf/perf_test.gyp:perf_test',
1401 '../ui/gfx/gfx.gyp:gfx',
1402 '../ui/gfx/gfx.gyp:gfx_test_support',
1403 '../ui/gfx/gfx.gyp:gfx_geometry',
1405 'media_test_support',
1406 'shared_memory_support',
1409 'base/audio_bus_perftest.cc',
1410 'base/audio_converter_perftest.cc',
1411 'base/demuxer_perftest.cc',
1412 'base/run_all_perftests.cc',
1413 'base/sinc_resampler_perftest.cc',
1414 'base/vector_math_perftest.cc',
1415 'base/yuv_convert_perftest.cc',
1416 'test/pipeline_integration_perftest.cc',
1417 'test/pipeline_integration_test_base.cc',
1427 '../testing/android/native_test.gyp:native_test_native_code',
1428 '../ui/gl/gl.gyp:gl',
1431 ['media_use_ffmpeg==1', {
1433 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1435 }, { # media_use_ffmpeg==0
1437 'base/demuxer_perftest.cc',
1438 'test/pipeline_integration_perftest.cc',
1439 'test/pipeline_integration_test_base.cc',
1445 # GN versions (it is split apart): //media:test_support,
1446 # //media/base:test_support, and //media/audio:test_support
1447 'target_name': 'media_test_support',
1448 'type': 'static_library',
1451 'shared_memory_support',
1452 '../base/base.gyp:base',
1453 '../skia/skia.gyp:skia',
1454 '../testing/gmock.gyp:gmock',
1455 '../testing/gtest.gyp:gtest',
1458 'audio/mock_audio_manager.cc',
1459 'audio/mock_audio_manager.h',
1460 'audio/mock_audio_source_callback.cc',
1461 'audio/mock_audio_source_callback.h',
1462 'audio/test_audio_input_controller_factory.cc',
1463 'audio/test_audio_input_controller_factory.h',
1464 'base/fake_audio_render_callback.cc',
1465 'base/fake_audio_render_callback.h',
1466 'base/fake_audio_renderer_sink.cc',
1467 'base/fake_audio_renderer_sink.h',
1468 'base/fake_text_track_stream.cc',
1469 'base/fake_text_track_stream.h',
1470 'base/gmock_callback_support.h',
1471 'base/mock_audio_renderer_sink.cc',
1472 'base/mock_audio_renderer_sink.h',
1473 'base/mock_demuxer_host.cc',
1474 'base/mock_demuxer_host.h',
1475 'base/mock_filters.cc',
1476 'base/mock_filters.h',
1477 'base/test_data_util.cc',
1478 'base/test_data_util.h',
1479 'base/test_helpers.cc',
1480 'base/test_helpers.h',
1481 'filters/clockless_video_frame_scheduler.cc',
1482 'filters/clockless_video_frame_scheduler.h',
1483 'filters/mock_gpu_video_accelerator_factories.cc',
1484 'filters/mock_gpu_video_accelerator_factories.h',
1485 'filters/test_video_frame_scheduler.cc',
1486 'filters/test_video_frame_scheduler.h',
1487 'video/mock_video_decode_accelerator.cc',
1488 'video/mock_video_decode_accelerator.h',
1492 # Minimal target for NaCl and other renderer side media clients which
1493 # only need to send audio data across the shared memory to the browser
1495 # GN version: //media:shared_memory_support
1496 'target_name': 'shared_memory_support',
1497 'type': '<(component)',
1499 '../base/base.gyp:base',
1502 'MEDIA_IMPLEMENTATION',
1508 'shared_memory_support.gypi',
1511 '<@(shared_memory_support_sources)',
1523 ['target_arch!="arm"', {
1526 'target_name': 'media_asm',
1527 'type': 'static_library',
1529 'base/simd/convert_rgb_to_yuv_ssse3.asm',
1530 'base/simd/convert_yuv_to_rgb_sse.asm',
1531 'base/simd/convert_yuva_to_argb_mmx.asm',
1532 'base/simd/empty_register_state_mmx.asm',
1533 'base/simd/linear_scale_yuv_to_rgb_mmx.asm',
1534 'base/simd/linear_scale_yuv_to_rgb_sse.asm',
1535 'base/simd/scale_yuv_to_rgb_mmx.asm',
1536 'base/simd/scale_yuv_to_rgb_sse.asm',
1539 ['component=="shared_library"', {
1541 'yasm_flags': ['-DEXPORT_SYMBOLS'],
1544 ['target_arch=="x64"', {
1545 # Source files optimized for X64 systems.
1547 'base/simd/linear_scale_yuv_to_rgb_mmx_x64.asm',
1548 'base/simd/scale_yuv_to_rgb_sse2_x64.asm',
1551 'yasm_flags': ['-DARCH_X86_64'],
1554 ['OS=="mac" or OS=="ios"', {
1562 # XCode doesn't want to link a pure assembly target and will
1563 # fail to link when it creates an empty file list. So add a
1564 # dummy file keep the linker happy. See http://crbug.com/157073
1565 'base/simd/xcode_hack.c',
1568 ['os_posix==1 and OS!="mac"', {
1571 ['target_arch=="ia32"', {
1576 }, { # target_arch=="x64"
1588 'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/media',
1591 # In addition to the same path as source asm, let yasm %include
1592 # search path be relative to src/ per Chromium policy.
1596 '../third_party/x86inc/x86inc.asm',
1597 'base/simd/convert_rgb_to_yuv_ssse3.inc',
1598 'base/simd/convert_yuv_to_rgb_mmx.inc',
1599 'base/simd/convert_yuva_to_argb_mmx.inc',
1600 'base/simd/linear_scale_yuv_to_rgb_mmx.inc',
1601 'base/simd/media_export.asm',
1602 'base/simd/scale_yuv_to_rgb_mmx.inc',
1605 'msvs_2010_disable_uldi_when_referenced': 1,
1607 '../third_party/yasm/yasm_compile.gypi',
1611 'target_name': 'media_sse2',
1612 'type': 'static_library',
1617 'MEDIA_IMPLEMENTATION',
1623 'base/simd/convert_rgb_to_yuv_sse2.cc',
1624 'base/simd/convert_rgb_to_yuv_ssse3.cc',
1625 'base/simd/filter_yuv_sse2.cc',
1633 'target_name': 'player_x11',
1634 'type': 'executable',
1637 'shared_memory_support',
1638 '../base/base.gyp:base',
1639 '../ui/gl/gl.gyp:gl',
1640 '../ui/gfx/gfx.gyp:gfx',
1641 '../ui/gfx/gfx.gyp:gfx_geometry',
1642 '../build/linux/system.gyp:x11',
1643 '../build/linux/system.gyp:xext',
1644 '../build/linux/system.gyp:xrender',
1647 # Linux/Solaris need libdl for dlopen() and friends.
1648 ['OS=="linux" or OS=="solaris"', {
1657 'tools/player_x11/data_source_logger.cc',
1658 'tools/player_x11/data_source_logger.h',
1659 'tools/player_x11/gl_video_renderer.cc',
1660 'tools/player_x11/gl_video_renderer.h',
1661 'tools/player_x11/player_x11.cc',
1662 'tools/player_x11/x11_video_renderer.cc',
1663 'tools/player_x11/x11_video_renderer.h',
1672 'target_name': 'media_unittests_apk',
1679 'test_suite_name': 'media_unittests',
1681 'includes': ['../build/apk_test.gypi'],
1685 'target_name': 'media_perftests_apk',
1692 'test_suite_name': 'media_perftests',
1694 'includes': ['../build/apk_test.gypi'],
1697 # GN: //media/base/android:media_android_jni_headers
1698 'target_name': 'media_android_jni_headers',
1701 'base/android/java/src/org/chromium/media/AudioManagerAndroid.java',
1702 'base/android/java/src/org/chromium/media/AudioRecordInput.java',
1703 'base/android/java/src/org/chromium/media/MediaCodecBridge.java',
1704 'base/android/java/src/org/chromium/media/MediaDrmBridge.java',
1705 'base/android/java/src/org/chromium/media/MediaPlayerBridge.java',
1706 'base/android/java/src/org/chromium/media/MediaPlayerListener.java',
1707 'base/android/java/src/org/chromium/media/UsbMidiDeviceAndroid.java',
1708 'base/android/java/src/org/chromium/media/UsbMidiDeviceFactoryAndroid.java',
1709 'base/android/java/src/org/chromium/media/WebAudioMediaCodecBridge.java',
1712 'jni_gen_package': 'media',
1714 'includes': ['../build/jni_generator.gypi'],
1717 # GN: //media/base/android:video_capture_android_jni_headers
1718 'target_name': 'video_capture_android_jni_headers',
1721 'base/android/java/src/org/chromium/media/VideoCapture.java',
1722 'base/android/java/src/org/chromium/media/VideoCaptureFactory.java',
1725 'jni_gen_package': 'media',
1727 'includes': ['../build/jni_generator.gypi'],
1730 # GN: //media/base/android:android
1731 'target_name': 'player_android',
1732 'type': 'static_library',
1734 'base/android/audio_decoder_job.cc',
1735 'base/android/audio_decoder_job.h',
1736 'base/android/browser_cdm_factory_android.cc',
1737 'base/android/browser_cdm_factory_android.h',
1738 'base/android/demuxer_android.h',
1739 'base/android/demuxer_stream_player_params.cc',
1740 'base/android/demuxer_stream_player_params.h',
1741 'base/android/media_codec_bridge.cc',
1742 'base/android/media_codec_bridge.h',
1743 'base/android/media_common_android.h',
1744 'base/android/media_decoder_job.cc',
1745 'base/android/media_decoder_job.h',
1746 'base/android/media_drm_bridge.cc',
1747 'base/android/media_drm_bridge.h',
1748 'base/android/media_jni_registrar.cc',
1749 'base/android/media_jni_registrar.h',
1750 'base/android/media_player_android.cc',
1751 'base/android/media_player_android.h',
1752 'base/android/media_player_bridge.cc',
1753 'base/android/media_player_bridge.h',
1754 'base/android/media_player_listener.cc',
1755 'base/android/media_player_listener.h',
1756 'base/android/media_player_manager.h',
1757 'base/android/media_resource_getter.cc',
1758 'base/android/media_resource_getter.h',
1759 'base/android/media_source_player.cc',
1760 'base/android/media_source_player.h',
1761 'base/android/media_url_interceptor.h',
1762 'base/android/video_decoder_job.cc',
1763 'base/android/video_decoder_job.h',
1764 'base/android/webaudio_media_codec_bridge.cc',
1765 'base/android/webaudio_media_codec_bridge.h',
1766 'base/android/webaudio_media_codec_info.h',
1769 '../base/base.gyp:base',
1770 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
1771 '../ui/gl/gl.gyp:gl',
1772 '../url/url.gyp:url_lib',
1773 'media_android_jni_headers',
1776 # Needed by media_drm_bridge.cc.
1777 '<(SHARED_INTERMEDIATE_DIR)',
1780 'MEDIA_IMPLEMENTATION',
1784 # GN: //media/base/android:media_java
1785 'target_name': 'media_java',
1788 '../base/base.gyp:base',
1789 'media_android_imageformat',
1791 'export_dependent_settings': [
1792 '../base/base.gyp:base',
1795 'java_in_dir': 'base/android/java',
1797 'includes': ['../build/java.gypi'],
1800 # GN: //media/base/android:media_android_imageformat
1801 'target_name': 'media_android_imageformat',
1804 'source_file': 'video/capture/android/video_capture_device_android.h',
1806 'includes': [ '../build/android/java_cpp_enum.gypi' ],
1810 ['media_use_ffmpeg==1', {
1813 # GN version: //media:ffmpeg_regression_tests
1814 'target_name': 'ffmpeg_regression_tests',
1815 'type': 'executable',
1817 '../base/base.gyp:test_support_base',
1818 '../testing/gmock.gyp:gmock',
1819 '../testing/gtest.gyp:gtest',
1820 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1821 '../ui/gfx/gfx.gyp:gfx_geometry',
1823 'media_test_support',
1826 'base/run_all_unittests.cc',
1827 'ffmpeg/ffmpeg_regression_tests.cc',
1828 'test/pipeline_integration_test_base.cc',
1831 ['os_posix==1 and OS!="mac"', {
1833 ['use_allocator!="none"', {
1835 '../base/allocator/allocator.gyp:allocator',
1847 # Minimal media component for media/cast on iOS.
1848 # GN version: //media:media_for_cast_ios
1849 'target_name': 'media_for_cast_ios',
1850 'type': '<(component)',
1852 '../base/base.gyp:base',
1853 '../ui/gfx/gfx.gyp:gfx_geometry',
1854 'shared_memory_support',
1857 'MEDIA_IMPLEMENTATION',
1858 'MEDIA_FOR_CAST_IOS',
1860 'direct_dependent_settings': {
1869 'base/mac/coremedia_glue.h',
1870 'base/mac/coremedia_glue.mm',
1871 'base/mac/corevideo_glue.h',
1872 'base/mac/videotoolbox_glue.h',
1873 'base/mac/videotoolbox_glue.mm',
1874 'base/mac/video_frame_mac.h',
1875 'base/mac/video_frame_mac.cc',
1876 'base/video_frame.cc',
1877 'base/video_frame.h',
1881 '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
1891 'target_conditions': [
1892 ['OS == "ios" and _toolset != "host"', {
1894 # Pull in specific Mac files for iOS (which have been filtered
1895 # out by file name rules).
1896 ['include', '^base/mac/coremedia_glue\\.h$'],
1897 ['include', '^base/mac/coremedia_glue\\.mm$'],
1898 ['include', '^base/mac/corevideo_glue\\.h$'],
1899 ['include', '^base/mac/videotoolbox_glue\\.h$'],
1900 ['include', '^base/mac/videotoolbox_glue\\.mm$'],
1901 ['include', '^base/mac/video_frame_mac\\.h$'],
1902 ['include', '^base/mac/video_frame_mac\\.cc$'],
1905 ], # target_conditions
1909 ['test_isolation_mode != "noop"', {
1912 'target_name': 'media_unittests_run',
1918 '../build/isolate.gypi',
1921 'media_unittests.isolate',