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 # Enable ALSA and Pulse for runtime selection.
16 ['(OS=="linux" or OS=="freebsd" or OS=="solaris") and (embedded!=1 or (chromecast==1 and target_arch!="arm"))', {
17 # ALSA is always needed for Web MIDI even if the cras is enabled.
30 # low memory buffer is used in non-Android based chromecast build due to hardware limitation.
31 ['chromecast==1 and OS!="android"', {
32 'use_low_memory_buffer%': 1,
34 'use_low_memory_buffer%': 0,
37 # Enable HEVC/H265 demuxing. Actual decoding must be provided by the
39 'enable_hevc_demuxing%': 1,
41 'enable_hevc_demuxing%': 0,
47 'media_variables.gypi',
52 'target_name': 'media',
53 'type': '<(component)',
55 '../base/base.gyp:base',
56 '../base/base.gyp:base_i18n',
57 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
58 '../crypto/crypto.gyp:crypto',
59 '../gpu/gpu.gyp:command_buffer_common',
60 '../skia/skia.gyp:skia',
61 '../third_party/libyuv/libyuv.gyp:libyuv',
62 '../third_party/opus/opus.gyp:opus',
63 '../ui/events/events.gyp:events_base',
64 '../ui/gfx/gfx.gyp:gfx',
65 '../ui/gfx/gfx.gyp:gfx_geometry',
66 '../url/url.gyp:url_lib',
67 'shared_memory_support',
69 'export_dependent_settings': [
70 '../third_party/opus/opus.gyp:opus',
73 'MEDIA_IMPLEMENTATION',
79 'audio/agc_audio_stream.h',
80 'audio/alsa/alsa_input.cc',
81 'audio/alsa/alsa_input.h',
82 'audio/alsa/alsa_output.cc',
83 'audio/alsa/alsa_output.h',
84 'audio/alsa/alsa_util.cc',
85 'audio/alsa/alsa_util.h',
86 'audio/alsa/alsa_wrapper.cc',
87 'audio/alsa/alsa_wrapper.h',
88 'audio/alsa/audio_manager_alsa.cc',
89 'audio/alsa/audio_manager_alsa.h',
90 'audio/android/audio_manager_android.cc',
91 'audio/android/audio_manager_android.h',
92 'audio/android/audio_record_input.cc',
93 'audio/android/audio_record_input.h',
94 'audio/android/opensles_input.cc',
95 'audio/android/opensles_input.h',
96 'audio/android/opensles_output.cc',
97 'audio/android/opensles_output.h',
98 'audio/android/opensles_wrapper.cc',
99 'audio/audio_device_name.cc',
100 'audio/audio_device_name.h',
101 'audio/audio_device_thread.cc',
102 'audio/audio_device_thread.h',
103 'audio/audio_input_controller.cc',
104 'audio/audio_input_controller.h',
105 'audio/audio_input_device.cc',
106 'audio/audio_input_device.h',
107 'audio/audio_input_ipc.cc',
108 'audio/audio_input_ipc.h',
110 'audio/audio_manager.cc',
111 'audio/audio_manager.h',
112 'audio/audio_manager_base.cc',
113 'audio/audio_manager_base.h',
114 'audio/audio_output_controller.cc',
115 'audio/audio_output_controller.h',
116 'audio/audio_output_device.cc',
117 'audio/audio_output_device.h',
118 'audio/audio_output_dispatcher.cc',
119 'audio/audio_output_dispatcher.h',
120 'audio/audio_output_dispatcher_impl.cc',
121 'audio/audio_output_dispatcher_impl.h',
122 'audio/audio_output_ipc.cc',
123 'audio/audio_output_ipc.h',
124 'audio/audio_output_proxy.cc',
125 'audio/audio_output_proxy.h',
126 'audio/audio_output_resampler.cc',
127 'audio/audio_output_resampler.h',
128 'audio/audio_output_stream_sink.cc',
129 'audio/audio_output_stream_sink.h',
130 'audio/audio_power_monitor.cc',
131 'audio/audio_power_monitor.h',
132 'audio/audio_source_diverter.h',
133 'audio/clockless_audio_sink.cc',
134 'audio/clockless_audio_sink.h',
135 'audio/cras/audio_manager_cras.cc',
136 'audio/cras/audio_manager_cras.h',
137 'audio/cras/cras_input.cc',
138 'audio/cras/cras_input.h',
139 'audio/cras/cras_unified.cc',
140 'audio/cras/cras_unified.h',
141 'audio/fake_audio_input_stream.cc',
142 'audio/fake_audio_input_stream.h',
143 'audio/fake_audio_log_factory.cc',
144 'audio/fake_audio_log_factory.h',
145 'audio/fake_audio_manager.cc',
146 'audio/fake_audio_manager.h',
147 'audio/fake_audio_output_stream.cc',
148 'audio/fake_audio_output_stream.h',
149 'audio/fake_audio_worker.cc',
150 'audio/fake_audio_worker.h',
151 'audio/linux/audio_manager_linux.cc',
152 'audio/mac/audio_auhal_mac.cc',
153 'audio/mac/audio_auhal_mac.h',
154 'audio/mac/audio_device_listener_mac.cc',
155 'audio/mac/audio_device_listener_mac.h',
156 'audio/mac/audio_input_mac.cc',
157 'audio/mac/audio_input_mac.h',
158 'audio/mac/audio_low_latency_input_mac.cc',
159 'audio/mac/audio_low_latency_input_mac.h',
160 'audio/mac/audio_manager_mac.cc',
161 'audio/mac/audio_manager_mac.h',
162 'audio/null_audio_sink.cc',
163 'audio/null_audio_sink.h',
164 'audio/openbsd/audio_manager_openbsd.cc',
165 'audio/openbsd/audio_manager_openbsd.h',
166 'audio/pulse/audio_manager_pulse.cc',
167 'audio/pulse/audio_manager_pulse.h',
168 'audio/pulse/pulse_input.cc',
169 'audio/pulse/pulse_input.h',
170 'audio/pulse/pulse_output.cc',
171 'audio/pulse/pulse_output.h',
172 'audio/pulse/pulse_util.cc',
173 'audio/pulse/pulse_util.h',
174 'audio/sample_rates.cc',
175 'audio/sample_rates.h',
176 'audio/scoped_task_runner_observer.cc',
177 'audio/scoped_task_runner_observer.h',
178 'audio/simple_sources.cc',
179 'audio/simple_sources.h',
180 'audio/sounds/audio_stream_handler.cc',
181 'audio/sounds/audio_stream_handler.h',
182 'audio/sounds/sounds_manager.cc',
183 'audio/sounds/sounds_manager.h',
184 'audio/sounds/wav_audio_handler.cc',
185 'audio/sounds/wav_audio_handler.h',
186 'audio/virtual_audio_input_stream.cc',
187 'audio/virtual_audio_input_stream.h',
188 'audio/virtual_audio_output_stream.cc',
189 'audio/virtual_audio_output_stream.h',
190 'audio/win/audio_device_listener_win.cc',
191 'audio/win/audio_device_listener_win.h',
192 'audio/win/audio_low_latency_input_win.cc',
193 'audio/win/audio_low_latency_input_win.h',
194 'audio/win/audio_low_latency_output_win.cc',
195 'audio/win/audio_low_latency_output_win.h',
196 'audio/win/audio_manager_win.cc',
197 'audio/win/audio_manager_win.h',
198 'audio/win/avrt_wrapper_win.cc',
199 'audio/win/avrt_wrapper_win.h',
200 'audio/win/core_audio_util_win.cc',
201 'audio/win/core_audio_util_win.h',
202 'audio/win/device_enumeration_win.cc',
203 'audio/win/device_enumeration_win.h',
204 'audio/win/wavein_input_win.cc',
205 'audio/win/wavein_input_win.h',
206 'audio/win/waveout_output_win.cc',
207 'audio/win/waveout_output_win.h',
208 'base/audio_block_fifo.cc',
209 'base/audio_block_fifo.h',
210 'base/audio_buffer.cc',
211 'base/audio_buffer.h',
212 'base/audio_buffer_converter.cc',
213 'base/audio_buffer_converter.h',
214 'base/audio_buffer_queue.cc',
215 'base/audio_buffer_queue.h',
216 'base/audio_capturer_source.h',
217 'base/audio_converter.cc',
218 'base/audio_converter.h',
219 'base/audio_decoder.cc',
220 'base/audio_decoder.h',
221 'base/audio_decoder_config.cc',
222 'base/audio_decoder_config.h',
223 'base/audio_discard_helper.cc',
224 'base/audio_discard_helper.h',
225 'base/audio_fifo.cc',
227 'base/audio_hardware_config.cc',
228 'base/audio_hardware_config.h',
229 'base/audio_hash.cc',
231 'base/audio_pull_fifo.cc',
232 'base/audio_pull_fifo.h',
233 'base/audio_renderer.cc',
234 'base/audio_renderer.h',
235 'base/audio_renderer_mixer.cc',
236 'base/audio_renderer_mixer.h',
237 'base/audio_renderer_mixer_input.cc',
238 'base/audio_renderer_mixer_input.h',
239 'base/audio_renderer_sink.h',
240 'base/audio_shifter.cc',
241 'base/audio_shifter.h',
242 'base/audio_splicer.cc',
243 'base/audio_splicer.h',
244 'base/audio_timestamp_helper.cc',
245 'base/audio_timestamp_helper.h',
246 'base/audio_video_metadata_extractor.cc',
247 'base/audio_video_metadata_extractor.h',
248 'base/bind_to_current_loop.h',
249 'base/bit_reader.cc',
251 'base/bit_reader_core.cc',
252 'base/bit_reader_core.h',
253 'base/bitstream_buffer.h',
254 'base/buffering_state.h',
255 'base/byte_queue.cc',
257 'base/cdm_callback_promise.cc',
258 'base/cdm_callback_promise.h',
260 'base/cdm_context.cc',
261 'base/cdm_context.h',
262 'base/cdm_factory.cc',
263 'base/cdm_factory.h',
264 'base/cdm_initialized_promise.cc',
265 'base/cdm_initialized_promise.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.cc',
302 'base/key_systems.h',
303 'base/key_systems_support_uma.cc',
304 'base/key_systems_support_uma.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/video_frame_mac.cc',
313 'base/mac/video_frame_mac.h',
314 'base/mac/videotoolbox_glue.h',
315 'base/mac/videotoolbox_glue.mm',
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_permission.cc',
328 'base/media_permission.h',
329 'base/media_switches.cc',
330 'base/media_switches.h',
333 'base/moving_average.cc',
334 'base/moving_average.h',
335 'base/multi_channel_resampler.cc',
336 'base/multi_channel_resampler.h',
337 'base/null_video_sink.cc',
338 'base/null_video_sink.h',
339 'base/output_device.h',
342 'base/pipeline_status.h',
343 'base/player_tracker.cc',
344 'base/player_tracker.h',
349 'base/renderer_factory.cc',
350 'base/renderer_factory.h',
351 'base/sample_format.cc',
352 'base/sample_format.h',
353 'base/seekable_buffer.cc',
354 'base/seekable_buffer.h',
355 'base/serial_runner.cc',
356 'base/serial_runner.h',
357 'base/simd/convert_rgb_to_yuv.h',
358 'base/simd/convert_rgb_to_yuv_c.cc',
359 'base/simd/convert_yuv_to_rgb.h',
360 'base/simd/convert_yuv_to_rgb_c.cc',
361 'base/simd/filter_yuv.h',
362 'base/simd/filter_yuv_c.cc',
363 'base/sinc_resampler.cc',
364 'base/sinc_resampler.h',
365 'base/stream_parser.cc',
366 'base/stream_parser.h',
367 'base/stream_parser_buffer.cc',
368 'base/stream_parser_buffer.h',
371 'base/text_ranges.cc',
372 'base/text_ranges.h',
373 'base/text_renderer.cc',
374 'base/text_renderer.h',
376 'base/text_track_config.cc',
377 'base/text_track_config.h',
378 'base/time_delta_interpolator.cc',
379 'base/time_delta_interpolator.h',
380 'base/time_source.h',
381 'base/timestamp_constants.h',
382 'base/user_input_monitor.cc',
383 'base/user_input_monitor.h',
384 'base/user_input_monitor_linux.cc',
385 'base/user_input_monitor_mac.cc',
386 'base/user_input_monitor_win.cc',
387 'base/video_capture_types.cc',
388 'base/video_capture_types.h',
389 'base/video_capturer_source.cc',
390 'base/video_capturer_source.h',
391 'base/video_decoder.cc',
392 'base/video_decoder.h',
393 'base/video_decoder_config.cc',
394 'base/video_decoder_config.h',
395 'base/video_frame.cc',
396 'base/video_frame.h',
397 'base/video_frame_metadata.cc',
398 'base/video_frame_metadata.h',
399 'base/video_frame_pool.cc',
400 'base/video_frame_pool.h',
401 'base/video_renderer.cc',
402 'base/video_renderer.h',
403 'base/video_rotation.h',
404 'base/video_types.cc',
405 'base/video_types.h',
406 'base/video_util.cc',
408 'base/wall_clock_time_source.cc',
409 'base/wall_clock_time_source.h',
410 'base/win/mf_initializer.cc',
411 'base/win/mf_initializer.h',
412 'base/yuv_convert.cc',
413 'base/yuv_convert.h',
414 'blink/skcanvas_video_renderer.cc',
415 'blink/skcanvas_video_renderer.h',
416 'capture/content/animated_content_sampler.cc',
417 'capture/content/animated_content_sampler.h',
418 'capture/content/capture_resolution_chooser.cc',
419 'capture/content/capture_resolution_chooser.h',
420 'capture/content/feedback_signal_accumulator.cc',
421 'capture/content/feedback_signal_accumulator.h',
422 'capture/content/screen_capture_device_core.cc',
423 'capture/content/screen_capture_device_core.h',
424 'capture/content/thread_safe_capture_oracle.cc',
425 'capture/content/thread_safe_capture_oracle.h',
426 'capture/content/smooth_event_sampler.cc',
427 'capture/content/smooth_event_sampler.h',
428 'capture/content/video_capture_oracle.cc',
429 'capture/content/video_capture_oracle.h',
430 'capture/video/android/video_capture_device_android.cc',
431 'capture/video/android/video_capture_device_android.h',
432 'capture/video/android/video_capture_device_factory_android.cc',
433 'capture/video/android/video_capture_device_factory_android.h',
434 'capture/video/fake_video_capture_device.cc',
435 'capture/video/fake_video_capture_device.h',
436 'capture/video/fake_video_capture_device_factory.cc',
437 'capture/video/fake_video_capture_device_factory.h',
438 'capture/video/file_video_capture_device.cc',
439 'capture/video/file_video_capture_device.h',
440 'capture/video/file_video_capture_device_factory.cc',
441 'capture/video/file_video_capture_device_factory.h',
442 'capture/video/linux/v4l2_capture_delegate.cc',
443 'capture/video/linux/v4l2_capture_delegate.h',
444 'capture/video/linux/v4l2_capture_delegate_multi_plane.cc',
445 'capture/video/linux/v4l2_capture_delegate_multi_plane.h',
446 'capture/video/linux/v4l2_capture_delegate_single_plane.cc',
447 'capture/video/linux/v4l2_capture_delegate_single_plane.h',
448 'capture/video/linux/video_capture_device_chromeos.cc',
449 'capture/video/linux/video_capture_device_chromeos.h',
450 'capture/video/linux/video_capture_device_factory_linux.cc',
451 'capture/video/linux/video_capture_device_factory_linux.h',
452 'capture/video/linux/video_capture_device_linux.cc',
453 'capture/video/linux/video_capture_device_linux.h',
454 'capture/video/mac/platform_video_capturing_mac.h',
455 'capture/video/mac/video_capture_device_avfoundation_mac.h',
456 'capture/video/mac/video_capture_device_avfoundation_mac.mm',
457 'capture/video/mac/video_capture_device_decklink_mac.h',
458 'capture/video/mac/video_capture_device_decklink_mac.mm',
459 'capture/video/mac/video_capture_device_factory_mac.h',
460 'capture/video/mac/video_capture_device_factory_mac.mm',
461 'capture/video/mac/video_capture_device_mac.h',
462 'capture/video/mac/video_capture_device_mac.mm',
463 'capture/video/mac/video_capture_device_qtkit_mac.h',
464 'capture/video/mac/video_capture_device_qtkit_mac.mm',
465 'capture/video/video_capture_device.cc',
466 'capture/video/video_capture_device.h',
467 'capture/video/video_capture_device_factory.cc',
468 'capture/video/video_capture_device_factory.h',
469 'capture/video/video_capture_device_info.cc',
470 'capture/video/video_capture_device_info.h',
471 'capture/video/win/capability_list_win.cc',
472 'capture/video/win/capability_list_win.h',
473 'capture/video/win/filter_base_win.cc',
474 'capture/video/win/filter_base_win.h',
475 'capture/video/win/pin_base_win.cc',
476 'capture/video/win/pin_base_win.h',
477 'capture/video/win/sink_filter_observer_win.h',
478 'capture/video/win/sink_filter_win.cc',
479 'capture/video/win/sink_filter_win.h',
480 'capture/video/win/sink_input_pin_win.cc',
481 'capture/video/win/sink_input_pin_win.h',
482 'capture/video/win/video_capture_device_factory_win.cc',
483 'capture/video/win/video_capture_device_factory_win.h',
484 'capture/video/win/video_capture_device_mf_win.cc',
485 'capture/video/win/video_capture_device_mf_win.h',
486 'capture/video/win/video_capture_device_win.cc',
487 'capture/video/win/video_capture_device_win.h',
488 'capture/webm_muxer.cc',
489 'capture/webm_muxer.h',
490 'cdm/aes_decryptor.cc',
491 'cdm/aes_decryptor.h',
492 'cdm/default_cdm_factory.cc',
493 'cdm/default_cdm_factory.h',
494 'cdm/json_web_key.cc',
495 'cdm/json_web_key.h',
496 'cdm/key_system_names.cc',
497 'cdm/key_system_names.h',
498 'cdm/player_tracker_impl.cc',
499 'cdm/player_tracker_impl.h',
500 'cdm/proxy_decryptor.cc',
501 'cdm/proxy_decryptor.h',
502 'ffmpeg/ffmpeg_common.cc',
503 'ffmpeg/ffmpeg_common.h',
504 'ffmpeg/ffmpeg_deleters.h',
505 'filters/audio_clock.cc',
506 'filters/audio_clock.h',
507 'filters/audio_file_reader.cc',
508 'filters/audio_file_reader.h',
509 'filters/audio_renderer_algorithm.cc',
510 'filters/audio_renderer_algorithm.h',
511 'filters/blocking_url_protocol.cc',
512 'filters/blocking_url_protocol.h',
513 'filters/chunk_demuxer.cc',
514 'filters/chunk_demuxer.h',
515 'filters/context_3d.h',
516 'filters/decoder_selector.cc',
517 'filters/decoder_selector.h',
518 'filters/decoder_stream.cc',
519 'filters/decoder_stream.h',
520 'filters/decoder_stream_traits.cc',
521 'filters/decoder_stream_traits.h',
522 'filters/decrypting_audio_decoder.cc',
523 'filters/decrypting_audio_decoder.h',
524 'filters/decrypting_demuxer_stream.cc',
525 'filters/decrypting_demuxer_stream.h',
526 'filters/decrypting_video_decoder.cc',
527 'filters/decrypting_video_decoder.h',
528 'filters/default_media_permission.cc',
529 'filters/default_media_permission.h',
530 'filters/ffmpeg_audio_decoder.cc',
531 'filters/ffmpeg_audio_decoder.h',
532 'filters/ffmpeg_bitstream_converter.h',
533 'filters/ffmpeg_demuxer.cc',
534 'filters/ffmpeg_demuxer.h',
535 'filters/ffmpeg_glue.cc',
536 'filters/ffmpeg_glue.h',
537 'filters/ffmpeg_video_decoder.cc',
538 'filters/ffmpeg_video_decoder.h',
539 'filters/file_data_source.cc',
540 'filters/file_data_source.h',
541 'filters/frame_processor.cc',
542 'filters/frame_processor.h',
543 'filters/gpu_video_decoder.cc',
544 'filters/gpu_video_decoder.h',
545 'filters/h264_bit_reader.cc',
546 'filters/h264_bit_reader.h',
547 'filters/h264_parser.cc',
548 'filters/h264_parser.h',
549 'filters/ivf_parser.cc',
550 'filters/ivf_parser.h',
551 'filters/in_memory_url_protocol.cc',
552 'filters/in_memory_url_protocol.h',
553 'filters/jpeg_parser.cc',
554 'filters/jpeg_parser.h',
555 'filters/opus_audio_decoder.cc',
556 'filters/opus_audio_decoder.h',
557 'filters/source_buffer_range.cc',
558 'filters/source_buffer_range.h',
559 'filters/source_buffer_stream.cc',
560 'filters/source_buffer_stream.h',
561 'filters/stream_parser_factory.cc',
562 'filters/stream_parser_factory.h',
563 'filters/video_cadence_estimator.cc',
564 'filters/video_cadence_estimator.h',
565 'filters/video_renderer_algorithm.cc',
566 'filters/video_renderer_algorithm.h',
567 'filters/vp8_bool_decoder.cc',
568 'filters/vp8_bool_decoder.h',
569 'filters/vp8_parser.cc',
570 'filters/vp8_parser.h',
571 'filters/vp9_parser.cc',
572 'filters/vp9_parser.h',
573 'filters/vp9_raw_bits_reader.cc',
574 'filters/vp9_raw_bits_reader.h',
575 'filters/vpx_video_decoder.cc',
576 'filters/vpx_video_decoder.h',
577 'filters/webvtt_util.h',
578 'filters/wsola_internals.cc',
579 'filters/wsola_internals.h',
580 'formats/common/offset_byte_queue.cc',
581 'formats/common/offset_byte_queue.h',
582 'formats/webm/webm_audio_client.cc',
583 'formats/webm/webm_audio_client.h',
584 'formats/webm/webm_cluster_parser.cc',
585 'formats/webm/webm_cluster_parser.h',
586 'formats/webm/webm_constants.cc',
587 'formats/webm/webm_constants.h',
588 'formats/webm/webm_content_encodings.cc',
589 'formats/webm/webm_content_encodings.h',
590 'formats/webm/webm_content_encodings_client.cc',
591 'formats/webm/webm_content_encodings_client.h',
592 'formats/webm/webm_crypto_helpers.cc',
593 'formats/webm/webm_crypto_helpers.h',
594 'formats/webm/webm_info_parser.cc',
595 'formats/webm/webm_info_parser.h',
596 'formats/webm/webm_parser.cc',
597 'formats/webm/webm_parser.h',
598 'formats/webm/webm_stream_parser.cc',
599 'formats/webm/webm_stream_parser.h',
600 'formats/webm/webm_tracks_parser.cc',
601 'formats/webm/webm_tracks_parser.h',
602 'formats/webm/webm_video_client.cc',
603 'formats/webm/webm_video_client.h',
604 'formats/webm/webm_webvtt_parser.cc',
605 'ozone/media_ozone_platform.cc',
606 'ozone/media_ozone_platform.h',
607 'renderers/audio_renderer_impl.cc',
608 'renderers/audio_renderer_impl.h',
609 'renderers/default_renderer_factory.cc',
610 'renderers/default_renderer_factory.h',
611 'renderers/gpu_video_accelerator_factories.h',
612 'renderers/renderer_impl.cc',
613 'renderers/renderer_impl.h',
614 'renderers/video_renderer_impl.cc',
615 'renderers/video_renderer_impl.h',
616 'video/fake_video_encode_accelerator.cc',
617 'video/fake_video_encode_accelerator.h',
618 'video/gpu_memory_buffer_video_frame_pool.cc',
619 'video/gpu_memory_buffer_video_frame_pool.h',
622 'video/jpeg_decode_accelerator.cc',
623 'video/jpeg_decode_accelerator.h',
626 'video/video_decode_accelerator.cc',
627 'video/video_decode_accelerator.h',
628 'video/video_encode_accelerator.cc',
629 'video/video_encode_accelerator.h',
630 'formats/webm/webm_webvtt_parser.h'
632 'direct_dependent_settings': {
643 ['media_use_ffmpeg==1', {
645 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
647 }, { # media_use_ffmpeg==0
648 # Exclude the sources that depend on ffmpeg.
650 'base/audio_video_metadata_extractor.cc',
651 'base/audio_video_metadata_extractor.h',
652 'base/container_names.cc',
653 'base/container_names.h',
654 'base/media_file_checker.cc',
655 'base/media_file_checker.h',
656 'ffmpeg/ffmpeg_common.cc',
657 'ffmpeg/ffmpeg_common.h',
658 'filters/audio_file_reader.cc',
659 'filters/audio_file_reader.h',
660 'filters/blocking_url_protocol.cc',
661 'filters/blocking_url_protocol.h',
662 'filters/ffmpeg_aac_bitstream_converter.cc',
663 'filters/ffmpeg_aac_bitstream_converter.h',
664 'filters/ffmpeg_audio_decoder.cc',
665 'filters/ffmpeg_audio_decoder.h',
666 'filters/ffmpeg_bitstream_converter.h',
667 'filters/ffmpeg_demuxer.cc',
668 'filters/ffmpeg_demuxer.h',
669 'filters/ffmpeg_glue.cc',
670 'filters/ffmpeg_glue.h',
671 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc',
672 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.h',
673 'filters/ffmpeg_video_decoder.cc',
674 'filters/ffmpeg_video_decoder.h',
675 'filters/in_memory_url_protocol.cc',
676 'filters/in_memory_url_protocol.h',
679 'MEDIA_DISABLE_FFMPEG',
681 'direct_dependent_settings': {
683 'MEDIA_DISABLE_FFMPEG',
687 ['media_use_libvpx==1', {
689 '<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx',
691 }, { # media_use_libvpx==0
693 'MEDIA_DISABLE_LIBVPX',
695 'direct_dependent_settings': {
697 'MEDIA_DISABLE_LIBVPX',
700 # Exclude the sources that depend on libvpx.
702 'filters/vpx_video_decoder.cc',
703 'filters/vpx_video_decoder.h',
706 ['media_use_libwebm==1', {
708 '<(DEPTH)/third_party/libwebm/libwebm.gyp:libwebm',
710 }, { # media_use_libwebm==0
711 # Exclude the sources that depend on libwebm.
713 'capture/webm_muxer.cc',
714 'capture/webm_muxer.h',
717 ['enable_browser_cdms==1', {
719 'base/browser_cdm.cc',
720 'base/browser_cdm.h',
721 'base/browser_cdm_factory.cc',
722 'base/browser_cdm_factory.h',
727 'media_android_jni_headers',
730 'video_capture_android_jni_headers',
733 'base/audio_video_metadata_extractor.cc',
734 'base/audio_video_metadata_extractor.h',
735 'base/media_file_checker.cc',
736 'base/media_file_checker.h',
737 'filters/ffmpeg_video_decoder.cc',
738 'filters/ffmpeg_video_decoder.h',
741 'DISABLE_USER_INPUT_MONITOR',
744 ['media_use_ffmpeg == 1', {
746 # On Android, FFmpeg is built without video decoders. We only
747 # support hardware video decoding.
748 'ENABLE_MEDIA_PIPELINE_ON_ANDROID',
749 'DISABLE_FFMPEG_VIDEO_DECODERS',
751 'direct_dependent_settings': {
753 'ENABLE_MEDIA_PIPELINE_ON_ANDROID',
754 'DISABLE_FFMPEG_VIDEO_DECODERS',
757 }, { # media_use_ffmpeg == 0
759 'filters/opus_audio_decoder.cc',
760 'filters/opus_audio_decoder.h',
765 # For VaapiVideoEncodeAccelerator.
766 ['target_arch != "arm" and chromeos == 1', {
768 'filters/h264_bitstream_buffer.cc',
769 'filters/h264_bitstream_buffer.h',
783 ['exclude', '(^|/)alsa/'],
784 ['exclude', '_alsa\\.(h|cc)$'],
789 'audio/openbsd/audio_manager_openbsd.cc',
790 'audio/openbsd/audio_manager_openbsd.h',
792 }, { # else: openbsd==1
794 'capture/video/linux/v4l2_capture_delegate_multi_plane.cc',
795 'capture/video/linux/v4l2_capture_delegate_multi_plane.h',
802 '../build/linux/system.gyp:x11',
803 '../build/linux/system.gyp:xdamage',
804 '../build/linux/system.gyp:xext',
805 '../build/linux/system.gyp:xfixes',
806 '../build/linux/system.gyp:xtst',
807 '../ui/gfx/x/gfx_x11.gyp:gfx_x11',
809 }, { # else: use_x11==0
811 'base/user_input_monitor_linux.cc',
814 'DISABLE_USER_INPUT_MONITOR',
819 '../chromeos/chromeos.gyp:chromeos',
822 '<!@(<(pkg-config) --cflags libcras)',
826 '<!@(<(pkg-config) --libs libcras)',
832 }, { # else: use_cras==0
834 'audio/cras/audio_manager_cras.cc',
835 'audio/cras/audio_manager_cras.h',
836 'audio/cras/cras_input.cc',
837 'audio/cras/cras_input.h',
838 'audio/cras/cras_unified.cc',
839 'audio/cras/cras_unified.h',
846 'platform_list_txt_file': '<(SHARED_INTERMEDIATE_DIR)/ui/ozone/platform_list.txt',
847 'constructor_list_cc_file': '<(INTERMEDIATE_DIR)/media/ozone/constructor_list.cc',
850 # Used for the generated listing header (ui/ozone/platform_list.h)
851 '<(SHARED_INTERMEDIATE_DIR)',
854 '<(constructor_list_cc_file)',
857 '../ui/ozone/ozone.gyp:ozone',
861 # Ozone platform objects are auto-generated using similar
862 # patterns for naming and classes constructors. Here we build the
863 # object MediaOzonePlatform.
864 'action_name': 'generate_constructor_list',
866 'generator_path': '../ui/ozone/generate_constructor_list.py',
870 '<(platform_list_txt_file)',
873 '<(constructor_list_cc_file)',
878 '--platform_list=<(platform_list_txt_file)',
879 '--output_cc=<(constructor_list_cc_file)',
881 '--typename=MediaOzonePlatform',
882 '--include="media/ozone/media_ozone_platform.h"'
888 'ozone/media_ozone_platform.cc',
889 'ozone/media_ozone_platform.h',
894 'audio/cras/audio_manager_cras.cc',
895 'audio/cras/audio_manager_cras.h',
896 'audio/cras/cras_input.cc',
897 'audio/cras/cras_input.h',
898 'audio/cras/cras_unified.cc',
899 'audio/cras/cras_unified.h',
902 ['use_pulseaudio==1', {
904 '<!@(<(pkg-config) --cflags libpulse)',
910 ['linux_link_pulseaudio==0', {
915 'generate_stubs_script': '../tools/generate_stubs/generate_stubs.py',
916 'extra_header': 'audio/pulse/pulse_stub_header.fragment',
917 'sig_files': ['audio/pulse/pulse.sigs'],
918 'outfile_type': 'posix_stubs',
919 'stubs_filename_root': 'pulse_stubs',
920 'project_path': 'media/audio/pulse',
921 'intermediate_dir': '<(INTERMEDIATE_DIR)',
922 'output_root': '<(SHARED_INTERMEDIATE_DIR)/pulse',
929 'action_name': 'generate_stubs',
931 '<(generate_stubs_script)',
936 '<(intermediate_dir)/<(stubs_filename_root).cc',
937 '<(output_root)/<(project_path)/<(stubs_filename_root).h',
940 '<(generate_stubs_script)',
941 '-i', '<(intermediate_dir)',
942 '-o', '<(output_root)/<(project_path)',
943 '-t', '<(outfile_type)',
944 '-e', '<(extra_header)',
945 '-s', '<(stubs_filename_root)',
946 '-p', '<(project_path)',
949 'process_outputs_as_sources': 1,
950 'message': 'Generating Pulse stubs for dynamic loading',
954 # Linux/Solaris need libdl for dlopen() and friends.
955 ['OS=="linux" or OS=="solaris"', {
963 }, { # else: linux_link_pulseaudio==0
966 '<!@(<(pkg-config) --libs-only-L --libs-only-other libpulse)',
969 '<!@(<(pkg-config) --libs-only-l libpulse)',
974 }, { # else: use_pulseaudio==0
976 'audio/pulse/audio_manager_pulse.cc',
977 'audio/pulse/audio_manager_pulse.h',
978 'audio/pulse/pulse_input.cc',
979 'audio/pulse/pulse_input.h',
980 'audio/pulse/pulse_output.cc',
981 'audio/pulse/pulse_output.h',
982 'audio/pulse/pulse_util.cc',
983 'audio/pulse/pulse_util.h',
988 '../third_party/decklink/decklink.gyp:decklink',
992 '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
993 '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
994 '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
995 '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
996 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
997 '$(SDKROOT)/System/Library/Frameworks/QTKit.framework',
1006 '-lmfreadwrite.lib',
1010 # Specify delayload for media.dll.
1020 # Specify delayload for components that link with media.lib.
1021 'all_dependent_settings': {
1032 # TODO(wolenetz): Fix size_t to int truncations in win64. See
1033 # http://crbug.com/171009
1035 ['target_arch=="x64"', {
1036 'msvs_disabled_warnings': [ 4267, ],
1040 ['proprietary_codecs==1', {
1042 'cdm/cenc_utils.cc',
1044 'filters/ffmpeg_aac_bitstream_converter.cc',
1045 'filters/ffmpeg_aac_bitstream_converter.h',
1046 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc',
1047 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.h',
1048 'filters/h264_to_annex_b_bitstream_converter.cc',
1049 'filters/h264_to_annex_b_bitstream_converter.h',
1050 'formats/mp2t/es_adapter_video.cc',
1051 'formats/mp2t/es_adapter_video.h',
1052 'formats/mp2t/es_parser.cc',
1053 'formats/mp2t/es_parser.h',
1054 'formats/mp2t/es_parser_adts.cc',
1055 'formats/mp2t/es_parser_adts.h',
1056 'formats/mp2t/es_parser_h264.cc',
1057 'formats/mp2t/es_parser_h264.h',
1058 'formats/mp2t/es_parser_mpeg1audio.cc',
1059 'formats/mp2t/es_parser_mpeg1audio.h',
1060 'formats/mp2t/mp2t_common.h',
1061 'formats/mp2t/mp2t_stream_parser.cc',
1062 'formats/mp2t/mp2t_stream_parser.h',
1063 'formats/mp2t/timestamp_unroller.cc',
1064 'formats/mp2t/timestamp_unroller.h',
1065 'formats/mp2t/ts_packet.cc',
1066 'formats/mp2t/ts_packet.h',
1067 'formats/mp2t/ts_section.h',
1068 'formats/mp2t/ts_section_pat.cc',
1069 'formats/mp2t/ts_section_pat.h',
1070 'formats/mp2t/ts_section_pes.cc',
1071 'formats/mp2t/ts_section_pes.h',
1072 'formats/mp2t/ts_section_pmt.cc',
1073 'formats/mp2t/ts_section_pmt.h',
1074 'formats/mp2t/ts_section_psi.cc',
1075 'formats/mp2t/ts_section_psi.h',
1076 'formats/mp4/aac.cc',
1077 'formats/mp4/aac.h',
1078 'formats/mp4/avc.cc',
1079 'formats/mp4/avc.h',
1080 'formats/mp4/bitstream_converter.cc',
1081 'formats/mp4/bitstream_converter.h',
1082 'formats/mp4/box_definitions.cc',
1083 'formats/mp4/box_definitions.h',
1084 'formats/mp4/box_reader.cc',
1085 'formats/mp4/box_reader.h',
1086 'formats/mp4/cenc.cc',
1087 'formats/mp4/cenc.h',
1088 'formats/mp4/es_descriptor.cc',
1089 'formats/mp4/es_descriptor.h',
1090 'formats/mp4/mp4_stream_parser.cc',
1091 'formats/mp4/mp4_stream_parser.h',
1092 'formats/mp4/sample_to_group_iterator.cc',
1093 'formats/mp4/sample_to_group_iterator.h',
1094 'formats/mp4/track_run_iterator.cc',
1095 'formats/mp4/track_run_iterator.h',
1096 'formats/mpeg/adts_constants.cc',
1097 'formats/mpeg/adts_constants.h',
1098 'formats/mpeg/adts_stream_parser.cc',
1099 'formats/mpeg/adts_stream_parser.h',
1100 'formats/mpeg/mpeg1_audio_stream_parser.cc',
1101 'formats/mpeg/mpeg1_audio_stream_parser.h',
1102 'formats/mpeg/mpeg_audio_stream_parser_base.cc',
1103 'formats/mpeg/mpeg_audio_stream_parser_base.h',
1106 ['proprietary_codecs==1 and enable_hevc_demuxing==1', {
1108 'ENABLE_HEVC_DEMUXING'
1111 'filters/h265_parser.cc',
1112 'filters/h265_parser.h',
1113 'formats/mp4/hevc.cc',
1114 'formats/mp4/hevc.h',
1117 ['proprietary_codecs==1 and enable_hevc_demuxing==1 and media_use_ffmpeg==1', {
1119 'filters/ffmpeg_h265_to_annex_b_bitstream_converter.cc',
1120 'filters/ffmpeg_h265_to_annex_b_bitstream_converter.h',
1123 ['target_arch=="ia32" or target_arch=="x64"', {
1128 'base/simd/convert_rgb_to_yuv_sse2.cc',
1129 'base/simd/convert_rgb_to_yuv_ssse3.cc',
1130 'base/simd/convert_yuv_to_rgb_x86.cc',
1131 'base/simd/filter_yuv_sse2.cc',
1134 ['OS!="linux" and OS!="win"', {
1136 'base/keyboard_event_counter.cc',
1137 'base/keyboard_event_counter.h',
1140 ['use_low_memory_buffer==1', {
1142 'filters/source_buffer_platform.h',
1143 'filters/source_buffer_platform_lowmem.cc',
1145 }, { # 'use_low_memory_buffer==0'
1147 'filters/source_buffer_platform.cc',
1148 'filters/source_buffer_platform.h',
1152 'target_conditions': [
1153 ['OS == "ios" and _toolset != "host"', {
1155 # Pull in specific Mac files for iOS (which have been filtered out
1156 # by file name rules).
1157 ['include', '^base/mac/coremedia_glue\\.h$'],
1158 ['include', '^base/mac/coremedia_glue\\.mm$'],
1159 ['include', '^base/mac/corevideo_glue\\.h$'],
1160 ['include', '^base/mac/videotoolbox_glue\\.h$'],
1161 ['include', '^base/mac/videotoolbox_glue\\.mm$'],
1162 ['include', '^base/mac/video_frame_mac\\.h$'],
1163 ['include', '^base/mac/video_frame_mac\\.cc$'],
1166 ], # target_conditions
1169 # GN version: //media:media_unittests
1170 'target_name': 'media_unittests',
1171 'type': '<(gtest_target_type)',
1173 'audio_test_config',
1175 'media_test_support',
1176 'shared_memory_support',
1177 '../base/base.gyp:base',
1178 '../base/base.gyp:base_i18n',
1179 '../base/base.gyp:test_support_base',
1180 '../gpu/gpu.gyp:command_buffer_common',
1181 '../gpu/gpu.gyp:gpu_unittest_utils',
1182 '../skia/skia.gyp:skia',
1183 '../testing/gmock.gyp:gmock',
1184 '../testing/gtest.gyp:gtest',
1185 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
1186 '../ui/gfx/gfx.gyp:gfx',
1187 '../ui/gfx/gfx.gyp:gfx_geometry',
1188 '../ui/gfx/gfx.gyp:gfx_test_support',
1189 '../url/url.gyp:url_lib',
1192 'base/android/access_unit_queue_unittest.cc',
1193 'base/android/media_codec_bridge_unittest.cc',
1194 'base/android/media_codec_decoder_unittest.cc',
1195 'base/android/media_codec_player_unittest.cc',
1196 'base/android/media_drm_bridge_unittest.cc',
1197 'base/android/media_player_bridge_unittest.cc',
1198 'base/android/media_source_player_unittest.cc',
1199 'base/android/test_data_factory.cc',
1200 'base/android/test_data_factory.h',
1201 'base/android/test_statistics.h',
1202 'base/audio_block_fifo_unittest.cc',
1203 'base/audio_buffer_converter_unittest.cc',
1204 'base/audio_buffer_queue_unittest.cc',
1205 'base/audio_buffer_unittest.cc',
1206 'base/audio_bus_unittest.cc',
1207 'base/audio_converter_unittest.cc',
1208 'base/audio_discard_helper_unittest.cc',
1209 'base/audio_fifo_unittest.cc',
1210 'base/audio_hardware_config_unittest.cc',
1211 'base/audio_hash_unittest.cc',
1212 'base/audio_pull_fifo_unittest.cc',
1213 'base/audio_renderer_mixer_input_unittest.cc',
1214 'base/audio_renderer_mixer_unittest.cc',
1215 'base/audio_shifter_unittest.cc',
1216 'base/audio_splicer_unittest.cc',
1217 'base/audio_timestamp_helper_unittest.cc',
1218 'base/audio_video_metadata_extractor_unittest.cc',
1219 'base/bind_to_current_loop_unittest.cc',
1220 'base/bit_reader_unittest.cc',
1221 'base/callback_holder.h',
1222 'base/callback_holder_unittest.cc',
1223 'base/channel_mixer_unittest.cc',
1224 'base/channel_mixing_matrix_unittest.cc',
1225 'base/container_names_unittest.cc',
1226 'base/data_buffer_unittest.cc',
1227 'base/decoder_buffer_queue_unittest.cc',
1228 'base/decoder_buffer_unittest.cc',
1229 'base/djb2_unittest.cc',
1230 'base/fake_demuxer_stream_unittest.cc',
1231 'base/gmock_callback_support_unittest.cc',
1232 'base/key_systems_unittest.cc',
1233 'base/mac/video_frame_mac_unittests.cc',
1234 'base/media_file_checker_unittest.cc',
1235 'base/mime_util_unittest.cc',
1236 'base/moving_average_unittest.cc',
1237 'base/multi_channel_resampler_unittest.cc',
1238 'base/null_video_sink_unittest.cc',
1239 'base/pipeline_unittest.cc',
1240 'base/ranges_unittest.cc',
1241 'base/run_all_unittests.cc',
1242 'base/seekable_buffer_unittest.cc',
1243 'base/serial_runner_unittest.cc',
1244 'base/sinc_resampler_unittest.cc',
1245 'base/stream_parser_unittest.cc',
1246 'base/text_ranges_unittest.cc',
1247 'base/text_renderer_unittest.cc',
1248 'base/time_delta_interpolator_unittest.cc',
1249 'base/user_input_monitor_unittest.cc',
1250 'base/vector_math_testing.h',
1251 'base/vector_math_unittest.cc',
1252 'base/video_frame_pool_unittest.cc',
1253 'base/video_frame_unittest.cc',
1254 'base/video_util_unittest.cc',
1255 'base/wall_clock_time_source_unittest.cc',
1256 'base/yuv_convert_unittest.cc',
1257 'blink/skcanvas_video_renderer_unittest.cc',
1258 'capture/content/animated_content_sampler_unittest.cc',
1259 'capture/content/capture_resolution_chooser_unittest.cc',
1260 'capture/content/feedback_signal_accumulator_unittest.cc',
1261 'capture/content/smooth_event_sampler_unittest.cc',
1262 'capture/content/video_capture_oracle_unittest.cc',
1263 'capture/video/fake_video_capture_device_unittest.cc',
1264 'capture/video/video_capture_device_unittest.cc',
1265 'cdm/aes_decryptor_unittest.cc',
1266 'cdm/json_web_key_unittest.cc',
1267 'ffmpeg/ffmpeg_common_unittest.cc',
1268 'filters/audio_clock_unittest.cc',
1269 'filters/audio_decoder_selector_unittest.cc',
1270 'filters/audio_decoder_unittest.cc',
1271 'filters/audio_file_reader_unittest.cc',
1272 'filters/audio_renderer_algorithm_unittest.cc',
1273 'filters/blocking_url_protocol_unittest.cc',
1274 'filters/chunk_demuxer_unittest.cc',
1275 'filters/decrypting_audio_decoder_unittest.cc',
1276 'filters/decrypting_demuxer_stream_unittest.cc',
1277 'filters/decrypting_video_decoder_unittest.cc',
1278 'filters/fake_video_decoder.cc',
1279 'filters/fake_video_decoder.h',
1280 'filters/fake_video_decoder_unittest.cc',
1281 'filters/ffmpeg_demuxer_unittest.cc',
1282 'filters/ffmpeg_glue_unittest.cc',
1283 'filters/ffmpeg_video_decoder_unittest.cc',
1284 'filters/file_data_source_unittest.cc',
1285 'filters/frame_processor_unittest.cc',
1286 'filters/h264_bit_reader_unittest.cc',
1287 'filters/h264_parser_unittest.cc',
1288 'filters/in_memory_url_protocol_unittest.cc',
1289 'filters/ivf_parser_unittest.cc',
1290 'filters/jpeg_parser_unittest.cc',
1291 'filters/source_buffer_stream_unittest.cc',
1292 'filters/video_cadence_estimator_unittest.cc',
1293 'filters/video_decoder_selector_unittest.cc',
1294 'filters/video_frame_stream_unittest.cc',
1295 'filters/video_renderer_algorithm_unittest.cc',
1296 'filters/vp8_bool_decoder_unittest.cc',
1297 'filters/vp8_parser_unittest.cc',
1298 'filters/vp9_parser_unittest.cc',
1299 'filters/vp9_raw_bits_reader_unittest.cc',
1300 'capture/webm_muxer_unittest.cc',
1301 'formats/common/offset_byte_queue_unittest.cc',
1302 'formats/webm/cluster_builder.cc',
1303 'formats/webm/cluster_builder.h',
1304 'formats/webm/opus_packet_builder.cc',
1305 'formats/webm/opus_packet_builder.h',
1306 'formats/webm/tracks_builder.cc',
1307 'formats/webm/tracks_builder.h',
1308 'formats/webm/webm_cluster_parser_unittest.cc',
1309 'formats/webm/webm_content_encodings_client_unittest.cc',
1310 'formats/webm/webm_parser_unittest.cc',
1311 'formats/webm/webm_tracks_parser_unittest.cc',
1312 'formats/webm/webm_webvtt_parser_unittest.cc',
1313 'renderers/audio_renderer_impl_unittest.cc',
1314 'renderers/renderer_impl_unittest.cc',
1315 'renderers/video_renderer_impl_unittest.cc',
1316 'test/pipeline_integration_test.cc',
1317 'test/pipeline_integration_test_base.cc',
1318 'video/h264_poc_unittest.cc',
1319 'video/gpu_memory_buffer_video_frame_pool_unittest.cc',
1322 # Needed by media_drm_bridge.cc.
1323 '<(SHARED_INTERMEDIATE_DIR)',
1331 ['proprietary_codecs==1 and enable_hevc_demuxing==1', {
1333 'ENABLE_HEVC_DEMUXING'
1336 'filters/h265_parser_unittest.cc',
1339 ['media_use_ffmpeg==1', {
1341 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1343 }, { # media_use_ffmpeg==0
1345 'ffmpeg/ffmpeg_common_unittest.cc',
1346 'filters/audio_decoder_unittest.cc',
1347 'filters/ffmpeg_aac_bitstream_converter_unittest.cc',
1348 'filters/ffmpeg_demuxer_unittest.cc',
1349 'filters/ffmpeg_glue_unittest.cc',
1350 'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc',
1353 # Even if FFmpeg is enabled on Android we don't want these.
1354 # TODO(watk): Refactor tests that could be made to run on Android.
1355 ['media_use_ffmpeg==0 or OS=="android"', {
1357 'base/audio_video_metadata_extractor_unittest.cc',
1358 'base/container_names_unittest.cc',
1359 'base/media_file_checker_unittest.cc',
1360 'filters/audio_file_reader_unittest.cc',
1361 'filters/blocking_url_protocol_unittest.cc',
1362 'filters/ffmpeg_video_decoder_unittest.cc',
1363 'filters/in_memory_url_protocol_unittest.cc',
1364 'test/pipeline_integration_test.cc',
1365 'test/pipeline_integration_test_base.cc',
1368 ['media_use_libwebm==1', {
1370 '<(DEPTH)/third_party/libwebm/libwebm.gyp:libwebm',
1372 }, { # media_use_libwebm==0
1373 # Exclude the sources that depend on libwebm.
1375 'capture/webm_muxer_unittest.cc',
1379 ['(os_posix==1 and OS!="mac") or (OS=="win" and component!="shared_library" and win_use_allocator_shim==1)', {
1381 ['use_allocator!="none"', {
1383 '../base/allocator/allocator.gyp:allocator',
1390 '../testing/android/native_test.gyp:native_test_native_code',
1394 ['target_arch != "arm" and chromeos == 1 and use_x11 == 1', {
1396 'filters/h264_bitstream_buffer_unittest.cc',
1399 ['target_arch=="ia32" or target_arch=="x64"', {
1401 'base/simd/convert_rgb_to_yuv_unittest.cc',
1404 ['proprietary_codecs==1', {
1406 'cdm/cenc_utils_unittest.cc',
1407 'filters/ffmpeg_aac_bitstream_converter_unittest.cc',
1408 'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc',
1409 'filters/h264_to_annex_b_bitstream_converter_unittest.cc',
1410 'formats/common/stream_parser_test_base.cc',
1411 'formats/common/stream_parser_test_base.h',
1412 'formats/mp2t/es_adapter_video_unittest.cc',
1413 'formats/mp2t/es_parser_adts_unittest.cc',
1414 'formats/mp2t/es_parser_h264_unittest.cc',
1415 'formats/mp2t/es_parser_mpeg1audio_unittest.cc',
1416 'formats/mp2t/es_parser_test_base.cc',
1417 'formats/mp2t/es_parser_test_base.h',
1418 'formats/mp2t/mp2t_stream_parser_unittest.cc',
1419 'formats/mp2t/timestamp_unroller_unittest.cc',
1420 'formats/mp4/aac_unittest.cc',
1421 'formats/mp4/avc_unittest.cc',
1422 'formats/mp4/box_reader_unittest.cc',
1423 'formats/mp4/es_descriptor_unittest.cc',
1424 'formats/mp4/mp4_stream_parser_unittest.cc',
1425 'formats/mp4/sample_to_group_iterator_unittest.cc',
1426 'formats/mp4/track_run_iterator_unittest.cc',
1427 'formats/mpeg/adts_stream_parser_unittest.cc',
1428 'formats/mpeg/mpeg1_audio_stream_parser_unittest.cc',
1433 'capture/video/mac/video_capture_device_factory_mac_unittest.mm',
1438 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
1444 # GN version: //media:media_perftests
1445 'target_name': 'media_perftests',
1446 'type': '<(gtest_target_type)',
1448 '../base/base.gyp:test_support_base',
1449 '../testing/gmock.gyp:gmock',
1450 '../testing/gtest.gyp:gtest',
1451 '../testing/perf/perf_test.gyp:perf_test',
1452 '../ui/gfx/gfx.gyp:gfx',
1453 '../ui/gfx/gfx.gyp:gfx_test_support',
1454 '../ui/gfx/gfx.gyp:gfx_geometry',
1456 'media_test_support',
1457 'shared_memory_support',
1460 'base/audio_bus_perftest.cc',
1461 'base/audio_converter_perftest.cc',
1462 'base/demuxer_perftest.cc',
1463 'base/run_all_perftests.cc',
1464 'base/sinc_resampler_perftest.cc',
1465 'base/vector_math_perftest.cc',
1466 'base/yuv_convert_perftest.cc',
1467 'test/pipeline_integration_perftest.cc',
1468 'test/pipeline_integration_test_base.cc',
1478 '../testing/android/native_test.gyp:native_test_native_code',
1479 '../ui/gl/gl.gyp:gl',
1482 ['media_use_ffmpeg==1', {
1484 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1486 }, { # media_use_ffmpeg==0
1488 'base/demuxer_perftest.cc',
1489 'test/pipeline_integration_perftest.cc',
1490 'test/pipeline_integration_test_base.cc',
1496 # GN version: //media/audio:unittests
1497 # For including the sources and configs in multiple test targets.
1498 'target_name': 'audio_test_config',
1500 'direct_dependent_settings': {
1502 'audio/audio_input_controller_unittest.cc',
1503 'audio/audio_input_unittest.cc',
1504 'audio/audio_manager_factory_unittest.cc',
1505 'audio/audio_manager_unittest.cc',
1506 'audio/audio_output_controller_unittest.cc',
1507 'audio/audio_output_device_unittest.cc',
1508 'audio/audio_output_proxy_unittest.cc',
1509 'audio/audio_parameters_unittest.cc',
1510 'audio/audio_power_monitor_unittest.cc',
1511 'audio/fake_audio_worker_unittest.cc',
1512 'audio/simple_sources_unittest.cc',
1513 'audio/virtual_audio_input_stream_unittest.cc',
1514 'audio/virtual_audio_output_stream_unittest.cc',
1517 # TODO(wolenetz): Fix size_t to int truncations in win64. See
1518 # http://crbug.com/171009
1519 ['OS=="win" and target_arch=="x64"', {
1520 'msvs_disabled_warnings': [ 4267, ],
1524 'audio/android/audio_android_unittest.cc',
1528 'audio/audio_input_volume_unittest.cc',
1533 'audio/mac/audio_auhal_mac_unittest.cc',
1534 'audio/mac/audio_device_listener_mac_unittest.cc',
1535 'audio/mac/audio_low_latency_input_mac_unittest.cc',
1540 'audio/sounds/audio_stream_handler_unittest.cc',
1541 'audio/sounds/sounds_manager_unittest.cc',
1542 'audio/sounds/test_data.cc',
1543 'audio/sounds/test_data.h',
1544 'audio/sounds/wav_audio_handler_unittest.cc',
1549 'audio/win/audio_device_listener_win_unittest.cc',
1550 'audio/win/audio_low_latency_input_win_unittest.cc',
1551 'audio/win/audio_low_latency_output_win_unittest.cc',
1552 'audio/win/audio_output_win_unittest.cc',
1553 'audio/win/core_audio_util_win_unittest.cc',
1558 'audio/alsa/alsa_output_unittest.cc',
1559 'audio/audio_low_latency_input_output_unittest.cc',
1565 ['use_pulseaudio==1', {
1572 'audio/cras/cras_input_unittest.cc',
1573 'audio/cras/cras_unified_unittest.cc',
1583 # GN version: //media:audio_unittests
1584 # For running the subset of media_unittests that might require audio
1585 # hardware separately on GPU bots. media_unittests includes these too.
1586 'target_name': 'audio_unittests',
1587 'type': '<(gtest_target_type)',
1589 'audio_test_config',
1590 'media_test_support',
1591 '../base/base.gyp:test_support_base',
1592 '../testing/gmock.gyp:gmock',
1593 '../testing/gtest.gyp:gtest',
1594 '../ui/gfx/gfx.gyp:gfx_test_support',
1595 '../url/url.gyp:url_lib',
1598 'base/run_all_unittests.cc',
1602 # GN versions (it is split apart): //media:test_support,
1603 # //media/base:test_support, and //media/audio:test_support
1604 'target_name': 'media_test_support',
1605 'type': 'static_library',
1608 'shared_memory_support',
1609 '../base/base.gyp:base',
1610 '../skia/skia.gyp:skia',
1611 '../testing/gmock.gyp:gmock',
1612 '../testing/gtest.gyp:gtest',
1615 'audio/audio_unittest_util.cc',
1616 'audio/audio_unittest_util.h',
1617 'audio/mock_audio_manager.cc',
1618 'audio/mock_audio_manager.h',
1619 'audio/mock_audio_source_callback.cc',
1620 'audio/mock_audio_source_callback.h',
1621 'audio/test_audio_input_controller_factory.cc',
1622 'audio/test_audio_input_controller_factory.h',
1623 'base/fake_audio_render_callback.cc',
1624 'base/fake_audio_render_callback.h',
1625 'base/fake_audio_renderer_sink.cc',
1626 'base/fake_audio_renderer_sink.h',
1627 'base/fake_demuxer_stream.cc',
1628 'base/fake_demuxer_stream.h',
1629 'base/fake_output_device.cc',
1630 'base/fake_output_device.h',
1631 'base/fake_text_track_stream.cc',
1632 'base/fake_text_track_stream.h',
1633 'base/gmock_callback_support.h',
1634 'base/mock_audio_renderer_sink.cc',
1635 'base/mock_audio_renderer_sink.h',
1636 'base/mock_demuxer_host.cc',
1637 'base/mock_demuxer_host.h',
1638 'base/mock_filters.cc',
1639 'base/mock_filters.h',
1640 'base/mock_media_log.cc',
1641 'base/mock_media_log.h',
1642 'base/test_data_util.cc',
1643 'base/test_data_util.h',
1644 'base/test_helpers.cc',
1645 'base/test_helpers.h',
1646 'renderers/mock_gpu_video_accelerator_factories.cc',
1647 'renderers/mock_gpu_video_accelerator_factories.h',
1648 'video/mock_video_decode_accelerator.cc',
1649 'video/mock_video_decode_accelerator.h',
1653 # Minimal target for NaCl and other renderer side media clients which
1654 # only need to send audio data across the shared memory to the browser
1656 # GN version: //media:shared_memory_support
1657 'target_name': 'shared_memory_support',
1658 'type': '<(component)',
1660 '../base/base.gyp:base',
1663 'MEDIA_IMPLEMENTATION',
1669 'shared_memory_support.gypi',
1672 '<@(shared_memory_support_sources)',
1684 ['target_arch=="ia32" or target_arch=="x64"', {
1687 'target_name': 'media_asm',
1688 'type': 'static_library',
1690 'base/simd/convert_rgb_to_yuv_ssse3.asm',
1691 'base/simd/convert_yuv_to_rgb_sse.asm',
1692 'base/simd/convert_yuva_to_argb_mmx.asm',
1693 'base/simd/empty_register_state_mmx.asm',
1694 'base/simd/linear_scale_yuv_to_rgb_mmx.asm',
1695 'base/simd/linear_scale_yuv_to_rgb_sse.asm',
1696 'base/simd/scale_yuv_to_rgb_mmx.asm',
1697 'base/simd/scale_yuv_to_rgb_sse.asm',
1700 ['component=="shared_library"', {
1702 'yasm_flags': ['-DEXPORT_SYMBOLS'],
1705 ['target_arch=="x64"', {
1706 # Source files optimized for X64 systems.
1708 'base/simd/linear_scale_yuv_to_rgb_mmx_x64.asm',
1709 'base/simd/scale_yuv_to_rgb_sse2_x64.asm',
1712 'yasm_flags': ['-DARCH_X86_64'],
1715 ['OS=="mac" or OS=="ios"', {
1723 # XCode doesn't want to link a pure assembly target and will
1724 # fail to link when it creates an empty file list. So add a
1725 # dummy file keep the linker happy. See http://crbug.com/157073
1726 'base/simd/xcode_hack.c',
1729 ['os_posix==1 and OS!="mac"', {
1732 ['target_arch=="ia32"', {
1737 }, { # target_arch=="x64"
1749 'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/media',
1752 # In addition to the same path as source asm, let yasm %include
1753 # search path be relative to src/ per Chromium policy.
1757 '../third_party/x86inc/x86inc.asm',
1758 'base/simd/convert_rgb_to_yuv_ssse3.inc',
1759 'base/simd/convert_yuv_to_rgb_mmx.inc',
1760 'base/simd/convert_yuva_to_argb_mmx.inc',
1761 'base/simd/linear_scale_yuv_to_rgb_mmx.inc',
1762 'base/simd/media_export.asm',
1763 'base/simd/scale_yuv_to_rgb_mmx.inc',
1766 'msvs_2010_disable_uldi_when_referenced': 1,
1768 '../third_party/yasm/yasm_compile.gypi',
1777 'target_name': 'media_unittests_apk',
1784 'test_suite_name': 'media_unittests',
1785 'isolate_file': 'media_unittests.isolate',
1787 'includes': ['../build/apk_test.gypi'],
1791 'target_name': 'media_perftests_apk',
1798 'test_suite_name': 'media_perftests',
1799 'isolate_file': 'media_perftests.isolate',
1801 'includes': ['../build/apk_test.gypi'],
1804 # GN: //media/base/android:media_android_jni_headers
1805 'target_name': 'media_android_jni_headers',
1808 'base/android/java/src/org/chromium/media/AudioManagerAndroid.java',
1809 'base/android/java/src/org/chromium/media/AudioRecordInput.java',
1810 'base/android/java/src/org/chromium/media/MediaCodecBridge.java',
1811 'base/android/java/src/org/chromium/media/MediaDrmBridge.java',
1812 'base/android/java/src/org/chromium/media/MediaPlayerBridge.java',
1813 'base/android/java/src/org/chromium/media/MediaPlayerListener.java',
1814 'base/android/java/src/org/chromium/media/WebAudioMediaCodecBridge.java',
1817 'jni_gen_package': 'media',
1819 'includes': ['../build/jni_generator.gypi'],
1822 # GN: //media/base/android:video_capture_android_jni_headers
1823 'target_name': 'video_capture_android_jni_headers',
1826 'base/android/java/src/org/chromium/media/VideoCapture.java',
1827 'base/android/java/src/org/chromium/media/VideoCaptureFactory.java',
1830 'jni_gen_package': 'media',
1832 'includes': ['../build/jni_generator.gypi'],
1835 # GN: //media/base/android:android
1836 'target_name': 'player_android',
1837 'type': 'static_library',
1839 'base/android/access_unit_queue.cc',
1840 'base/android/access_unit_queue.h',
1841 'base/android/audio_decoder_job.cc',
1842 'base/android/audio_decoder_job.h',
1843 'base/android/browser_cdm_factory_android.cc',
1844 'base/android/browser_cdm_factory_android.h',
1845 'base/android/demuxer_android.h',
1846 'base/android/demuxer_stream_player_params.cc',
1847 'base/android/demuxer_stream_player_params.h',
1848 'base/android/media_client_android.cc',
1849 'base/android/media_client_android.h',
1850 'base/android/media_codec_audio_decoder.cc',
1851 'base/android/media_codec_audio_decoder.h',
1852 'base/android/media_codec_bridge.cc',
1853 'base/android/media_codec_bridge.h',
1854 'base/android/media_codec_decoder.cc',
1855 'base/android/media_codec_decoder.h',
1856 'base/android/media_codec_player.cc',
1857 'base/android/media_codec_player.h',
1858 'base/android/media_codec_video_decoder.cc',
1859 'base/android/media_codec_video_decoder.h',
1860 'base/android/media_common_android.h',
1861 'base/android/media_decoder_job.cc',
1862 'base/android/media_decoder_job.h',
1863 'base/android/media_drm_bridge.cc',
1864 'base/android/media_drm_bridge.h',
1865 'base/android/media_drm_bridge_delegate.cc',
1866 'base/android/media_drm_bridge_delegate.h',
1867 'base/android/media_jni_registrar.cc',
1868 'base/android/media_jni_registrar.h',
1869 'base/android/media_player_android.cc',
1870 'base/android/media_player_android.h',
1871 'base/android/media_player_bridge.cc',
1872 'base/android/media_player_bridge.h',
1873 'base/android/media_player_listener.cc',
1874 'base/android/media_player_listener.h',
1875 'base/android/media_player_manager.h',
1876 'base/android/media_resource_getter.cc',
1877 'base/android/media_resource_getter.h',
1878 'base/android/media_source_player.cc',
1879 'base/android/media_source_player.h',
1880 'base/android/media_url_interceptor.h',
1881 'base/android/video_decoder_job.cc',
1882 'base/android/video_decoder_job.h',
1883 'base/android/webaudio_media_codec_bridge.cc',
1884 'base/android/webaudio_media_codec_bridge.h',
1885 'base/android/webaudio_media_codec_info.h',
1888 '../base/base.gyp:base',
1889 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
1890 '../ui/gl/gl.gyp:gl',
1891 '../url/url.gyp:url_lib',
1892 'media_android_jni_headers',
1895 # Needed by media_drm_bridge.cc.
1896 '<(SHARED_INTERMEDIATE_DIR)',
1899 'MEDIA_IMPLEMENTATION',
1903 # GN: //media/base/android:media_java
1904 'target_name': 'media_java',
1907 '../base/base.gyp:base',
1908 'media_android_captureapitype',
1909 'media_android_imageformat',
1911 'export_dependent_settings': [
1912 '../base/base.gyp:base',
1915 'java_in_dir': 'base/android/java',
1917 'includes': ['../build/java.gypi'],
1920 # GN: //media/base/android:media_android_captureapitype
1921 'target_name': 'media_android_captureapitype',
1924 'source_file': 'capture/video/video_capture_device.h',
1926 'includes': [ '../build/android/java_cpp_enum.gypi' ],
1929 # GN: //media/base/android:media_android_imageformat
1930 'target_name': 'media_android_imageformat',
1933 'source_file': 'capture/video/android/video_capture_device_android.h',
1935 'includes': [ '../build/android/java_cpp_enum.gypi' ],
1939 ['media_use_ffmpeg==1', {
1942 # GN version: //media:ffmpeg_regression_tests
1943 'target_name': 'ffmpeg_regression_tests',
1944 'type': 'executable',
1946 '../base/base.gyp:test_support_base',
1947 '../testing/gmock.gyp:gmock',
1948 '../testing/gtest.gyp:gtest',
1949 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1950 '../ui/gfx/gfx.gyp:gfx_geometry',
1952 'media_test_support',
1955 'base/run_all_unittests.cc',
1956 'ffmpeg/ffmpeg_regression_tests.cc',
1957 'test/pipeline_integration_test_base.cc',
1960 ['os_posix==1 and OS!="mac"', {
1962 ['use_allocator!="none"', {
1964 '../base/allocator/allocator.gyp:allocator',
1976 # Minimal media component for media/cast on iOS.
1977 # GN version: //media:media_for_cast_ios
1978 'target_name': 'media_for_cast_ios',
1979 'type': '<(component)',
1981 '../base/base.gyp:base',
1982 '../gpu/gpu.gyp:command_buffer_common',
1983 '../ui/gfx/gfx.gyp:gfx_geometry',
1984 'shared_memory_support',
1987 'MEDIA_DISABLE_FFMPEG',
1988 'MEDIA_DISABLE_LIBVPX',
1989 'MEDIA_FOR_CAST_IOS',
1990 'MEDIA_IMPLEMENTATION',
1992 'direct_dependent_settings': {
1994 'MEDIA_DISABLE_FFMPEG',
1995 'MEDIA_DISABLE_LIBVPX',
2005 'base/mac/coremedia_glue.h',
2006 'base/mac/coremedia_glue.mm',
2007 'base/mac/corevideo_glue.h',
2008 'base/mac/video_frame_mac.cc',
2009 'base/mac/video_frame_mac.h',
2010 'base/mac/videotoolbox_glue.h',
2011 'base/mac/videotoolbox_glue.mm',
2012 'base/simd/convert_rgb_to_yuv.h',
2013 'base/simd/convert_rgb_to_yuv_c.cc',
2014 'base/simd/convert_yuv_to_rgb.h',
2015 'base/simd/convert_yuv_to_rgb_c.cc',
2016 'base/simd/filter_yuv.h',
2017 'base/simd/filter_yuv_c.cc',
2018 'base/video_frame.cc',
2019 'base/video_frame.h',
2020 'base/video_frame_metadata.cc',
2021 'base/video_frame_metadata.h',
2022 'base/video_types.cc',
2023 'base/video_types.h',
2024 'base/video_util.cc',
2025 'base/video_util.h',
2026 'base/yuv_convert.cc',
2027 'base/yuv_convert.h',
2031 '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
2041 'target_conditions': [
2042 ['OS == "ios" and _toolset != "host"', {
2044 # Pull in specific Mac files for iOS (which have been filtered
2045 # out by file name rules).
2046 ['include', '^base/mac/coremedia_glue\\.h$'],
2047 ['include', '^base/mac/coremedia_glue\\.mm$'],
2048 ['include', '^base/mac/corevideo_glue\\.h$'],
2049 ['include', '^base/mac/videotoolbox_glue\\.h$'],
2050 ['include', '^base/mac/videotoolbox_glue\\.mm$'],
2051 ['include', '^base/mac/video_frame_mac\\.h$'],
2052 ['include', '^base/mac/video_frame_mac\\.cc$'],
2055 ], # target_conditions
2059 ['test_isolation_mode != "noop"', {
2062 'target_name': 'media_unittests_run',
2068 '../build/isolate.gypi',
2071 'media_unittests.isolate',
2075 'target_name': 'audio_unittests_run',
2081 '../build/isolate.gypi',
2084 'audio_unittests.isolate',
2089 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',