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/pulse/audio_manager_pulse.cc',
165 'audio/pulse/audio_manager_pulse.h',
166 'audio/pulse/pulse_input.cc',
167 'audio/pulse/pulse_input.h',
168 'audio/pulse/pulse_output.cc',
169 'audio/pulse/pulse_output.h',
170 'audio/pulse/pulse_util.cc',
171 'audio/pulse/pulse_util.h',
172 'audio/sample_rates.cc',
173 'audio/sample_rates.h',
174 'audio/scoped_task_runner_observer.cc',
175 'audio/scoped_task_runner_observer.h',
176 'audio/simple_sources.cc',
177 'audio/simple_sources.h',
178 'audio/sounds/audio_stream_handler.cc',
179 'audio/sounds/audio_stream_handler.h',
180 'audio/sounds/sounds_manager.cc',
181 'audio/sounds/sounds_manager.h',
182 'audio/sounds/wav_audio_handler.cc',
183 'audio/sounds/wav_audio_handler.h',
184 'audio/virtual_audio_input_stream.cc',
185 'audio/virtual_audio_input_stream.h',
186 'audio/virtual_audio_output_stream.cc',
187 'audio/virtual_audio_output_stream.h',
188 'audio/win/audio_device_listener_win.cc',
189 'audio/win/audio_device_listener_win.h',
190 'audio/win/audio_low_latency_input_win.cc',
191 'audio/win/audio_low_latency_input_win.h',
192 'audio/win/audio_low_latency_output_win.cc',
193 'audio/win/audio_low_latency_output_win.h',
194 'audio/win/audio_manager_win.cc',
195 'audio/win/audio_manager_win.h',
196 'audio/win/avrt_wrapper_win.cc',
197 'audio/win/avrt_wrapper_win.h',
198 'audio/win/core_audio_util_win.cc',
199 'audio/win/core_audio_util_win.h',
200 'audio/win/device_enumeration_win.cc',
201 'audio/win/device_enumeration_win.h',
202 'audio/win/wavein_input_win.cc',
203 'audio/win/wavein_input_win.h',
204 'audio/win/waveout_output_win.cc',
205 'audio/win/waveout_output_win.h',
206 'base/audio_block_fifo.cc',
207 'base/audio_block_fifo.h',
208 'base/audio_buffer.cc',
209 'base/audio_buffer.h',
210 'base/audio_buffer_converter.cc',
211 'base/audio_buffer_converter.h',
212 'base/audio_buffer_queue.cc',
213 'base/audio_buffer_queue.h',
214 'base/audio_capturer_source.h',
215 'base/audio_converter.cc',
216 'base/audio_converter.h',
217 'base/audio_decoder.cc',
218 'base/audio_decoder.h',
219 'base/audio_decoder_config.cc',
220 'base/audio_decoder_config.h',
221 'base/audio_discard_helper.cc',
222 'base/audio_discard_helper.h',
223 'base/audio_fifo.cc',
225 'base/audio_hardware_config.cc',
226 'base/audio_hardware_config.h',
227 'base/audio_hash.cc',
229 'base/audio_pull_fifo.cc',
230 'base/audio_pull_fifo.h',
231 'base/audio_renderer.cc',
232 'base/audio_renderer.h',
233 'base/audio_renderer_mixer.cc',
234 'base/audio_renderer_mixer.h',
235 'base/audio_renderer_mixer_input.cc',
236 'base/audio_renderer_mixer_input.h',
237 'base/audio_renderer_sink.h',
238 'base/audio_shifter.cc',
239 'base/audio_shifter.h',
240 'base/audio_splicer.cc',
241 'base/audio_splicer.h',
242 'base/audio_timestamp_helper.cc',
243 'base/audio_timestamp_helper.h',
244 'base/audio_video_metadata_extractor.cc',
245 'base/audio_video_metadata_extractor.h',
246 'base/bind_to_current_loop.h',
247 'base/bit_reader.cc',
249 'base/bit_reader_core.cc',
250 'base/bit_reader_core.h',
251 'base/bitstream_buffer.h',
252 'base/buffering_state.h',
253 'base/byte_queue.cc',
255 'base/cdm_callback_promise.cc',
256 'base/cdm_callback_promise.h',
258 'base/cdm_context.cc',
259 'base/cdm_context.h',
260 'base/cdm_factory.cc',
261 'base/cdm_factory.h',
262 'base/cdm_initialized_promise.cc',
263 'base/cdm_initialized_promise.h',
264 'base/cdm_key_information.cc',
265 'base/cdm_key_information.h',
266 'base/cdm_promise.cc',
267 'base/cdm_promise.h',
268 'base/cdm_promise_adapter.cc',
269 'base/cdm_promise_adapter.h',
270 'base/channel_mixer.cc',
271 'base/channel_mixer.h',
272 'base/channel_mixing_matrix.cc',
273 'base/channel_mixing_matrix.h',
274 'base/container_names.cc',
275 'base/container_names.h',
276 'base/data_buffer.cc',
277 'base/data_buffer.h',
278 'base/data_source.cc',
279 'base/data_source.h',
280 'base/decoder_buffer.cc',
281 'base/decoder_buffer.h',
282 'base/decoder_buffer_queue.cc',
283 'base/decoder_buffer_queue.h',
284 'base/decrypt_config.cc',
285 'base/decrypt_config.h',
290 'base/demuxer_stream.cc',
291 'base/demuxer_stream.h',
292 'base/demuxer_stream_provider.cc',
293 'base/demuxer_stream_provider.h',
296 'base/eme_constants.h',
297 'base/key_system_info.cc',
298 'base/key_system_info.h',
299 'base/key_systems.cc',
300 'base/key_systems.h',
301 'base/key_systems_support_uma.cc',
302 'base/key_systems_support_uma.h',
303 'base/keyboard_event_counter.cc',
304 'base/keyboard_event_counter.h',
305 'base/mac/avfoundation_glue.h',
306 'base/mac/avfoundation_glue.mm',
307 'base/mac/coremedia_glue.h',
308 'base/mac/coremedia_glue.mm',
309 'base/mac/corevideo_glue.h',
310 'base/mac/video_frame_mac.cc',
311 'base/mac/video_frame_mac.h',
312 'base/mac/videotoolbox_glue.h',
313 'base/mac/videotoolbox_glue.mm',
316 'base/media_client.cc',
317 'base/media_client.h',
318 'base/media_file_checker.cc',
319 'base/media_file_checker.h',
320 'base/media_keys.cc',
324 'base/media_log_event.h',
325 'base/media_permission.cc',
326 'base/media_permission.h',
327 'base/media_switches.cc',
328 'base/media_switches.h',
331 'base/moving_average.cc',
332 'base/moving_average.h',
333 'base/multi_channel_resampler.cc',
334 'base/multi_channel_resampler.h',
335 'base/null_video_sink.cc',
336 'base/null_video_sink.h',
337 'base/output_device.h',
340 'base/pipeline_status.h',
341 'base/player_tracker.cc',
342 'base/player_tracker.h',
347 'base/renderer_factory.cc',
348 'base/renderer_factory.h',
349 'base/sample_format.cc',
350 'base/sample_format.h',
351 'base/seekable_buffer.cc',
352 'base/seekable_buffer.h',
353 'base/serial_runner.cc',
354 'base/serial_runner.h',
355 'base/simd/convert_rgb_to_yuv.h',
356 'base/simd/convert_rgb_to_yuv_c.cc',
357 'base/simd/convert_yuv_to_rgb.h',
358 'base/simd/convert_yuv_to_rgb_c.cc',
359 'base/simd/filter_yuv.h',
360 'base/simd/filter_yuv_c.cc',
361 'base/sinc_resampler.cc',
362 'base/sinc_resampler.h',
363 'base/stream_parser.cc',
364 'base/stream_parser.h',
365 'base/stream_parser_buffer.cc',
366 'base/stream_parser_buffer.h',
369 'base/text_ranges.cc',
370 'base/text_ranges.h',
371 'base/text_renderer.cc',
372 'base/text_renderer.h',
374 'base/text_track_config.cc',
375 'base/text_track_config.h',
376 'base/time_delta_interpolator.cc',
377 'base/time_delta_interpolator.h',
378 'base/time_source.h',
379 'base/timestamp_constants.h',
380 'base/user_input_monitor.cc',
381 'base/user_input_monitor.h',
382 'base/user_input_monitor_linux.cc',
383 'base/user_input_monitor_mac.cc',
384 'base/user_input_monitor_win.cc',
385 'base/video_capture_types.cc',
386 'base/video_capture_types.h',
387 'base/video_capturer_source.cc',
388 'base/video_capturer_source.h',
389 'base/video_decoder.cc',
390 'base/video_decoder.h',
391 'base/video_decoder_config.cc',
392 'base/video_decoder_config.h',
393 'base/video_frame.cc',
394 'base/video_frame.h',
395 'base/video_frame_metadata.cc',
396 'base/video_frame_metadata.h',
397 'base/video_frame_pool.cc',
398 'base/video_frame_pool.h',
399 'base/video_renderer.cc',
400 'base/video_renderer.h',
401 'base/video_rotation.h',
402 'base/video_types.cc',
403 'base/video_types.h',
404 'base/video_util.cc',
406 'base/wall_clock_time_source.cc',
407 'base/wall_clock_time_source.h',
408 'base/win/mf_initializer.cc',
409 'base/win/mf_initializer.h',
410 'base/yuv_convert.cc',
411 'base/yuv_convert.h',
412 'blink/skcanvas_video_renderer.cc',
413 'blink/skcanvas_video_renderer.h',
414 'capture/content/animated_content_sampler.cc',
415 'capture/content/animated_content_sampler.h',
416 'capture/content/capture_resolution_chooser.cc',
417 'capture/content/capture_resolution_chooser.h',
418 'capture/content/feedback_signal_accumulator.cc',
419 'capture/content/feedback_signal_accumulator.h',
420 'capture/content/screen_capture_device_core.cc',
421 'capture/content/screen_capture_device_core.h',
422 'capture/content/thread_safe_capture_oracle.cc',
423 'capture/content/thread_safe_capture_oracle.h',
424 'capture/content/smooth_event_sampler.cc',
425 'capture/content/smooth_event_sampler.h',
426 'capture/content/video_capture_oracle.cc',
427 'capture/content/video_capture_oracle.h',
428 'capture/video/android/video_capture_device_android.cc',
429 'capture/video/android/video_capture_device_android.h',
430 'capture/video/android/video_capture_device_factory_android.cc',
431 'capture/video/android/video_capture_device_factory_android.h',
432 'capture/video/fake_video_capture_device.cc',
433 'capture/video/fake_video_capture_device.h',
434 'capture/video/fake_video_capture_device_factory.cc',
435 'capture/video/fake_video_capture_device_factory.h',
436 'capture/video/file_video_capture_device.cc',
437 'capture/video/file_video_capture_device.h',
438 'capture/video/file_video_capture_device_factory.cc',
439 'capture/video/file_video_capture_device_factory.h',
440 'capture/video/linux/v4l2_capture_delegate.cc',
441 'capture/video/linux/v4l2_capture_delegate.h',
442 'capture/video/linux/v4l2_capture_delegate_multi_plane.cc',
443 'capture/video/linux/v4l2_capture_delegate_multi_plane.h',
444 'capture/video/linux/v4l2_capture_delegate_single_plane.cc',
445 'capture/video/linux/v4l2_capture_delegate_single_plane.h',
446 'capture/video/linux/video_capture_device_chromeos.cc',
447 'capture/video/linux/video_capture_device_chromeos.h',
448 'capture/video/linux/video_capture_device_factory_linux.cc',
449 'capture/video/linux/video_capture_device_factory_linux.h',
450 'capture/video/linux/video_capture_device_linux.cc',
451 'capture/video/linux/video_capture_device_linux.h',
452 'capture/video/mac/platform_video_capturing_mac.h',
453 'capture/video/mac/video_capture_device_avfoundation_mac.h',
454 'capture/video/mac/video_capture_device_avfoundation_mac.mm',
455 'capture/video/mac/video_capture_device_decklink_mac.h',
456 'capture/video/mac/video_capture_device_decklink_mac.mm',
457 'capture/video/mac/video_capture_device_factory_mac.h',
458 'capture/video/mac/video_capture_device_factory_mac.mm',
459 'capture/video/mac/video_capture_device_mac.h',
460 'capture/video/mac/video_capture_device_mac.mm',
461 'capture/video/mac/video_capture_device_qtkit_mac.h',
462 'capture/video/mac/video_capture_device_qtkit_mac.mm',
463 'capture/video/video_capture_device.cc',
464 'capture/video/video_capture_device.h',
465 'capture/video/video_capture_device_factory.cc',
466 'capture/video/video_capture_device_factory.h',
467 'capture/video/video_capture_device_info.cc',
468 'capture/video/video_capture_device_info.h',
469 'capture/video/win/capability_list_win.cc',
470 'capture/video/win/capability_list_win.h',
471 'capture/video/win/filter_base_win.cc',
472 'capture/video/win/filter_base_win.h',
473 'capture/video/win/pin_base_win.cc',
474 'capture/video/win/pin_base_win.h',
475 'capture/video/win/sink_filter_observer_win.h',
476 'capture/video/win/sink_filter_win.cc',
477 'capture/video/win/sink_filter_win.h',
478 'capture/video/win/sink_input_pin_win.cc',
479 'capture/video/win/sink_input_pin_win.h',
480 'capture/video/win/video_capture_device_factory_win.cc',
481 'capture/video/win/video_capture_device_factory_win.h',
482 'capture/video/win/video_capture_device_mf_win.cc',
483 'capture/video/win/video_capture_device_mf_win.h',
484 'capture/video/win/video_capture_device_win.cc',
485 'capture/video/win/video_capture_device_win.h',
486 'cdm/aes_decryptor.cc',
487 'cdm/aes_decryptor.h',
488 'cdm/default_cdm_factory.cc',
489 'cdm/default_cdm_factory.h',
490 'cdm/json_web_key.cc',
491 'cdm/json_web_key.h',
492 'cdm/key_system_names.cc',
493 'cdm/key_system_names.h',
494 'cdm/player_tracker_impl.cc',
495 'cdm/player_tracker_impl.h',
496 'cdm/proxy_decryptor.cc',
497 'cdm/proxy_decryptor.h',
498 'ffmpeg/ffmpeg_common.cc',
499 'ffmpeg/ffmpeg_common.h',
500 'ffmpeg/ffmpeg_deleters.h',
501 'filters/audio_clock.cc',
502 'filters/audio_clock.h',
503 'filters/audio_file_reader.cc',
504 'filters/audio_file_reader.h',
505 'filters/audio_renderer_algorithm.cc',
506 'filters/audio_renderer_algorithm.h',
507 'filters/blocking_url_protocol.cc',
508 'filters/blocking_url_protocol.h',
509 'filters/chunk_demuxer.cc',
510 'filters/chunk_demuxer.h',
511 'filters/context_3d.h',
512 'filters/decoder_selector.cc',
513 'filters/decoder_selector.h',
514 'filters/decoder_stream.cc',
515 'filters/decoder_stream.h',
516 'filters/decoder_stream_traits.cc',
517 'filters/decoder_stream_traits.h',
518 'filters/decrypting_audio_decoder.cc',
519 'filters/decrypting_audio_decoder.h',
520 'filters/decrypting_demuxer_stream.cc',
521 'filters/decrypting_demuxer_stream.h',
522 'filters/decrypting_video_decoder.cc',
523 'filters/decrypting_video_decoder.h',
524 'filters/default_media_permission.cc',
525 'filters/default_media_permission.h',
526 'filters/ffmpeg_audio_decoder.cc',
527 'filters/ffmpeg_audio_decoder.h',
528 'filters/ffmpeg_bitstream_converter.h',
529 'filters/ffmpeg_demuxer.cc',
530 'filters/ffmpeg_demuxer.h',
531 'filters/ffmpeg_glue.cc',
532 'filters/ffmpeg_glue.h',
533 'filters/ffmpeg_video_decoder.cc',
534 'filters/ffmpeg_video_decoder.h',
535 'filters/file_data_source.cc',
536 'filters/file_data_source.h',
537 'filters/frame_processor.cc',
538 'filters/frame_processor.h',
539 'filters/gpu_video_decoder.cc',
540 'filters/gpu_video_decoder.h',
541 'filters/h264_bit_reader.cc',
542 'filters/h264_bit_reader.h',
543 'filters/h264_parser.cc',
544 'filters/h264_parser.h',
545 'filters/ivf_parser.cc',
546 'filters/ivf_parser.h',
547 'filters/in_memory_url_protocol.cc',
548 'filters/in_memory_url_protocol.h',
549 'filters/jpeg_parser.cc',
550 'filters/jpeg_parser.h',
551 'filters/opus_audio_decoder.cc',
552 'filters/opus_audio_decoder.h',
553 'filters/source_buffer_range.cc',
554 'filters/source_buffer_range.h',
555 'filters/source_buffer_stream.cc',
556 'filters/source_buffer_stream.h',
557 'filters/stream_parser_factory.cc',
558 'filters/stream_parser_factory.h',
559 'filters/video_cadence_estimator.cc',
560 'filters/video_cadence_estimator.h',
561 'filters/video_renderer_algorithm.cc',
562 'filters/video_renderer_algorithm.h',
563 'filters/vp8_bool_decoder.cc',
564 'filters/vp8_bool_decoder.h',
565 'filters/vp8_parser.cc',
566 'filters/vp8_parser.h',
567 'filters/vp9_parser.cc',
568 'filters/vp9_parser.h',
569 'filters/vp9_raw_bits_reader.cc',
570 'filters/vp9_raw_bits_reader.h',
571 'filters/vpx_video_decoder.cc',
572 'filters/vpx_video_decoder.h',
573 'filters/webvtt_util.h',
574 'filters/wsola_internals.cc',
575 'filters/wsola_internals.h',
576 'formats/common/offset_byte_queue.cc',
577 'formats/common/offset_byte_queue.h',
578 'formats/webm/webm_audio_client.cc',
579 'formats/webm/webm_audio_client.h',
580 'formats/webm/webm_cluster_parser.cc',
581 'formats/webm/webm_cluster_parser.h',
582 'formats/webm/webm_constants.cc',
583 'formats/webm/webm_constants.h',
584 'formats/webm/webm_content_encodings.cc',
585 'formats/webm/webm_content_encodings.h',
586 'formats/webm/webm_content_encodings_client.cc',
587 'formats/webm/webm_content_encodings_client.h',
588 'formats/webm/webm_crypto_helpers.cc',
589 'formats/webm/webm_crypto_helpers.h',
590 'formats/webm/webm_info_parser.cc',
591 'formats/webm/webm_info_parser.h',
592 'formats/webm/webm_parser.cc',
593 'formats/webm/webm_parser.h',
594 'formats/webm/webm_stream_parser.cc',
595 'formats/webm/webm_stream_parser.h',
596 'formats/webm/webm_tracks_parser.cc',
597 'formats/webm/webm_tracks_parser.h',
598 'formats/webm/webm_video_client.cc',
599 'formats/webm/webm_video_client.h',
600 'formats/webm/webm_webvtt_parser.cc',
601 'ozone/media_ozone_platform.cc',
602 'ozone/media_ozone_platform.h',
603 'renderers/audio_renderer_impl.cc',
604 'renderers/audio_renderer_impl.h',
605 'renderers/default_renderer_factory.cc',
606 'renderers/default_renderer_factory.h',
607 'renderers/gpu_video_accelerator_factories.h',
608 'renderers/renderer_impl.cc',
609 'renderers/renderer_impl.h',
610 'renderers/video_renderer_impl.cc',
611 'renderers/video_renderer_impl.h',
612 'video/fake_video_encode_accelerator.cc',
613 'video/fake_video_encode_accelerator.h',
614 'video/gpu_memory_buffer_video_frame_pool.cc',
615 'video/gpu_memory_buffer_video_frame_pool.h',
618 'video/jpeg_decode_accelerator.cc',
619 'video/jpeg_decode_accelerator.h',
622 'video/video_decode_accelerator.cc',
623 'video/video_decode_accelerator.h',
624 'video/video_encode_accelerator.cc',
625 'video/video_encode_accelerator.h',
626 'formats/webm/webm_webvtt_parser.h'
628 'direct_dependent_settings': {
639 ['media_use_ffmpeg==1', {
641 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
643 }, { # media_use_ffmpeg==0
644 # Exclude the sources that depend on ffmpeg.
646 'base/audio_video_metadata_extractor.cc',
647 'base/audio_video_metadata_extractor.h',
648 'base/container_names.cc',
649 'base/container_names.h',
650 'base/media_file_checker.cc',
651 'base/media_file_checker.h',
652 'ffmpeg/ffmpeg_common.cc',
653 'ffmpeg/ffmpeg_common.h',
654 'filters/audio_file_reader.cc',
655 'filters/audio_file_reader.h',
656 'filters/blocking_url_protocol.cc',
657 'filters/blocking_url_protocol.h',
658 'filters/ffmpeg_aac_bitstream_converter.cc',
659 'filters/ffmpeg_aac_bitstream_converter.h',
660 'filters/ffmpeg_audio_decoder.cc',
661 'filters/ffmpeg_audio_decoder.h',
662 'filters/ffmpeg_bitstream_converter.h',
663 'filters/ffmpeg_demuxer.cc',
664 'filters/ffmpeg_demuxer.h',
665 'filters/ffmpeg_glue.cc',
666 'filters/ffmpeg_glue.h',
667 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc',
668 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.h',
669 'filters/ffmpeg_video_decoder.cc',
670 'filters/ffmpeg_video_decoder.h',
671 'filters/in_memory_url_protocol.cc',
672 'filters/in_memory_url_protocol.h',
675 'MEDIA_DISABLE_FFMPEG',
677 'direct_dependent_settings': {
679 'MEDIA_DISABLE_FFMPEG',
683 ['media_use_libvpx==1', {
685 '<(DEPTH)/third_party/libvpx_new/libvpx.gyp:libvpx_new',
687 }, { # media_use_libvpx==0
689 'MEDIA_DISABLE_LIBVPX',
691 'direct_dependent_settings': {
693 'MEDIA_DISABLE_LIBVPX',
696 # Exclude the sources that depend on libvpx.
698 'filters/vpx_video_decoder.cc',
699 'filters/vpx_video_decoder.h',
702 ['media_use_libwebm==1', {
704 '<(DEPTH)/third_party/libwebm/libwebm.gyp:libwebm',
707 'capture/webm_muxer.cc',
708 'capture/webm_muxer.h',
711 ['enable_browser_cdms==1', {
713 'base/browser_cdm.cc',
714 'base/browser_cdm.h',
715 'base/browser_cdm_factory.cc',
716 'base/browser_cdm_factory.h',
721 'media_android_jni_headers',
724 'video_capture_android_jni_headers',
727 'base/audio_video_metadata_extractor.cc',
728 'base/audio_video_metadata_extractor.h',
729 'base/media_file_checker.cc',
730 'base/media_file_checker.h',
731 'filters/ffmpeg_video_decoder.cc',
732 'filters/ffmpeg_video_decoder.h',
735 'DISABLE_USER_INPUT_MONITOR',
738 ['media_use_ffmpeg == 1', {
740 # On Android, FFmpeg is built without video decoders. We only
741 # support hardware video decoding.
742 'ENABLE_MEDIA_PIPELINE_ON_ANDROID',
743 'DISABLE_FFMPEG_VIDEO_DECODERS',
745 'direct_dependent_settings': {
747 'ENABLE_MEDIA_PIPELINE_ON_ANDROID',
748 'DISABLE_FFMPEG_VIDEO_DECODERS',
751 }, { # media_use_ffmpeg == 0
753 'filters/opus_audio_decoder.cc',
754 'filters/opus_audio_decoder.h',
759 # For VaapiVideoEncodeAccelerator.
760 ['target_arch != "arm" and chromeos == 1', {
762 'filters/h264_bitstream_buffer.cc',
763 'filters/h264_bitstream_buffer.h',
777 ['exclude', '(^|/)alsa/'],
778 ['exclude', '_alsa\\.(h|cc)$'],
783 'capture/video/linux/v4l2_capture_delegate_multi_plane.cc',
784 'capture/video/linux/v4l2_capture_delegate_multi_plane.h',
791 '../build/linux/system.gyp:x11',
792 '../build/linux/system.gyp:xdamage',
793 '../build/linux/system.gyp:xext',
794 '../build/linux/system.gyp:xfixes',
795 '../build/linux/system.gyp:xtst',
796 '../ui/gfx/x/gfx_x11.gyp:gfx_x11',
798 }, { # else: use_x11==0
800 'base/user_input_monitor_linux.cc',
803 'DISABLE_USER_INPUT_MONITOR',
808 '../chromeos/chromeos.gyp:chromeos',
811 '<!@(<(pkg-config) --cflags libcras)',
815 '<!@(<(pkg-config) --libs libcras)',
821 }, { # else: use_cras==0
823 'audio/cras/audio_manager_cras.cc',
824 'audio/cras/audio_manager_cras.h',
825 'audio/cras/cras_input.cc',
826 'audio/cras/cras_input.h',
827 'audio/cras/cras_unified.cc',
828 'audio/cras/cras_unified.h',
835 'platform_list_txt_file': '<(SHARED_INTERMEDIATE_DIR)/ui/ozone/platform_list.txt',
836 'constructor_list_cc_file': '<(INTERMEDIATE_DIR)/media/ozone/constructor_list.cc',
839 # Used for the generated listing header (ui/ozone/platform_list.h)
840 '<(SHARED_INTERMEDIATE_DIR)',
843 '<(constructor_list_cc_file)',
846 '../ui/ozone/ozone.gyp:ozone',
850 # Ozone platform objects are auto-generated using similar
851 # patterns for naming and classes constructors. Here we build the
852 # object MediaOzonePlatform.
853 'action_name': 'generate_constructor_list',
855 'generator_path': '../ui/ozone/generate_constructor_list.py',
859 '<(platform_list_txt_file)',
862 '<(constructor_list_cc_file)',
867 '--platform_list=<(platform_list_txt_file)',
868 '--output_cc=<(constructor_list_cc_file)',
870 '--typename=MediaOzonePlatform',
871 '--include="media/ozone/media_ozone_platform.h"'
877 'ozone/media_ozone_platform.cc',
878 'ozone/media_ozone_platform.h',
883 'audio/cras/audio_manager_cras.cc',
884 'audio/cras/audio_manager_cras.h',
885 'audio/cras/cras_input.cc',
886 'audio/cras/cras_input.h',
887 'audio/cras/cras_unified.cc',
888 'audio/cras/cras_unified.h',
891 ['use_pulseaudio==1', {
893 '<!@(<(pkg-config) --cflags libpulse)',
899 ['linux_link_pulseaudio==0', {
904 'generate_stubs_script': '../tools/generate_stubs/generate_stubs.py',
905 'extra_header': 'audio/pulse/pulse_stub_header.fragment',
906 'sig_files': ['audio/pulse/pulse.sigs'],
907 'outfile_type': 'posix_stubs',
908 'stubs_filename_root': 'pulse_stubs',
909 'project_path': 'media/audio/pulse',
910 'intermediate_dir': '<(INTERMEDIATE_DIR)',
911 'output_root': '<(SHARED_INTERMEDIATE_DIR)/pulse',
918 'action_name': 'generate_stubs',
920 '<(generate_stubs_script)',
925 '<(intermediate_dir)/<(stubs_filename_root).cc',
926 '<(output_root)/<(project_path)/<(stubs_filename_root).h',
929 '<(generate_stubs_script)',
930 '-i', '<(intermediate_dir)',
931 '-o', '<(output_root)/<(project_path)',
932 '-t', '<(outfile_type)',
933 '-e', '<(extra_header)',
934 '-s', '<(stubs_filename_root)',
935 '-p', '<(project_path)',
938 'process_outputs_as_sources': 1,
939 'message': 'Generating Pulse stubs for dynamic loading',
943 # Linux/Solaris need libdl for dlopen() and friends.
944 ['OS=="linux" or OS=="solaris"', {
952 }, { # else: linux_link_pulseaudio==0
955 '<!@(<(pkg-config) --libs-only-L --libs-only-other libpulse)',
958 '<!@(<(pkg-config) --libs-only-l libpulse)',
963 }, { # else: use_pulseaudio==0
965 'audio/pulse/audio_manager_pulse.cc',
966 'audio/pulse/audio_manager_pulse.h',
967 'audio/pulse/pulse_input.cc',
968 'audio/pulse/pulse_input.h',
969 'audio/pulse/pulse_output.cc',
970 'audio/pulse/pulse_output.h',
971 'audio/pulse/pulse_util.cc',
972 'audio/pulse/pulse_util.h',
977 '../third_party/decklink/decklink.gyp:decklink',
981 '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
982 '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
983 '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
984 '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
985 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
986 '$(SDKROOT)/System/Library/Frameworks/QTKit.framework',
999 # Specify delayload for media.dll.
1009 # Specify delayload for components that link with media.lib.
1010 'all_dependent_settings': {
1021 # TODO(wolenetz): Fix size_t to int truncations in win64. See
1022 # http://crbug.com/171009
1024 ['target_arch=="x64"', {
1025 'msvs_disabled_warnings': [ 4267, ],
1029 ['proprietary_codecs==1', {
1031 'cdm/cenc_utils.cc',
1033 'filters/ffmpeg_aac_bitstream_converter.cc',
1034 'filters/ffmpeg_aac_bitstream_converter.h',
1035 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc',
1036 'filters/ffmpeg_h264_to_annex_b_bitstream_converter.h',
1037 'filters/h264_to_annex_b_bitstream_converter.cc',
1038 'filters/h264_to_annex_b_bitstream_converter.h',
1039 'formats/mp2t/es_adapter_video.cc',
1040 'formats/mp2t/es_adapter_video.h',
1041 'formats/mp2t/es_parser.cc',
1042 'formats/mp2t/es_parser.h',
1043 'formats/mp2t/es_parser_adts.cc',
1044 'formats/mp2t/es_parser_adts.h',
1045 'formats/mp2t/es_parser_h264.cc',
1046 'formats/mp2t/es_parser_h264.h',
1047 'formats/mp2t/es_parser_mpeg1audio.cc',
1048 'formats/mp2t/es_parser_mpeg1audio.h',
1049 'formats/mp2t/mp2t_common.h',
1050 'formats/mp2t/mp2t_stream_parser.cc',
1051 'formats/mp2t/mp2t_stream_parser.h',
1052 'formats/mp2t/timestamp_unroller.cc',
1053 'formats/mp2t/timestamp_unroller.h',
1054 'formats/mp2t/ts_packet.cc',
1055 'formats/mp2t/ts_packet.h',
1056 'formats/mp2t/ts_section.h',
1057 'formats/mp2t/ts_section_pat.cc',
1058 'formats/mp2t/ts_section_pat.h',
1059 'formats/mp2t/ts_section_pes.cc',
1060 'formats/mp2t/ts_section_pes.h',
1061 'formats/mp2t/ts_section_pmt.cc',
1062 'formats/mp2t/ts_section_pmt.h',
1063 'formats/mp2t/ts_section_psi.cc',
1064 'formats/mp2t/ts_section_psi.h',
1065 'formats/mp4/aac.cc',
1066 'formats/mp4/aac.h',
1067 'formats/mp4/avc.cc',
1068 'formats/mp4/avc.h',
1069 'formats/mp4/bitstream_converter.cc',
1070 'formats/mp4/bitstream_converter.h',
1071 'formats/mp4/box_definitions.cc',
1072 'formats/mp4/box_definitions.h',
1073 'formats/mp4/box_reader.cc',
1074 'formats/mp4/box_reader.h',
1075 'formats/mp4/cenc.cc',
1076 'formats/mp4/cenc.h',
1077 'formats/mp4/es_descriptor.cc',
1078 'formats/mp4/es_descriptor.h',
1079 'formats/mp4/mp4_stream_parser.cc',
1080 'formats/mp4/mp4_stream_parser.h',
1081 'formats/mp4/sample_to_group_iterator.cc',
1082 'formats/mp4/sample_to_group_iterator.h',
1083 'formats/mp4/track_run_iterator.cc',
1084 'formats/mp4/track_run_iterator.h',
1085 'formats/mpeg/adts_constants.cc',
1086 'formats/mpeg/adts_constants.h',
1087 'formats/mpeg/adts_stream_parser.cc',
1088 'formats/mpeg/adts_stream_parser.h',
1089 'formats/mpeg/mpeg1_audio_stream_parser.cc',
1090 'formats/mpeg/mpeg1_audio_stream_parser.h',
1091 'formats/mpeg/mpeg_audio_stream_parser_base.cc',
1092 'formats/mpeg/mpeg_audio_stream_parser_base.h',
1095 ['proprietary_codecs==1 and enable_hevc_demuxing==1', {
1097 'ENABLE_HEVC_DEMUXING'
1100 'filters/h265_parser.cc',
1101 'filters/h265_parser.h',
1102 'formats/mp4/hevc.cc',
1103 'formats/mp4/hevc.h',
1106 ['proprietary_codecs==1 and enable_hevc_demuxing==1 and media_use_ffmpeg==1', {
1108 'filters/ffmpeg_h265_to_annex_b_bitstream_converter.cc',
1109 'filters/ffmpeg_h265_to_annex_b_bitstream_converter.h',
1112 ['target_arch=="ia32" or target_arch=="x64"', {
1117 'base/simd/convert_rgb_to_yuv_sse2.cc',
1118 'base/simd/convert_rgb_to_yuv_ssse3.cc',
1119 'base/simd/convert_yuv_to_rgb_x86.cc',
1120 'base/simd/filter_yuv_sse2.cc',
1123 ['OS!="linux" and OS!="win"', {
1125 'base/keyboard_event_counter.cc',
1126 'base/keyboard_event_counter.h',
1129 ['use_low_memory_buffer==1', {
1131 'filters/source_buffer_platform.h',
1132 'filters/source_buffer_platform_lowmem.cc',
1134 }, { # 'use_low_memory_buffer==0'
1136 'filters/source_buffer_platform.cc',
1137 'filters/source_buffer_platform.h',
1141 'target_conditions': [
1142 ['OS == "ios" and _toolset != "host"', {
1144 # Pull in specific Mac files for iOS (which have been filtered out
1145 # by file name rules).
1146 ['include', '^base/mac/coremedia_glue\\.h$'],
1147 ['include', '^base/mac/coremedia_glue\\.mm$'],
1148 ['include', '^base/mac/corevideo_glue\\.h$'],
1149 ['include', '^base/mac/videotoolbox_glue\\.h$'],
1150 ['include', '^base/mac/videotoolbox_glue\\.mm$'],
1151 ['include', '^base/mac/video_frame_mac\\.h$'],
1152 ['include', '^base/mac/video_frame_mac\\.cc$'],
1155 ], # target_conditions
1158 # GN version: //media:media_unittests
1159 'target_name': 'media_unittests',
1160 'type': '<(gtest_target_type)',
1162 'audio_test_config',
1164 'media_test_support',
1165 'shared_memory_support',
1166 '../base/base.gyp:base',
1167 '../base/base.gyp:base_i18n',
1168 '../base/base.gyp:test_support_base',
1169 '../gpu/gpu.gyp:command_buffer_common',
1170 '../gpu/gpu.gyp:gpu_unittest_utils',
1171 '../skia/skia.gyp:skia',
1172 '../testing/gmock.gyp:gmock',
1173 '../testing/gtest.gyp:gtest',
1174 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
1175 '../ui/gfx/gfx.gyp:gfx',
1176 '../ui/gfx/gfx.gyp:gfx_geometry',
1177 '../ui/gfx/gfx.gyp:gfx_test_support',
1178 '../url/url.gyp:url_lib',
1181 'base/android/access_unit_queue_unittest.cc',
1182 'base/android/media_codec_bridge_unittest.cc',
1183 'base/android/media_codec_decoder_unittest.cc',
1184 'base/android/media_codec_player_unittest.cc',
1185 'base/android/media_drm_bridge_unittest.cc',
1186 'base/android/media_player_bridge_unittest.cc',
1187 'base/android/media_source_player_unittest.cc',
1188 'base/android/test_data_factory.cc',
1189 'base/android/test_data_factory.h',
1190 'base/android/test_statistics.h',
1191 'base/audio_block_fifo_unittest.cc',
1192 'base/audio_buffer_converter_unittest.cc',
1193 'base/audio_buffer_queue_unittest.cc',
1194 'base/audio_buffer_unittest.cc',
1195 'base/audio_bus_unittest.cc',
1196 'base/audio_converter_unittest.cc',
1197 'base/audio_discard_helper_unittest.cc',
1198 'base/audio_fifo_unittest.cc',
1199 'base/audio_hardware_config_unittest.cc',
1200 'base/audio_hash_unittest.cc',
1201 'base/audio_pull_fifo_unittest.cc',
1202 'base/audio_renderer_mixer_input_unittest.cc',
1203 'base/audio_renderer_mixer_unittest.cc',
1204 'base/audio_shifter_unittest.cc',
1205 'base/audio_splicer_unittest.cc',
1206 'base/audio_timestamp_helper_unittest.cc',
1207 'base/audio_video_metadata_extractor_unittest.cc',
1208 'base/bind_to_current_loop_unittest.cc',
1209 'base/bit_reader_unittest.cc',
1210 'base/callback_holder.h',
1211 'base/callback_holder_unittest.cc',
1212 'base/channel_mixer_unittest.cc',
1213 'base/channel_mixing_matrix_unittest.cc',
1214 'base/container_names_unittest.cc',
1215 'base/data_buffer_unittest.cc',
1216 'base/decoder_buffer_queue_unittest.cc',
1217 'base/decoder_buffer_unittest.cc',
1218 'base/djb2_unittest.cc',
1219 'base/fake_demuxer_stream_unittest.cc',
1220 'base/gmock_callback_support_unittest.cc',
1221 'base/key_systems_unittest.cc',
1222 'base/mac/video_frame_mac_unittests.cc',
1223 'base/media_file_checker_unittest.cc',
1224 'base/mime_util_unittest.cc',
1225 'base/moving_average_unittest.cc',
1226 'base/multi_channel_resampler_unittest.cc',
1227 'base/null_video_sink_unittest.cc',
1228 'base/pipeline_unittest.cc',
1229 'base/ranges_unittest.cc',
1230 'base/run_all_unittests.cc',
1231 'base/seekable_buffer_unittest.cc',
1232 'base/serial_runner_unittest.cc',
1233 'base/sinc_resampler_unittest.cc',
1234 'base/stream_parser_unittest.cc',
1235 'base/text_ranges_unittest.cc',
1236 'base/text_renderer_unittest.cc',
1237 'base/time_delta_interpolator_unittest.cc',
1238 'base/user_input_monitor_unittest.cc',
1239 'base/vector_math_testing.h',
1240 'base/vector_math_unittest.cc',
1241 'base/video_frame_pool_unittest.cc',
1242 'base/video_frame_unittest.cc',
1243 'base/video_util_unittest.cc',
1244 'base/wall_clock_time_source_unittest.cc',
1245 'base/yuv_convert_unittest.cc',
1246 'blink/skcanvas_video_renderer_unittest.cc',
1247 'capture/content/animated_content_sampler_unittest.cc',
1248 'capture/content/capture_resolution_chooser_unittest.cc',
1249 'capture/content/feedback_signal_accumulator_unittest.cc',
1250 'capture/content/smooth_event_sampler_unittest.cc',
1251 'capture/content/video_capture_oracle_unittest.cc',
1252 'capture/video/fake_video_capture_device_unittest.cc',
1253 'capture/video/video_capture_device_unittest.cc',
1254 'cdm/aes_decryptor_unittest.cc',
1255 'cdm/json_web_key_unittest.cc',
1256 'ffmpeg/ffmpeg_common_unittest.cc',
1257 'filters/audio_clock_unittest.cc',
1258 'filters/audio_decoder_selector_unittest.cc',
1259 'filters/audio_decoder_unittest.cc',
1260 'filters/audio_file_reader_unittest.cc',
1261 'filters/audio_renderer_algorithm_unittest.cc',
1262 'filters/blocking_url_protocol_unittest.cc',
1263 'filters/chunk_demuxer_unittest.cc',
1264 'filters/decrypting_audio_decoder_unittest.cc',
1265 'filters/decrypting_demuxer_stream_unittest.cc',
1266 'filters/decrypting_video_decoder_unittest.cc',
1267 'filters/fake_video_decoder.cc',
1268 'filters/fake_video_decoder.h',
1269 'filters/fake_video_decoder_unittest.cc',
1270 'filters/ffmpeg_demuxer_unittest.cc',
1271 'filters/ffmpeg_glue_unittest.cc',
1272 'filters/ffmpeg_video_decoder_unittest.cc',
1273 'filters/file_data_source_unittest.cc',
1274 'filters/frame_processor_unittest.cc',
1275 'filters/h264_bit_reader_unittest.cc',
1276 'filters/h264_parser_unittest.cc',
1277 'filters/in_memory_url_protocol_unittest.cc',
1278 'filters/ivf_parser_unittest.cc',
1279 'filters/jpeg_parser_unittest.cc',
1280 'filters/source_buffer_stream_unittest.cc',
1281 'filters/video_cadence_estimator_unittest.cc',
1282 'filters/video_decoder_selector_unittest.cc',
1283 'filters/video_frame_stream_unittest.cc',
1284 'filters/video_renderer_algorithm_unittest.cc',
1285 'filters/vp8_bool_decoder_unittest.cc',
1286 'filters/vp8_parser_unittest.cc',
1287 'filters/vp9_parser_unittest.cc',
1288 'filters/vp9_raw_bits_reader_unittest.cc',
1289 'formats/common/offset_byte_queue_unittest.cc',
1290 'formats/webm/cluster_builder.cc',
1291 'formats/webm/cluster_builder.h',
1292 'formats/webm/opus_packet_builder.cc',
1293 'formats/webm/opus_packet_builder.h',
1294 'formats/webm/tracks_builder.cc',
1295 'formats/webm/tracks_builder.h',
1296 'formats/webm/webm_cluster_parser_unittest.cc',
1297 'formats/webm/webm_content_encodings_client_unittest.cc',
1298 'formats/webm/webm_parser_unittest.cc',
1299 'formats/webm/webm_tracks_parser_unittest.cc',
1300 'formats/webm/webm_webvtt_parser_unittest.cc',
1301 'renderers/audio_renderer_impl_unittest.cc',
1302 'renderers/renderer_impl_unittest.cc',
1303 'renderers/video_renderer_impl_unittest.cc',
1304 'test/pipeline_integration_test.cc',
1305 'test/pipeline_integration_test_base.cc',
1306 'video/h264_poc_unittest.cc',
1307 'video/gpu_memory_buffer_video_frame_pool_unittest.cc',
1310 # Needed by media_drm_bridge.cc.
1311 '<(SHARED_INTERMEDIATE_DIR)',
1319 ['proprietary_codecs==1 and enable_hevc_demuxing==1', {
1321 'ENABLE_HEVC_DEMUXING'
1324 'filters/h265_parser_unittest.cc',
1327 ['media_use_ffmpeg==1', {
1329 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1331 }, { # media_use_ffmpeg==0
1333 'ffmpeg/ffmpeg_common_unittest.cc',
1334 'filters/audio_decoder_unittest.cc',
1335 'filters/ffmpeg_aac_bitstream_converter_unittest.cc',
1336 'filters/ffmpeg_demuxer_unittest.cc',
1337 'filters/ffmpeg_glue_unittest.cc',
1338 'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc',
1341 # Even if FFmpeg is enabled on Android we don't want these.
1342 # TODO(watk): Refactor tests that could be made to run on Android.
1343 ['media_use_ffmpeg==0 or OS=="android"', {
1345 'base/audio_video_metadata_extractor_unittest.cc',
1346 'base/container_names_unittest.cc',
1347 'base/media_file_checker_unittest.cc',
1348 'filters/audio_file_reader_unittest.cc',
1349 'filters/blocking_url_protocol_unittest.cc',
1350 'filters/ffmpeg_video_decoder_unittest.cc',
1351 'filters/in_memory_url_protocol_unittest.cc',
1352 'test/pipeline_integration_test.cc',
1353 'test/pipeline_integration_test_base.cc',
1356 ['media_use_libwebm==1', {
1358 '<(DEPTH)/third_party/libwebm/libwebm.gyp:libwebm',
1361 'capture/webm_muxer_unittest.cc',
1365 ['(os_posix==1 and OS!="mac") or (OS=="win" and component!="shared_library" and win_use_allocator_shim==1)', {
1367 ['use_allocator!="none"', {
1369 '../base/allocator/allocator.gyp:allocator',
1376 '../testing/android/native_test.gyp:native_test_native_code',
1380 ['target_arch != "arm" and chromeos == 1 and use_x11 == 1', {
1382 'filters/h264_bitstream_buffer_unittest.cc',
1385 ['target_arch=="ia32" or target_arch=="x64"', {
1387 'base/simd/convert_rgb_to_yuv_unittest.cc',
1390 ['proprietary_codecs==1', {
1392 'cdm/cenc_utils_unittest.cc',
1393 'filters/ffmpeg_aac_bitstream_converter_unittest.cc',
1394 'filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc',
1395 'filters/h264_to_annex_b_bitstream_converter_unittest.cc',
1396 'formats/common/stream_parser_test_base.cc',
1397 'formats/common/stream_parser_test_base.h',
1398 'formats/mp2t/es_adapter_video_unittest.cc',
1399 'formats/mp2t/es_parser_adts_unittest.cc',
1400 'formats/mp2t/es_parser_h264_unittest.cc',
1401 'formats/mp2t/es_parser_mpeg1audio_unittest.cc',
1402 'formats/mp2t/es_parser_test_base.cc',
1403 'formats/mp2t/es_parser_test_base.h',
1404 'formats/mp2t/mp2t_stream_parser_unittest.cc',
1405 'formats/mp2t/timestamp_unroller_unittest.cc',
1406 'formats/mp4/aac_unittest.cc',
1407 'formats/mp4/avc_unittest.cc',
1408 'formats/mp4/box_reader_unittest.cc',
1409 'formats/mp4/es_descriptor_unittest.cc',
1410 'formats/mp4/mp4_stream_parser_unittest.cc',
1411 'formats/mp4/sample_to_group_iterator_unittest.cc',
1412 'formats/mp4/track_run_iterator_unittest.cc',
1413 'formats/mpeg/adts_stream_parser_unittest.cc',
1414 'formats/mpeg/mpeg1_audio_stream_parser_unittest.cc',
1419 'capture/video/mac/video_capture_device_factory_mac_unittest.mm',
1424 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
1430 # GN version: //media:media_perftests
1431 'target_name': 'media_perftests',
1432 'type': '<(gtest_target_type)',
1434 '../base/base.gyp:test_support_base',
1435 '../testing/gmock.gyp:gmock',
1436 '../testing/gtest.gyp:gtest',
1437 '../testing/perf/perf_test.gyp:perf_test',
1438 '../ui/gfx/gfx.gyp:gfx',
1439 '../ui/gfx/gfx.gyp:gfx_test_support',
1440 '../ui/gfx/gfx.gyp:gfx_geometry',
1442 'media_test_support',
1443 'shared_memory_support',
1446 'base/audio_bus_perftest.cc',
1447 'base/audio_converter_perftest.cc',
1448 'base/demuxer_perftest.cc',
1449 'base/run_all_perftests.cc',
1450 'base/sinc_resampler_perftest.cc',
1451 'base/vector_math_perftest.cc',
1452 'base/yuv_convert_perftest.cc',
1453 'test/pipeline_integration_perftest.cc',
1454 'test/pipeline_integration_test_base.cc',
1464 '../testing/android/native_test.gyp:native_test_native_code',
1465 '../ui/gl/gl.gyp:gl',
1468 ['media_use_ffmpeg==1', {
1470 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1472 }, { # media_use_ffmpeg==0
1474 'base/demuxer_perftest.cc',
1475 'test/pipeline_integration_perftest.cc',
1476 'test/pipeline_integration_test_base.cc',
1482 # GN version: //media/audio:unittests
1483 # For including the sources and configs in multiple test targets.
1484 'target_name': 'audio_test_config',
1486 'direct_dependent_settings': {
1488 'audio/audio_input_controller_unittest.cc',
1489 'audio/audio_input_unittest.cc',
1490 'audio/audio_manager_factory_unittest.cc',
1491 'audio/audio_manager_unittest.cc',
1492 'audio/audio_output_controller_unittest.cc',
1493 'audio/audio_output_device_unittest.cc',
1494 'audio/audio_output_proxy_unittest.cc',
1495 'audio/audio_parameters_unittest.cc',
1496 'audio/audio_power_monitor_unittest.cc',
1497 'audio/fake_audio_worker_unittest.cc',
1498 'audio/point_unittest.cc',
1499 'audio/simple_sources_unittest.cc',
1500 'audio/virtual_audio_input_stream_unittest.cc',
1501 'audio/virtual_audio_output_stream_unittest.cc',
1504 # TODO(wolenetz): Fix size_t to int truncations in win64. See
1505 # http://crbug.com/171009
1506 ['OS=="win" and target_arch=="x64"', {
1507 'msvs_disabled_warnings': [ 4267, ],
1511 'audio/android/audio_android_unittest.cc',
1515 'audio/audio_input_volume_unittest.cc',
1520 'audio/mac/audio_auhal_mac_unittest.cc',
1521 'audio/mac/audio_device_listener_mac_unittest.cc',
1522 'audio/mac/audio_low_latency_input_mac_unittest.cc',
1527 'audio/sounds/audio_stream_handler_unittest.cc',
1528 'audio/sounds/sounds_manager_unittest.cc',
1529 'audio/sounds/test_data.cc',
1530 'audio/sounds/test_data.h',
1531 'audio/sounds/wav_audio_handler_unittest.cc',
1536 'audio/win/audio_device_listener_win_unittest.cc',
1537 'audio/win/audio_low_latency_input_win_unittest.cc',
1538 'audio/win/audio_low_latency_output_win_unittest.cc',
1539 'audio/win/audio_output_win_unittest.cc',
1540 'audio/win/core_audio_util_win_unittest.cc',
1545 'audio/alsa/alsa_output_unittest.cc',
1546 'audio/audio_low_latency_input_output_unittest.cc',
1552 ['use_pulseaudio==1', {
1559 'audio/cras/cras_input_unittest.cc',
1560 'audio/cras/cras_unified_unittest.cc',
1570 # GN version: //media:audio_unittests
1571 # For running the subset of media_unittests that might require audio
1572 # hardware separately on GPU bots. media_unittests includes these too.
1573 'target_name': 'audio_unittests',
1574 'type': '<(gtest_target_type)',
1576 'audio_test_config',
1577 'media_test_support',
1578 '../base/base.gyp:test_support_base',
1579 '../testing/gmock.gyp:gmock',
1580 '../testing/gtest.gyp:gtest',
1581 '../ui/gfx/gfx.gyp:gfx_test_support',
1582 '../url/url.gyp:url_lib',
1585 'base/run_all_unittests.cc',
1589 # GN versions (it is split apart): //media:test_support,
1590 # //media/base:test_support, and //media/audio:test_support
1591 'target_name': 'media_test_support',
1592 'type': 'static_library',
1595 'shared_memory_support',
1596 '../base/base.gyp:base',
1597 '../skia/skia.gyp:skia',
1598 '../testing/gmock.gyp:gmock',
1599 '../testing/gtest.gyp:gtest',
1602 'audio/audio_unittest_util.cc',
1603 'audio/audio_unittest_util.h',
1604 'audio/mock_audio_manager.cc',
1605 'audio/mock_audio_manager.h',
1606 'audio/mock_audio_source_callback.cc',
1607 'audio/mock_audio_source_callback.h',
1608 'audio/test_audio_input_controller_factory.cc',
1609 'audio/test_audio_input_controller_factory.h',
1610 'base/fake_audio_render_callback.cc',
1611 'base/fake_audio_render_callback.h',
1612 'base/fake_audio_renderer_sink.cc',
1613 'base/fake_audio_renderer_sink.h',
1614 'base/fake_demuxer_stream.cc',
1615 'base/fake_demuxer_stream.h',
1616 'base/fake_output_device.cc',
1617 'base/fake_output_device.h',
1618 'base/fake_text_track_stream.cc',
1619 'base/fake_text_track_stream.h',
1620 'base/gmock_callback_support.h',
1621 'base/mock_audio_renderer_sink.cc',
1622 'base/mock_audio_renderer_sink.h',
1623 'base/mock_demuxer_host.cc',
1624 'base/mock_demuxer_host.h',
1625 'base/mock_filters.cc',
1626 'base/mock_filters.h',
1627 'base/mock_media_log.cc',
1628 'base/mock_media_log.h',
1629 'base/test_data_util.cc',
1630 'base/test_data_util.h',
1631 'base/test_helpers.cc',
1632 'base/test_helpers.h',
1633 'renderers/mock_gpu_video_accelerator_factories.cc',
1634 'renderers/mock_gpu_video_accelerator_factories.h',
1635 'video/mock_video_decode_accelerator.cc',
1636 'video/mock_video_decode_accelerator.h',
1640 # Minimal target for NaCl and other renderer side media clients which
1641 # only need to send audio data across the shared memory to the browser
1643 # GN version: //media:shared_memory_support
1644 'target_name': 'shared_memory_support',
1645 'type': '<(component)',
1647 '../base/base.gyp:base',
1648 '../ui/gfx/gfx.gyp:gfx_geometry',
1651 'MEDIA_IMPLEMENTATION',
1657 'shared_memory_support.gypi',
1660 '<@(shared_memory_support_sources)',
1672 ['target_arch=="ia32" or target_arch=="x64"', {
1675 'target_name': 'media_asm',
1676 'type': 'static_library',
1678 'base/simd/convert_rgb_to_yuv_ssse3.asm',
1679 'base/simd/convert_yuv_to_rgb_sse.asm',
1680 'base/simd/convert_yuva_to_argb_mmx.asm',
1681 'base/simd/empty_register_state_mmx.asm',
1682 'base/simd/linear_scale_yuv_to_rgb_mmx.asm',
1683 'base/simd/linear_scale_yuv_to_rgb_sse.asm',
1684 'base/simd/scale_yuv_to_rgb_mmx.asm',
1685 'base/simd/scale_yuv_to_rgb_sse.asm',
1688 ['component=="shared_library"', {
1690 'yasm_flags': ['-DEXPORT_SYMBOLS'],
1693 ['target_arch=="x64"', {
1694 # Source files optimized for X64 systems.
1696 'base/simd/linear_scale_yuv_to_rgb_mmx_x64.asm',
1697 'base/simd/scale_yuv_to_rgb_sse2_x64.asm',
1700 'yasm_flags': ['-DARCH_X86_64'],
1703 ['OS=="mac" or OS=="ios"', {
1711 # XCode doesn't want to link a pure assembly target and will
1712 # fail to link when it creates an empty file list. So add a
1713 # dummy file keep the linker happy. See http://crbug.com/157073
1714 'base/simd/xcode_hack.c',
1717 ['os_posix==1 and OS!="mac"', {
1720 ['target_arch=="ia32"', {
1725 }, { # target_arch=="x64"
1737 'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/media',
1740 # In addition to the same path as source asm, let yasm %include
1741 # search path be relative to src/ per Chromium policy.
1745 '../third_party/x86inc/x86inc.asm',
1746 'base/simd/convert_rgb_to_yuv_ssse3.inc',
1747 'base/simd/convert_yuv_to_rgb_mmx.inc',
1748 'base/simd/convert_yuva_to_argb_mmx.inc',
1749 'base/simd/linear_scale_yuv_to_rgb_mmx.inc',
1750 'base/simd/media_export.asm',
1751 'base/simd/scale_yuv_to_rgb_mmx.inc',
1754 'msvs_2010_disable_uldi_when_referenced': 1,
1756 '../third_party/yasm/yasm_compile.gypi',
1765 'target_name': 'media_unittests_apk',
1772 'test_suite_name': 'media_unittests',
1773 'isolate_file': 'media_unittests.isolate',
1775 'includes': ['../build/apk_test.gypi'],
1779 'target_name': 'media_perftests_apk',
1786 'test_suite_name': 'media_perftests',
1787 'isolate_file': 'media_perftests.isolate',
1789 'includes': ['../build/apk_test.gypi'],
1792 # GN: //media/base/android:media_android_jni_headers
1793 'target_name': 'media_android_jni_headers',
1796 'base/android/java/src/org/chromium/media/AudioManagerAndroid.java',
1797 'base/android/java/src/org/chromium/media/AudioRecordInput.java',
1798 'base/android/java/src/org/chromium/media/MediaCodecBridge.java',
1799 'base/android/java/src/org/chromium/media/MediaDrmBridge.java',
1800 'base/android/java/src/org/chromium/media/MediaPlayerBridge.java',
1801 'base/android/java/src/org/chromium/media/MediaPlayerListener.java',
1802 'base/android/java/src/org/chromium/media/WebAudioMediaCodecBridge.java',
1805 'jni_gen_package': 'media',
1807 'includes': ['../build/jni_generator.gypi'],
1810 # GN: //media/base/android:video_capture_android_jni_headers
1811 'target_name': 'video_capture_android_jni_headers',
1814 'base/android/java/src/org/chromium/media/VideoCapture.java',
1815 'base/android/java/src/org/chromium/media/VideoCaptureFactory.java',
1818 'jni_gen_package': 'media',
1820 'includes': ['../build/jni_generator.gypi'],
1823 # GN: //media/base/android:android
1824 'target_name': 'player_android',
1825 'type': 'static_library',
1827 'base/android/access_unit_queue.cc',
1828 'base/android/access_unit_queue.h',
1829 'base/android/audio_decoder_job.cc',
1830 'base/android/audio_decoder_job.h',
1831 'base/android/browser_cdm_factory_android.cc',
1832 'base/android/browser_cdm_factory_android.h',
1833 'base/android/demuxer_android.h',
1834 'base/android/demuxer_stream_player_params.cc',
1835 'base/android/demuxer_stream_player_params.h',
1836 'base/android/media_client_android.cc',
1837 'base/android/media_client_android.h',
1838 'base/android/media_codec_audio_decoder.cc',
1839 'base/android/media_codec_audio_decoder.h',
1840 'base/android/media_codec_bridge.cc',
1841 'base/android/media_codec_bridge.h',
1842 'base/android/media_codec_decoder.cc',
1843 'base/android/media_codec_decoder.h',
1844 'base/android/media_codec_player.cc',
1845 'base/android/media_codec_player.h',
1846 'base/android/media_codec_video_decoder.cc',
1847 'base/android/media_codec_video_decoder.h',
1848 'base/android/media_common_android.h',
1849 'base/android/media_decoder_job.cc',
1850 'base/android/media_decoder_job.h',
1851 'base/android/media_drm_bridge.cc',
1852 'base/android/media_drm_bridge.h',
1853 'base/android/media_drm_bridge_delegate.cc',
1854 'base/android/media_drm_bridge_delegate.h',
1855 'base/android/media_jni_registrar.cc',
1856 'base/android/media_jni_registrar.h',
1857 'base/android/media_player_android.cc',
1858 'base/android/media_player_android.h',
1859 'base/android/media_player_bridge.cc',
1860 'base/android/media_player_bridge.h',
1861 'base/android/media_player_listener.cc',
1862 'base/android/media_player_listener.h',
1863 'base/android/media_player_manager.h',
1864 'base/android/media_resource_getter.cc',
1865 'base/android/media_resource_getter.h',
1866 'base/android/media_source_player.cc',
1867 'base/android/media_source_player.h',
1868 'base/android/media_url_interceptor.h',
1869 'base/android/video_decoder_job.cc',
1870 'base/android/video_decoder_job.h',
1871 'base/android/webaudio_media_codec_bridge.cc',
1872 'base/android/webaudio_media_codec_bridge.h',
1873 'base/android/webaudio_media_codec_info.h',
1876 '../base/base.gyp:base',
1877 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
1878 '../ui/gl/gl.gyp:gl',
1879 '../url/url.gyp:url_lib',
1880 'media_android_jni_headers',
1883 # Needed by media_drm_bridge.cc.
1884 '<(SHARED_INTERMEDIATE_DIR)',
1887 'MEDIA_IMPLEMENTATION',
1891 # GN: //media/base/android:media_java
1892 'target_name': 'media_java',
1895 '../base/base.gyp:base',
1896 'media_android_captureapitype',
1897 'media_android_imageformat',
1899 'export_dependent_settings': [
1900 '../base/base.gyp:base',
1903 'java_in_dir': 'base/android/java',
1905 'includes': ['../build/java.gypi'],
1908 # GN: //media/base/android:media_android_captureapitype
1909 'target_name': 'media_android_captureapitype',
1912 'source_file': 'capture/video/video_capture_device.h',
1914 'includes': [ '../build/android/java_cpp_enum.gypi' ],
1917 # GN: //media/base/android:media_android_imageformat
1918 'target_name': 'media_android_imageformat',
1921 'source_file': 'capture/video/android/video_capture_device_android.h',
1923 'includes': [ '../build/android/java_cpp_enum.gypi' ],
1927 ['media_use_ffmpeg==1', {
1930 # GN version: //media:ffmpeg_regression_tests
1931 'target_name': 'ffmpeg_regression_tests',
1932 'type': 'executable',
1934 '../base/base.gyp:test_support_base',
1935 '../testing/gmock.gyp:gmock',
1936 '../testing/gtest.gyp:gtest',
1937 '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1938 '../ui/gfx/gfx.gyp:gfx_geometry',
1940 'media_test_support',
1943 'base/run_all_unittests.cc',
1944 'ffmpeg/ffmpeg_regression_tests.cc',
1945 'test/pipeline_integration_test_base.cc',
1948 ['os_posix==1 and OS!="mac"', {
1950 ['use_allocator!="none"', {
1952 '../base/allocator/allocator.gyp:allocator',
1964 # Minimal media component for media/cast on iOS.
1965 # GN version: //media:media_for_cast_ios
1966 'target_name': 'media_for_cast_ios',
1967 'type': '<(component)',
1969 '../base/base.gyp:base',
1970 '../gpu/gpu.gyp:command_buffer_common',
1971 '../ui/gfx/gfx.gyp:gfx_geometry',
1972 'shared_memory_support',
1975 'MEDIA_DISABLE_FFMPEG',
1976 'MEDIA_DISABLE_LIBVPX',
1977 'MEDIA_FOR_CAST_IOS',
1978 'MEDIA_IMPLEMENTATION',
1980 'direct_dependent_settings': {
1982 'MEDIA_DISABLE_FFMPEG',
1983 'MEDIA_DISABLE_LIBVPX',
1993 'base/mac/coremedia_glue.h',
1994 'base/mac/coremedia_glue.mm',
1995 'base/mac/corevideo_glue.h',
1996 'base/mac/video_frame_mac.cc',
1997 'base/mac/video_frame_mac.h',
1998 'base/mac/videotoolbox_glue.h',
1999 'base/mac/videotoolbox_glue.mm',
2000 'base/simd/convert_rgb_to_yuv.h',
2001 'base/simd/convert_rgb_to_yuv_c.cc',
2002 'base/simd/convert_yuv_to_rgb.h',
2003 'base/simd/convert_yuv_to_rgb_c.cc',
2004 'base/simd/filter_yuv.h',
2005 'base/simd/filter_yuv_c.cc',
2006 'base/video_frame.cc',
2007 'base/video_frame.h',
2008 'base/video_frame_metadata.cc',
2009 'base/video_frame_metadata.h',
2010 'base/video_types.cc',
2011 'base/video_types.h',
2012 'base/video_util.cc',
2013 'base/video_util.h',
2014 'base/yuv_convert.cc',
2015 'base/yuv_convert.h',
2019 '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
2029 'target_conditions': [
2030 ['OS == "ios" and _toolset != "host"', {
2032 # Pull in specific Mac files for iOS (which have been filtered
2033 # out by file name rules).
2034 ['include', '^base/mac/coremedia_glue\\.h$'],
2035 ['include', '^base/mac/coremedia_glue\\.mm$'],
2036 ['include', '^base/mac/corevideo_glue\\.h$'],
2037 ['include', '^base/mac/videotoolbox_glue\\.h$'],
2038 ['include', '^base/mac/videotoolbox_glue\\.mm$'],
2039 ['include', '^base/mac/video_frame_mac\\.h$'],
2040 ['include', '^base/mac/video_frame_mac\\.cc$'],
2043 ], # target_conditions
2047 ['test_isolation_mode != "noop"', {
2050 'target_name': 'media_unittests_run',
2056 '../build/isolate.gypi',
2059 'media_unittests.isolate',
2063 'target_name': 'audio_unittests_run',
2069 '../build/isolate.gypi',
2072 'audio_unittests.isolate',
2077 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',