1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/android/config.gni")
6 import("//build/config/arm.gni")
7 import("//build/config/features.gni")
8 import("//build/config/linux/pkg_config.gni")
9 import("//build/config/ui.gni")
10 import("//media/media_options.gni")
11 import("//testing/test.gni")
13 # Common configuration for targets in the media directory.
15 config("media_config") {
17 if (!media_use_libvpx) {
18 defines += [ "MEDIA_DISABLE_LIBVPX" ]
20 if (!media_use_ffmpeg) {
21 defines += [ "MEDIA_DISABLE_FFMPEG" ]
23 if (current_cpu == "arm" && arm_use_neon) {
24 defines += [ "USE_NEON" ]
27 defines += [ "USE_PULSEAUDIO" ]
28 if (!link_pulseaudio) {
29 defines += [ "DLOPEN_PULSEAUDIO" ]
33 defines += [ "USE_CRAS" ]
35 if (proprietary_codecs && enable_hevc_demuxing) {
36 defines += [ "ENABLE_HEVC_DEMUXING" ]
40 config("media_implementation") {
41 defines = [ "MEDIA_IMPLEMENTATION" ]
44 config("media_dependent_config") {
46 if (!media_use_libvpx) {
47 defines += [ "MEDIA_DISABLE_LIBVPX" ]
49 if (!media_use_ffmpeg) {
50 defines += [ "MEDIA_DISABLE_FFMPEG" ]
55 "/DELAYLOAD:mfplat.dll",
56 "/DELAYLOAD:mfreadwrite.dll",
62 action("generate_ozone_constructor_list") {
63 # Ozone platform objects are auto-generated using similar
64 # patterns for naming and classes constructors. Here we build the
65 # object MediaOzonePlatform.
66 script = "../ui/ozone/generate_constructor_list.py"
68 platform_list_txt_file = "$target_gen_dir/../ui/ozone/platform_list.txt"
69 constructor_list_cc_file = "$target_gen_dir/ozone/constructor_list.cc"
72 platform_list_txt_file,
75 constructor_list_cc_file,
78 "--platform_list=" + rebase_path(platform_list_txt_file, root_build_dir),
79 "--output_cc=" + rebase_path(constructor_list_cc_file, root_build_dir),
81 "--typename=MediaOzonePlatform",
82 "--include=\"media/ozone/media_ozone_platform.h\"",
85 "//ui/ozone:generate_ozone_platform_list",
92 "blink/skcanvas_video_renderer.cc",
93 "blink/skcanvas_video_renderer.h",
94 "capture/content/animated_content_sampler.cc",
95 "capture/content/animated_content_sampler.h",
96 "capture/content/capture_resolution_chooser.cc",
97 "capture/content/capture_resolution_chooser.h",
98 "capture/content/feedback_signal_accumulator.cc",
99 "capture/content/feedback_signal_accumulator.h",
100 "capture/content/screen_capture_device_core.cc",
101 "capture/content/screen_capture_device_core.h",
102 "capture/content/smooth_event_sampler.cc",
103 "capture/content/smooth_event_sampler.h",
104 "capture/content/thread_safe_capture_oracle.cc",
105 "capture/content/thread_safe_capture_oracle.h",
106 "capture/content/video_capture_oracle.cc",
107 "capture/content/video_capture_oracle.h",
108 "capture/video/fake_video_capture_device.cc",
109 "capture/video/fake_video_capture_device.h",
110 "capture/video/fake_video_capture_device_factory.cc",
111 "capture/video/fake_video_capture_device_factory.h",
112 "capture/video/file_video_capture_device.cc",
113 "capture/video/file_video_capture_device.h",
114 "capture/video/file_video_capture_device_factory.cc",
115 "capture/video/file_video_capture_device_factory.h",
116 "capture/video/linux/v4l2_capture_delegate.cc",
117 "capture/video/linux/v4l2_capture_delegate.h",
118 "capture/video/linux/v4l2_capture_delegate_multi_plane.cc",
119 "capture/video/linux/v4l2_capture_delegate_multi_plane.h",
120 "capture/video/linux/v4l2_capture_delegate_single_plane.cc",
121 "capture/video/linux/v4l2_capture_delegate_single_plane.h",
122 "capture/video/linux/video_capture_device_chromeos.cc",
123 "capture/video/linux/video_capture_device_chromeos.h",
124 "capture/video/linux/video_capture_device_factory_linux.cc",
125 "capture/video/linux/video_capture_device_factory_linux.h",
126 "capture/video/linux/video_capture_device_linux.cc",
127 "capture/video/linux/video_capture_device_linux.h",
128 "capture/video/mac/platform_video_capturing_mac.h",
129 "capture/video/mac/video_capture_device_avfoundation_mac.h",
130 "capture/video/mac/video_capture_device_avfoundation_mac.mm",
131 "capture/video/mac/video_capture_device_decklink_mac.h",
132 "capture/video/mac/video_capture_device_decklink_mac.mm",
133 "capture/video/mac/video_capture_device_factory_mac.h",
134 "capture/video/mac/video_capture_device_factory_mac.mm",
135 "capture/video/mac/video_capture_device_mac.h",
136 "capture/video/mac/video_capture_device_mac.mm",
137 "capture/video/mac/video_capture_device_qtkit_mac.h",
138 "capture/video/mac/video_capture_device_qtkit_mac.mm",
139 "capture/video/video_capture_device.cc",
140 "capture/video/video_capture_device.h",
141 "capture/video/video_capture_device_factory.cc",
142 "capture/video/video_capture_device_factory.h",
143 "capture/video/video_capture_device_info.cc",
144 "capture/video/video_capture_device_info.h",
145 "capture/video/win/capability_list_win.cc",
146 "capture/video/win/capability_list_win.h",
147 "capture/video/win/filter_base_win.cc",
148 "capture/video/win/filter_base_win.h",
149 "capture/video/win/pin_base_win.cc",
150 "capture/video/win/pin_base_win.h",
151 "capture/video/win/sink_filter_observer_win.h",
152 "capture/video/win/sink_filter_win.cc",
153 "capture/video/win/sink_filter_win.h",
154 "capture/video/win/sink_input_pin_win.cc",
155 "capture/video/win/sink_input_pin_win.h",
156 "capture/video/win/video_capture_device_factory_win.cc",
157 "capture/video/win/video_capture_device_factory_win.h",
158 "capture/video/win/video_capture_device_mf_win.cc",
159 "capture/video/win/video_capture_device_mf_win.h",
160 "capture/video/win/video_capture_device_win.cc",
161 "capture/video/win/video_capture_device_win.h",
162 "cdm/aes_decryptor.cc",
163 "cdm/aes_decryptor.h",
164 "cdm/default_cdm_factory.cc",
165 "cdm/default_cdm_factory.h",
166 "cdm/json_web_key.cc",
167 "cdm/json_web_key.h",
168 "cdm/key_system_names.cc",
169 "cdm/key_system_names.h",
170 "cdm/player_tracker_impl.cc",
171 "cdm/player_tracker_impl.h",
172 "cdm/proxy_decryptor.cc",
173 "cdm/proxy_decryptor.h",
174 "ffmpeg/ffmpeg_deleters.h",
175 "filters/audio_clock.cc",
176 "filters/audio_clock.h",
177 "filters/audio_renderer_algorithm.cc",
178 "filters/audio_renderer_algorithm.h",
179 "filters/chunk_demuxer.cc",
180 "filters/chunk_demuxer.h",
181 "filters/context_3d.h",
182 "filters/decoder_selector.cc",
183 "filters/decoder_selector.h",
184 "filters/decoder_stream.cc",
185 "filters/decoder_stream.h",
186 "filters/decoder_stream_traits.cc",
187 "filters/decoder_stream_traits.h",
188 "filters/decrypting_audio_decoder.cc",
189 "filters/decrypting_audio_decoder.h",
190 "filters/decrypting_demuxer_stream.cc",
191 "filters/decrypting_demuxer_stream.h",
192 "filters/decrypting_video_decoder.cc",
193 "filters/decrypting_video_decoder.h",
194 "filters/default_media_permission.cc",
195 "filters/default_media_permission.h",
196 "filters/file_data_source.cc",
197 "filters/file_data_source.h",
198 "filters/frame_processor.cc",
199 "filters/frame_processor.h",
200 "filters/gpu_video_decoder.cc",
201 "filters/gpu_video_decoder.h",
202 "filters/h264_bit_reader.cc",
203 "filters/h264_bit_reader.h",
204 "filters/h264_parser.cc",
205 "filters/h264_parser.h",
206 "filters/ivf_parser.cc",
207 "filters/ivf_parser.h",
208 "filters/jpeg_parser.cc",
209 "filters/jpeg_parser.h",
210 "filters/source_buffer_range.cc",
211 "filters/source_buffer_range.h",
212 "filters/source_buffer_stream.cc",
213 "filters/source_buffer_stream.h",
214 "filters/stream_parser_factory.cc",
215 "filters/stream_parser_factory.h",
216 "filters/video_cadence_estimator.cc",
217 "filters/video_cadence_estimator.h",
218 "filters/video_renderer_algorithm.cc",
219 "filters/video_renderer_algorithm.h",
220 "filters/vp8_bool_decoder.cc",
221 "filters/vp8_bool_decoder.h",
222 "filters/vp8_parser.cc",
223 "filters/vp8_parser.h",
224 "filters/vp9_parser.cc",
225 "filters/vp9_parser.h",
226 "filters/vp9_raw_bits_reader.cc",
227 "filters/vp9_raw_bits_reader.h",
228 "filters/webvtt_util.h",
229 "filters/wsola_internals.cc",
230 "filters/wsola_internals.h",
231 "formats/common/offset_byte_queue.cc",
232 "formats/common/offset_byte_queue.h",
233 "formats/webm/webm_audio_client.cc",
234 "formats/webm/webm_audio_client.h",
235 "formats/webm/webm_cluster_parser.cc",
236 "formats/webm/webm_cluster_parser.h",
237 "formats/webm/webm_constants.cc",
238 "formats/webm/webm_constants.h",
239 "formats/webm/webm_content_encodings.cc",
240 "formats/webm/webm_content_encodings.h",
241 "formats/webm/webm_content_encodings_client.cc",
242 "formats/webm/webm_content_encodings_client.h",
243 "formats/webm/webm_crypto_helpers.cc",
244 "formats/webm/webm_crypto_helpers.h",
245 "formats/webm/webm_info_parser.cc",
246 "formats/webm/webm_info_parser.h",
247 "formats/webm/webm_parser.cc",
248 "formats/webm/webm_parser.h",
249 "formats/webm/webm_stream_parser.cc",
250 "formats/webm/webm_stream_parser.h",
251 "formats/webm/webm_tracks_parser.cc",
252 "formats/webm/webm_tracks_parser.h",
253 "formats/webm/webm_video_client.cc",
254 "formats/webm/webm_video_client.h",
255 "formats/webm/webm_webvtt_parser.cc",
256 "formats/webm/webm_webvtt_parser.h",
257 "renderers/audio_renderer_impl.cc",
258 "renderers/audio_renderer_impl.h",
259 "renderers/default_renderer_factory.cc",
260 "renderers/default_renderer_factory.h",
261 "renderers/gpu_video_accelerator_factories.h",
262 "renderers/renderer_impl.cc",
263 "renderers/renderer_impl.h",
264 "renderers/video_renderer_impl.cc",
265 "renderers/video_renderer_impl.h",
266 "video/fake_video_encode_accelerator.cc",
267 "video/fake_video_encode_accelerator.h",
268 "video/gpu_memory_buffer_video_frame_pool.cc",
269 "video/gpu_memory_buffer_video_frame_pool.h",
272 "video/jpeg_decode_accelerator.cc",
273 "video/jpeg_decode_accelerator.h",
276 "video/video_decode_accelerator.cc",
277 "video/video_decode_accelerator.h",
278 "video/video_encode_accelerator.cc",
279 "video/video_encode_accelerator.h",
284 ":media_implementation",
285 "//build/config:precompiled_headers",
287 # TODO(wolenetz): Fix size_t to int trunctaion in win64.
288 # See http://crbug.com/171009
289 "//build/config/compiler:no_size_t_to_int_warning",
291 all_dependent_configs = [ ":media_dependent_config" ]
293 allow_circular_includes_from = []
299 include_dirs = [ "." ]
300 if (media_use_ffmpeg) {
301 deps += [ "//third_party/ffmpeg" ]
303 "ffmpeg/ffmpeg_common.cc",
304 "ffmpeg/ffmpeg_common.h",
305 "filters/audio_file_reader.cc",
306 "filters/audio_file_reader.h",
307 "filters/blocking_url_protocol.cc",
308 "filters/blocking_url_protocol.h",
309 "filters/ffmpeg_audio_decoder.cc",
310 "filters/ffmpeg_audio_decoder.h",
311 "filters/ffmpeg_bitstream_converter.h",
312 "filters/ffmpeg_demuxer.cc",
313 "filters/ffmpeg_demuxer.h",
314 "filters/ffmpeg_glue.cc",
315 "filters/ffmpeg_glue.h",
316 "filters/ffmpeg_video_decoder.cc",
317 "filters/ffmpeg_video_decoder.h",
318 "filters/in_memory_url_protocol.cc",
319 "filters/in_memory_url_protocol.h",
321 if (proprietary_codecs) {
323 "filters/ffmpeg_aac_bitstream_converter.cc",
324 "filters/ffmpeg_aac_bitstream_converter.h",
325 "filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc",
326 "filters/ffmpeg_h264_to_annex_b_bitstream_converter.h",
331 if (proprietary_codecs && enable_hevc_demuxing) {
333 "filters/h265_parser.cc",
334 "filters/h265_parser.h",
335 "formats/mp4/hevc.cc",
336 "formats/mp4/hevc.h",
338 if (media_use_ffmpeg) {
340 "filters/ffmpeg_h265_to_annex_b_bitstream_converter.cc",
341 "filters/ffmpeg_h265_to_annex_b_bitstream_converter.h",
346 if (current_cpu == "arm" && arm_use_neon) {
347 defines += [ "USE_NEON" ]
350 if (media_use_libvpx) {
352 "filters/vpx_video_decoder.cc",
353 "filters/vpx_video_decoder.h",
355 deps += [ "//third_party/libvpx_new" ]
358 if (media_use_libwebm) {
360 "capture/webm_muxer.cc",
361 "capture/webm_muxer.h",
363 deps += [ "//third_party/libwebm" ]
368 "capture/video/android/video_capture_device_android.cc",
369 "capture/video/android/video_capture_device_android.h",
370 "capture/video/android/video_capture_device_factory_android.cc",
371 "capture/video/android/video_capture_device_factory_android.h",
374 "//media/base/android",
375 "//media/base/android:media_jni_headers",
376 "//media/base/android:video_capture_jni_headers",
378 allow_circular_includes_from = [ "//media/base/android" ]
381 "filters/opus_audio_decoder.cc",
382 "filters/opus_audio_decoder.h",
386 if (current_cpu != "arm" && is_chromeos) {
388 "filters/h264_bitstream_buffer.cc",
389 "filters/h264_bitstream_buffer.h",
393 # A simple WebM encoder for animated avatars on ChromeOS.
396 # Used for the generated listing header (ui/ozone/platform_list.h)
397 include_dirs += [ target_gen_dir ]
400 "ozone/media_ozone_platform.cc",
401 "ozone/media_ozone_platform.h",
402 ] + get_target_outputs(":generate_ozone_constructor_list")
405 ":generate_ozone_constructor_list",
413 "//third_party/decklink",
416 "CoreVideo.framework",
424 "capture/video/linux/v4l2_capture_delegate_multi_plane.cc",
425 "capture/video/linux/v4l2_capture_delegate_multi_plane.h",
430 deps += [ "//media/base/mac" ]
434 deps += [ "//media/base/win" ]
443 if (proprietary_codecs) {
447 "filters/h264_to_annex_b_bitstream_converter.cc",
448 "filters/h264_to_annex_b_bitstream_converter.h",
449 "formats/mp2t/es_adapter_video.cc",
450 "formats/mp2t/es_adapter_video.h",
451 "formats/mp2t/es_parser.cc",
452 "formats/mp2t/es_parser.h",
453 "formats/mp2t/es_parser_adts.cc",
454 "formats/mp2t/es_parser_adts.h",
455 "formats/mp2t/es_parser_h264.cc",
456 "formats/mp2t/es_parser_h264.h",
457 "formats/mp2t/es_parser_mpeg1audio.cc",
458 "formats/mp2t/es_parser_mpeg1audio.h",
459 "formats/mp2t/mp2t_common.h",
460 "formats/mp2t/mp2t_stream_parser.cc",
461 "formats/mp2t/mp2t_stream_parser.h",
462 "formats/mp2t/timestamp_unroller.cc",
463 "formats/mp2t/timestamp_unroller.h",
464 "formats/mp2t/ts_packet.cc",
465 "formats/mp2t/ts_packet.h",
466 "formats/mp2t/ts_section.h",
467 "formats/mp2t/ts_section_pat.cc",
468 "formats/mp2t/ts_section_pat.h",
469 "formats/mp2t/ts_section_pes.cc",
470 "formats/mp2t/ts_section_pes.h",
471 "formats/mp2t/ts_section_pmt.cc",
472 "formats/mp2t/ts_section_pmt.h",
473 "formats/mp2t/ts_section_psi.cc",
474 "formats/mp2t/ts_section_psi.h",
475 "formats/mp4/aac.cc",
477 "formats/mp4/avc.cc",
479 "formats/mp4/bitstream_converter.cc",
480 "formats/mp4/bitstream_converter.h",
481 "formats/mp4/box_definitions.cc",
482 "formats/mp4/box_definitions.h",
483 "formats/mp4/box_reader.cc",
484 "formats/mp4/box_reader.h",
485 "formats/mp4/cenc.cc",
486 "formats/mp4/cenc.h",
487 "formats/mp4/es_descriptor.cc",
488 "formats/mp4/es_descriptor.h",
489 "formats/mp4/mp4_stream_parser.cc",
490 "formats/mp4/mp4_stream_parser.h",
491 "formats/mp4/sample_to_group_iterator.cc",
492 "formats/mp4/sample_to_group_iterator.h",
493 "formats/mp4/track_run_iterator.cc",
494 "formats/mp4/track_run_iterator.h",
495 "formats/mpeg/adts_constants.cc",
496 "formats/mpeg/adts_constants.h",
497 "formats/mpeg/adts_stream_parser.cc",
498 "formats/mpeg/adts_stream_parser.h",
499 "formats/mpeg/mpeg1_audio_stream_parser.cc",
500 "formats/mpeg/mpeg1_audio_stream_parser.h",
501 "formats/mpeg/mpeg_audio_stream_parser_base.cc",
502 "formats/mpeg/mpeg_audio_stream_parser_base.h",
506 if (use_low_memory_buffer) {
508 "filters/source_buffer_platform.h",
509 "filters/source_buffer_platform_lowmem.cc",
513 "filters/source_buffer_platform.cc",
514 "filters/source_buffer_platform.h",
524 ":shared_memory_support",
527 "//base/third_party/dynamic_annotations",
529 "//crypto:platform", # TODO(ajwong): This used to be provided by crypto.gyp via export_dependent_settings
530 "//gpu/command_buffer/common",
532 "//third_party/libyuv",
533 "//third_party/opus",
534 "//ui/events:events_base",
541 # Minimal media component for media/cast on iOS.
543 component("media_for_cast_ios") {
546 ":media_implementation",
548 all_dependent_configs = [ ":media_dependent_config" ]
549 include_dirs = [ "." ]
550 libs = [ "CoreVideo.framework" ]
553 ":shared_memory_support",
555 "//gpu/command_buffer/common",
556 "//media/base:base_for_cast_ios",
563 # TODO(GYP): Delete this after we've converted everything to GN.
564 # The _run targets exist only for compatibility w/ GYP.
565 group("media_unittests_run") {
572 test("media_unittests") {
574 "blink/skcanvas_video_renderer_unittest.cc",
575 "capture/content/animated_content_sampler_unittest.cc",
576 "capture/content/capture_resolution_chooser_unittest.cc",
577 "capture/content/feedback_signal_accumulator_unittest.cc",
578 "capture/content/smooth_event_sampler_unittest.cc",
579 "capture/content/video_capture_oracle_unittest.cc",
580 "capture/video/fake_video_capture_device_unittest.cc",
581 "capture/video/video_capture_device_unittest.cc",
582 "cdm/aes_decryptor_unittest.cc",
583 "cdm/json_web_key_unittest.cc",
584 "filters/audio_clock_unittest.cc",
585 "filters/audio_decoder_selector_unittest.cc",
586 "filters/audio_renderer_algorithm_unittest.cc",
587 "filters/chunk_demuxer_unittest.cc",
588 "filters/decrypting_audio_decoder_unittest.cc",
589 "filters/decrypting_demuxer_stream_unittest.cc",
590 "filters/decrypting_video_decoder_unittest.cc",
591 "filters/fake_video_decoder.cc",
592 "filters/fake_video_decoder.h",
593 "filters/fake_video_decoder_unittest.cc",
594 "filters/file_data_source_unittest.cc",
595 "filters/frame_processor_unittest.cc",
596 "filters/h264_bit_reader_unittest.cc",
597 "filters/h264_parser_unittest.cc",
598 "filters/ivf_parser_unittest.cc",
599 "filters/jpeg_parser_unittest.cc",
600 "filters/source_buffer_stream_unittest.cc",
601 "filters/video_cadence_estimator_unittest.cc",
602 "filters/video_decoder_selector_unittest.cc",
603 "filters/video_frame_stream_unittest.cc",
604 "filters/video_renderer_algorithm_unittest.cc",
605 "filters/vp8_bool_decoder_unittest.cc",
606 "filters/vp8_parser_unittest.cc",
607 "filters/vp9_parser_unittest.cc",
608 "filters/vp9_raw_bits_reader_unittest.cc",
609 "formats/common/offset_byte_queue_unittest.cc",
610 "formats/webm/cluster_builder.cc",
611 "formats/webm/cluster_builder.h",
612 "formats/webm/opus_packet_builder.cc",
613 "formats/webm/opus_packet_builder.h",
614 "formats/webm/tracks_builder.cc",
615 "formats/webm/tracks_builder.h",
616 "formats/webm/webm_cluster_parser_unittest.cc",
617 "formats/webm/webm_content_encodings_client_unittest.cc",
618 "formats/webm/webm_parser_unittest.cc",
619 "formats/webm/webm_tracks_parser_unittest.cc",
620 "formats/webm/webm_webvtt_parser_unittest.cc",
621 "renderers/audio_renderer_impl_unittest.cc",
622 "renderers/renderer_impl_unittest.cc",
623 "renderers/video_renderer_impl_unittest.cc",
624 "video/gpu_memory_buffer_video_frame_pool_unittest.cc",
625 "video/h264_poc_unittest.cc",
632 # TODO(wolenetz): Fix size_t to int trunctaion in win64.
633 # See http://crbug.com/171009
634 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
640 "//base/test:test_support",
641 "//gpu/command_buffer/common",
642 "//gpu:test_support",
643 "//media/audio:unittests",
644 "//media/audio:test_support",
645 "//media/base:unittests",
646 "//media/base:test_support",
647 "//media/test:pipeline_integration_tests",
648 "//skia", # Direct dependency required to inherit config.
651 "//third_party/widevine/cdm:version_h",
652 "//ui/gfx:test_support",
657 isolate_file = "media_unittests.isolate"
659 "//media/base/android",
661 #"//testing/android/native_test:native_test_native_code"
665 if (media_use_ffmpeg) {
667 "ffmpeg/ffmpeg_common_unittest.cc",
668 "filters/audio_decoder_unittest.cc",
669 "filters/audio_file_reader_unittest.cc",
670 "filters/blocking_url_protocol_unittest.cc",
671 "filters/ffmpeg_demuxer_unittest.cc",
672 "filters/ffmpeg_glue_unittest.cc",
673 "filters/ffmpeg_video_decoder_unittest.cc",
674 "filters/in_memory_url_protocol_unittest.cc",
678 if (media_use_libwebm) {
679 sources += [ "capture/webm_muxer_unittest.cc" ]
680 deps += [ "//third_party/libwebm" ]
683 if (current_cpu != "arm" && is_chromeos) {
684 sources += [ "filters/h264_bitstream_buffer_unittest.cc" ]
687 if (proprietary_codecs) {
689 "cdm/cenc_utils_unittest.cc",
690 "filters/h264_to_annex_b_bitstream_converter_unittest.cc",
691 "formats/common/stream_parser_test_base.cc",
692 "formats/common/stream_parser_test_base.h",
693 "formats/mp2t/es_adapter_video_unittest.cc",
694 "formats/mp2t/es_parser_adts_unittest.cc",
695 "formats/mp2t/es_parser_h264_unittest.cc",
696 "formats/mp2t/es_parser_mpeg1audio_unittest.cc",
697 "formats/mp2t/es_parser_test_base.cc",
698 "formats/mp2t/es_parser_test_base.h",
699 "formats/mp2t/mp2t_stream_parser_unittest.cc",
700 "formats/mp2t/timestamp_unroller_unittest.cc",
701 "formats/mp4/aac_unittest.cc",
702 "formats/mp4/avc_unittest.cc",
703 "formats/mp4/box_reader_unittest.cc",
704 "formats/mp4/es_descriptor_unittest.cc",
705 "formats/mp4/mp4_stream_parser_unittest.cc",
706 "formats/mp4/sample_to_group_iterator_unittest.cc",
707 "formats/mp4/track_run_iterator_unittest.cc",
708 "formats/mpeg/adts_stream_parser_unittest.cc",
709 "formats/mpeg/mpeg1_audio_stream_parser_unittest.cc",
711 if (media_use_ffmpeg) {
713 "filters/ffmpeg_aac_bitstream_converter_unittest.cc",
714 "filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc",
717 if (enable_hevc_demuxing) {
718 sources += [ "filters/h265_parser_unittest.cc" ]
722 if (is_mac || is_ios) {
723 deps += [ "//media/base/mac" ]
728 [ "capture/video/mac/video_capture_device_factory_mac_unittest.mm" ]
732 # # Needed by media_drm_bridge.cc.
736 configs += [ ":media_config" ]
738 if (media_use_ffmpeg) {
739 deps += [ "//third_party/ffmpeg" ] # Direct dependency required to inherit config.
743 test("media_perftests") {
744 configs += [ ":media_config" ]
747 ":shared_memory_support",
749 "//base/test:test_support",
750 "//media/audio:test_support",
751 "//media/base:perftests",
752 "//media/base:test_support",
753 "//media/test:pipeline_integration_perftests",
757 "//third_party/widevine/cdm:version_h",
758 "//ui/gfx:test_support",
761 deps += [ "//ui/gl" ]
762 isolate_file = "media_perftests.isolate"
764 if (media_use_ffmpeg) {
765 deps += [ "//third_party/ffmpeg" ] # Direct dependency required to inherit config.
769 # For running the subset of media_unittests that might require audio hardware
770 # separately on GPU bots. media_unittests includes these too.
771 test("audio_unittests") {
773 "base/run_all_unittests.cc",
777 "//base/test:test_support",
778 "//media/audio:unittests",
779 "//ui/gfx:test_support",
783 source_set("test_support") {
786 "renderers/mock_gpu_video_accelerator_factories.cc",
787 "renderers/mock_gpu_video_accelerator_factories.h",
788 "video/mock_video_decode_accelerator.cc",
789 "video/mock_video_decode_accelerator.h",
793 ":shared_memory_support",
801 # TODO(dalecurtis): How to split this across audio/base directories??
802 component("shared_memory_support") {
804 "audio/audio_parameters.cc",
805 "audio/audio_parameters.h",
810 "base/channel_layout.cc",
811 "base/channel_layout.h",
813 "base/media_export.h",
814 "base/vector_math.cc",
815 "base/vector_math.h",
819 ":media_implementation",
827 if (media_use_ffmpeg) {
828 test("ffmpeg_regression_tests") {
830 "base/run_all_unittests.cc",
831 "ffmpeg/ffmpeg_regression_tests.cc",
834 configs += [ "//media:media_config" ]
837 "//base/test:test_support",
839 "//media:test_support",
840 "//media/audio:test_support",
841 "//media/base:test_support",
842 "//media/test:pipeline_integration_tests",
845 "//third_party/ffmpeg",
847 "//ui/gfx:test_support",