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" ]
37 config("media_implementation") {
38 defines = [ "MEDIA_IMPLEMENTATION" ]
41 config("media_dependent_config") {
43 if (!media_use_libvpx) {
44 defines += [ "MEDIA_DISABLE_LIBVPX" ]
46 if (!media_use_ffmpeg) {
47 defines += [ "MEDIA_DISABLE_FFMPEG" ]
52 "/DELAYLOAD:mfplat.dll",
53 "/DELAYLOAD:mfreadwrite.dll",
59 action("generate_ozone_constructor_list") {
60 # Ozone platform objects are auto-generated using similar
61 # patterns for naming and classes constructors. Here we build the
62 # object MediaOzonePlatform.
63 script = "../ui/ozone/generate_constructor_list.py"
65 platform_list_txt_file = "$target_gen_dir/../ui/ozone/platform_list.txt"
66 constructor_list_cc_file = "$target_gen_dir/ozone/constructor_list.cc"
69 platform_list_txt_file,
72 constructor_list_cc_file,
75 "--platform_list=" + rebase_path(platform_list_txt_file, root_build_dir),
76 "--output_cc=" + rebase_path(constructor_list_cc_file, root_build_dir),
78 "--typename=MediaOzonePlatform",
79 "--include=\"media/ozone/media_ozone_platform.h\"",
82 "//ui/ozone:generate_ozone_platform_list",
89 "blink/skcanvas_video_renderer.cc",
90 "blink/skcanvas_video_renderer.h",
91 "capture/content/animated_content_sampler.cc",
92 "capture/content/animated_content_sampler.h",
93 "capture/content/capture_resolution_chooser.cc",
94 "capture/content/capture_resolution_chooser.h",
95 "capture/content/feedback_signal_accumulator.cc",
96 "capture/content/feedback_signal_accumulator.h",
97 "capture/content/screen_capture_device_core.cc",
98 "capture/content/screen_capture_device_core.h",
99 "capture/content/smooth_event_sampler.cc",
100 "capture/content/smooth_event_sampler.h",
101 "capture/content/thread_safe_capture_oracle.cc",
102 "capture/content/thread_safe_capture_oracle.h",
103 "capture/content/video_capture_oracle.cc",
104 "capture/content/video_capture_oracle.h",
105 "capture/video/fake_video_capture_device.cc",
106 "capture/video/fake_video_capture_device.h",
107 "capture/video/fake_video_capture_device_factory.cc",
108 "capture/video/fake_video_capture_device_factory.h",
109 "capture/video/file_video_capture_device.cc",
110 "capture/video/file_video_capture_device.h",
111 "capture/video/file_video_capture_device_factory.cc",
112 "capture/video/file_video_capture_device_factory.h",
113 "capture/video/linux/v4l2_capture_delegate.cc",
114 "capture/video/linux/v4l2_capture_delegate.h",
115 "capture/video/linux/v4l2_capture_delegate_multi_plane.cc",
116 "capture/video/linux/v4l2_capture_delegate_multi_plane.h",
117 "capture/video/linux/v4l2_capture_delegate_single_plane.cc",
118 "capture/video/linux/v4l2_capture_delegate_single_plane.h",
119 "capture/video/linux/video_capture_device_chromeos.cc",
120 "capture/video/linux/video_capture_device_chromeos.h",
121 "capture/video/linux/video_capture_device_factory_linux.cc",
122 "capture/video/linux/video_capture_device_factory_linux.h",
123 "capture/video/linux/video_capture_device_linux.cc",
124 "capture/video/linux/video_capture_device_linux.h",
125 "capture/video/mac/platform_video_capturing_mac.h",
126 "capture/video/mac/video_capture_device_avfoundation_mac.h",
127 "capture/video/mac/video_capture_device_avfoundation_mac.mm",
128 "capture/video/mac/video_capture_device_decklink_mac.h",
129 "capture/video/mac/video_capture_device_decklink_mac.mm",
130 "capture/video/mac/video_capture_device_factory_mac.h",
131 "capture/video/mac/video_capture_device_factory_mac.mm",
132 "capture/video/mac/video_capture_device_mac.h",
133 "capture/video/mac/video_capture_device_mac.mm",
134 "capture/video/mac/video_capture_device_qtkit_mac.h",
135 "capture/video/mac/video_capture_device_qtkit_mac.mm",
136 "capture/video/video_capture_device.cc",
137 "capture/video/video_capture_device.h",
138 "capture/video/video_capture_device_factory.cc",
139 "capture/video/video_capture_device_factory.h",
140 "capture/video/video_capture_device_info.cc",
141 "capture/video/video_capture_device_info.h",
142 "capture/video/win/capability_list_win.cc",
143 "capture/video/win/capability_list_win.h",
144 "capture/video/win/filter_base_win.cc",
145 "capture/video/win/filter_base_win.h",
146 "capture/video/win/pin_base_win.cc",
147 "capture/video/win/pin_base_win.h",
148 "capture/video/win/sink_filter_observer_win.h",
149 "capture/video/win/sink_filter_win.cc",
150 "capture/video/win/sink_filter_win.h",
151 "capture/video/win/sink_input_pin_win.cc",
152 "capture/video/win/sink_input_pin_win.h",
153 "capture/video/win/video_capture_device_factory_win.cc",
154 "capture/video/win/video_capture_device_factory_win.h",
155 "capture/video/win/video_capture_device_mf_win.cc",
156 "capture/video/win/video_capture_device_mf_win.h",
157 "capture/video/win/video_capture_device_win.cc",
158 "capture/video/win/video_capture_device_win.h",
159 "cdm/aes_decryptor.cc",
160 "cdm/aes_decryptor.h",
161 "cdm/default_cdm_factory.cc",
162 "cdm/default_cdm_factory.h",
163 "cdm/json_web_key.cc",
164 "cdm/json_web_key.h",
165 "cdm/key_system_names.cc",
166 "cdm/key_system_names.h",
167 "cdm/player_tracker_impl.cc",
168 "cdm/player_tracker_impl.h",
169 "cdm/proxy_decryptor.cc",
170 "cdm/proxy_decyrptor.h",
171 "ffmpeg/ffmpeg_deleters.h",
172 "filters/audio_clock.cc",
173 "filters/audio_clock.h",
174 "filters/audio_renderer_algorithm.cc",
175 "filters/audio_renderer_algorithm.h",
176 "filters/chunk_demuxer.cc",
177 "filters/chunk_demuxer.h",
178 "filters/context_3d.h",
179 "filters/decoder_selector.cc",
180 "filters/decoder_selector.h",
181 "filters/decoder_stream.cc",
182 "filters/decoder_stream.h",
183 "filters/decoder_stream_traits.cc",
184 "filters/decoder_stream_traits.h",
185 "filters/decrypting_audio_decoder.cc",
186 "filters/decrypting_audio_decoder.h",
187 "filters/decrypting_demuxer_stream.cc",
188 "filters/decrypting_demuxer_stream.h",
189 "filters/decrypting_video_decoder.cc",
190 "filters/decrypting_video_decoder.h",
191 "filters/default_media_permission.cc",
192 "filters/default_media_permission.h",
193 "filters/file_data_source.cc",
194 "filters/file_data_source.h",
195 "filters/frame_processor.cc",
196 "filters/frame_processor.h",
197 "filters/gpu_video_decoder.cc",
198 "filters/gpu_video_decoder.h",
199 "filters/h264_bit_reader.cc",
200 "filters/h264_bit_reader.h",
201 "filters/h264_parser.cc",
202 "filters/h264_parser.h",
203 "filters/jpeg_parser.cc",
204 "filters/jpeg_parser.h",
205 "filters/source_buffer_platform.cc",
206 "filters/source_buffer_platform.h",
207 "filters/source_buffer_range.cc",
208 "filters/source_buffer_range.h",
209 "filters/source_buffer_stream.cc",
210 "filters/source_buffer_stream.h",
211 "filters/stream_parser_factory.cc",
212 "filters/stream_parser_factory.h",
213 "filters/video_cadence_estimator.cc",
214 "filters/video_cadence_estimator.h",
215 "filters/video_renderer_algorithm.cc",
216 "filters/video_renderer_algorithm.h",
217 "filters/vp8_bool_decoder.cc",
218 "filters/vp8_bool_decoder.h",
219 "filters/vp8_parser.cc",
220 "filters/vp8_parser.h",
221 "filters/webvtt_util.h",
222 "filters/wsola_internals.cc",
223 "filters/wsola_internals.h",
224 "formats/common/offset_byte_queue.cc",
225 "formats/common/offset_byte_queue.h",
226 "formats/webm/webm_audio_client.cc",
227 "formats/webm/webm_audio_client.h",
228 "formats/webm/webm_cluster_parser.cc",
229 "formats/webm/webm_cluster_parser.h",
230 "formats/webm/webm_constants.cc",
231 "formats/webm/webm_constants.h",
232 "formats/webm/webm_content_encodings.cc",
233 "formats/webm/webm_content_encodings.h",
234 "formats/webm/webm_content_encodings_client.cc",
235 "formats/webm/webm_content_encodings_client.h",
236 "formats/webm/webm_crypto_helpers.cc",
237 "formats/webm/webm_crypto_helpers.h",
238 "formats/webm/webm_info_parser.cc",
239 "formats/webm/webm_info_parser.h",
240 "formats/webm/webm_parser.cc",
241 "formats/webm/webm_parser.h",
242 "formats/webm/webm_stream_parser.cc",
243 "formats/webm/webm_stream_parser.h",
244 "formats/webm/webm_tracks_parser.cc",
245 "formats/webm/webm_tracks_parser.h",
246 "formats/webm/webm_video_client.cc",
247 "formats/webm/webm_video_client.h",
248 "formats/webm/webm_webvtt_parser.cc",
249 "formats/webm/webm_webvtt_parser.h",
250 "renderers/audio_renderer_impl.cc",
251 "renderers/audio_renderer_impl.h",
252 "renderers/default_renderer_factory.cc",
253 "renderers/default_renderer_factory.h",
254 "renderers/gpu_video_accelerator_factories.h",
255 "renderers/renderer_impl.cc",
256 "renderers/renderer_impl.h",
257 "renderers/video_renderer_impl.cc",
258 "renderers/video_renderer_impl.h",
259 "video/fake_video_encode_accelerator.cc",
260 "video/fake_video_encode_accelerator.h",
261 "video/gpu_memory_buffer_video_frame_pool.cc",
262 "video/gpu_memory_buffer_video_frame_pool.h",
265 "video/jpeg_decode_accelerator.cc",
266 "video/jpeg_decode_accelerator.h",
269 "video/video_decode_accelerator.cc",
270 "video/video_decode_accelerator.h",
271 "video/video_encode_accelerator.cc",
272 "video/video_encode_accelerator.h",
277 ":media_implementation",
278 "//build/config:precompiled_headers",
280 # TODO(wolenetz): Fix size_t to int trunctaion in win64.
281 # See http://crbug.com/171009
282 "//build/config/compiler:no_size_t_to_int_warning",
284 all_dependent_configs = [ ":media_dependent_config" ]
286 allow_circular_includes_from = []
292 include_dirs = [ "." ]
293 if (media_use_ffmpeg) {
294 deps += [ "//third_party/ffmpeg" ]
296 "ffmpeg/ffmpeg_common.cc",
297 "ffmpeg/ffmpeg_common.h",
298 "filters/audio_file_reader.cc",
299 "filters/audio_file_reader.h",
300 "filters/blocking_url_protocol.cc",
301 "filters/blocking_url_protocol.h",
302 "filters/ffmpeg_audio_decoder.cc",
303 "filters/ffmpeg_audio_decoder.h",
304 "filters/ffmpeg_bitstream_converter.h",
305 "filters/ffmpeg_demuxer.cc",
306 "filters/ffmpeg_demuxer.h",
307 "filters/ffmpeg_glue.cc",
308 "filters/ffmpeg_glue.h",
309 "filters/ffmpeg_video_decoder.cc",
310 "filters/ffmpeg_video_decoder.h",
311 "filters/in_memory_url_protocol.cc",
312 "filters/in_memory_url_protocol.h",
314 if (proprietary_codecs) {
316 "filters/ffmpeg_aac_bitstream_converter.cc",
317 "filters/ffmpeg_aac_bitstream_converter.h",
318 "filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc",
319 "filters/ffmpeg_h264_to_annex_b_bitstream_converter.h",
324 if (current_cpu == "arm" && arm_use_neon) {
325 defines += [ "USE_NEON" ]
328 if (media_use_libvpx) {
330 "filters/vpx_video_decoder.cc",
331 "filters/vpx_video_decoder.h",
333 deps += [ "//third_party/libvpx" ]
336 if (media_use_libwebm) {
338 "capture/webm_muxer.cc",
339 "capture/webm_muxer.h",
341 deps += [ "//third_party/libwebm" ]
346 "capture/video/android/video_capture_device_android.cc",
347 "capture/video/android/video_capture_device_android.h",
348 "capture/video/android/video_capture_device_factory_android.cc",
349 "capture/video/android/video_capture_device_factory_android.h",
352 "//media/base/android",
353 "//media/base/android:media_jni_headers",
354 "//media/base/android:video_capture_jni_headers",
356 allow_circular_includes_from = [ "//media/base/android" ]
359 "filters/opus_audio_decoder.cc",
360 "filters/opus_audio_decoder.h",
364 if (current_cpu != "arm" && is_chromeos) {
366 "filters/h264_bitstream_buffer.cc",
367 "filters/h264_bitstream_buffer.h",
371 # A simple WebM encoder for animated avatars on ChromeOS.
374 # Used for the generated listing header (ui/ozone/platform_list.h)
375 include_dirs += [ target_gen_dir ]
378 "ozone/media_ozone_platform.cc",
379 "ozone/media_ozone_platform.h",
380 ] + get_target_outputs(":generate_ozone_constructor_list")
383 ":generate_ozone_constructor_list",
391 "//third_party/decklink",
394 "CoreVideo.framework",
402 "capture/video/linux/v4l2_capture_delegate_multi_plane.cc",
403 "capture/video/linux/v4l2_capture_delegate_multi_plane.h",
408 deps += [ "//media/base/mac" ]
412 deps += [ "//media/base/win" ]
421 if (proprietary_codecs) {
425 "filters/h264_to_annex_b_bitstream_converter.cc",
426 "filters/h264_to_annex_b_bitstream_converter.h",
427 "formats/mp2t/es_adapter_video.cc",
428 "formats/mp2t/es_adapter_video.h",
429 "formats/mp2t/es_parser.cc",
430 "formats/mp2t/es_parser.h",
431 "formats/mp2t/es_parser_adts.cc",
432 "formats/mp2t/es_parser_adts.h",
433 "formats/mp2t/es_parser_h264.cc",
434 "formats/mp2t/es_parser_h264.h",
435 "formats/mp2t/es_parser_mpeg1audio.cc",
436 "formats/mp2t/es_parser_mpeg1audio.h",
437 "formats/mp2t/mp2t_common.h",
438 "formats/mp2t/mp2t_stream_parser.cc",
439 "formats/mp2t/mp2t_stream_parser.h",
440 "formats/mp2t/timestamp_unroller.cc",
441 "formats/mp2t/timestamp_unroller.h",
442 "formats/mp2t/ts_packet.cc",
443 "formats/mp2t/ts_packet.h",
444 "formats/mp2t/ts_section.h",
445 "formats/mp2t/ts_section_pat.cc",
446 "formats/mp2t/ts_section_pat.h",
447 "formats/mp2t/ts_section_pes.cc",
448 "formats/mp2t/ts_section_pes.h",
449 "formats/mp2t/ts_section_pmt.cc",
450 "formats/mp2t/ts_section_pmt.h",
451 "formats/mp2t/ts_section_psi.cc",
452 "formats/mp2t/ts_section_psi.h",
453 "formats/mp4/aac.cc",
455 "formats/mp4/avc.cc",
457 "formats/mp4/box_definitions.cc",
458 "formats/mp4/box_definitions.h",
459 "formats/mp4/box_reader.cc",
460 "formats/mp4/box_reader.h",
461 "formats/mp4/cenc.cc",
462 "formats/mp4/cenc.h",
463 "formats/mp4/es_descriptor.cc",
464 "formats/mp4/es_descriptor.h",
465 "formats/mp4/mp4_stream_parser.cc",
466 "formats/mp4/mp4_stream_parser.h",
467 "formats/mp4/sample_to_group_iterator.cc",
468 "formats/mp4/sample_to_group_iterator.h",
469 "formats/mp4/track_run_iterator.cc",
470 "formats/mp4/track_run_iterator.h",
471 "formats/mpeg/adts_constants.cc",
472 "formats/mpeg/adts_constants.h",
473 "formats/mpeg/adts_stream_parser.cc",
474 "formats/mpeg/adts_stream_parser.h",
475 "formats/mpeg/mpeg1_audio_stream_parser.cc",
476 "formats/mpeg/mpeg1_audio_stream_parser.h",
477 "formats/mpeg/mpeg_audio_stream_parser_base.cc",
478 "formats/mpeg/mpeg_audio_stream_parser_base.h",
488 ":shared_memory_support",
491 "//base/third_party/dynamic_annotations",
493 "//crypto:platform", # TODO(ajwong): This used to be provided by crypto.gyp via export_dependent_settings
494 "//gpu/command_buffer/common",
496 "//third_party/libyuv",
497 "//third_party/opus",
498 "//ui/events:events_base",
505 # Minimal media component for media/cast on iOS.
507 component("media_for_cast_ios") {
510 ":media_implementation",
512 all_dependent_configs = [ ":media_dependent_config" ]
513 include_dirs = [ "." ]
514 libs = [ "CoreVideo.framework" ]
517 ":shared_memory_support",
519 "//gpu/command_buffer/common",
520 "//media/base:base_for_cast_ios",
527 # TODO(GYP): Delete this after we've converted everything to GN.
528 # The _run targets exist only for compatibility w/ GYP.
529 group("media_unittests_run") {
536 test("media_unittests") {
538 "blink/skcanvas_video_renderer_unittest.cc",
539 "capture/content/animated_content_sampler_unittest.cc",
540 "capture/content/capture_resolution_chooser_unittest.cc",
541 "capture/content/feedback_signal_accumulator_unittest.cc",
542 "capture/content/smooth_event_sampler_unittest.cc",
543 "capture/content/video_capture_oracle_unittest.cc",
544 "capture/video/fake_video_capture_device_unittest.cc",
545 "capture/video/video_capture_device_unittest.cc",
546 "cdm/aes_decryptor_unittest.cc",
547 "cdm/json_web_key_unittest.cc",
548 "filters/audio_clock_unittest.cc",
549 "filters/audio_decoder_selector_unittest.cc",
550 "filters/audio_renderer_algorithm_unittest.cc",
551 "filters/chunk_demuxer_unittest.cc",
552 "filters/decrypting_audio_decoder_unittest.cc",
553 "filters/decrypting_demuxer_stream_unittest.cc",
554 "filters/decrypting_video_decoder_unittest.cc",
555 "filters/fake_video_decoder.cc",
556 "filters/fake_video_decoder.h",
557 "filters/fake_video_decoder_unittest.cc",
558 "filters/file_data_source_unittest.cc",
559 "filters/frame_processor_unittest.cc",
560 "filters/h264_bit_reader_unittest.cc",
561 "filters/h264_parser_unittest.cc",
562 "filters/jpeg_parser_unittest.cc",
563 "filters/source_buffer_stream_unittest.cc",
564 "filters/video_cadence_estimator_unittest.cc",
565 "filters/video_decoder_selector_unittest.cc",
566 "filters/video_frame_stream_unittest.cc",
567 "filters/video_renderer_algorithm_unittest.cc",
568 "filters/vp8_bool_decoder_unittest.cc",
569 "filters/vp8_parser_unittest.cc",
570 "formats/common/offset_byte_queue_unittest.cc",
571 "formats/webm/cluster_builder.cc",
572 "formats/webm/cluster_builder.h",
573 "formats/webm/opus_packet_builder.cc",
574 "formats/webm/opus_packet_builder.h",
575 "formats/webm/tracks_builder.cc",
576 "formats/webm/tracks_builder.h",
577 "formats/webm/webm_cluster_parser_unittest.cc",
578 "formats/webm/webm_content_encodings_client_unittest.cc",
579 "formats/webm/webm_parser_unittest.cc",
580 "formats/webm/webm_tracks_parser_unittest.cc",
581 "formats/webm/webm_webvtt_parser_unittest.cc",
582 "renderers/audio_renderer_impl_unittest.cc",
583 "renderers/renderer_impl_unittest.cc",
584 "renderers/video_renderer_impl_unittest.cc",
585 "video/h264_poc_unittest.cc",
592 # TODO(wolenetz): Fix size_t to int trunctaion in win64.
593 # See http://crbug.com/171009
594 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
600 "//base/test:test_support",
601 "//media/audio:unittests",
602 "//media/audio:test_support",
603 "//media/base:unittests",
604 "//media/base:test_support",
605 "//media/test:pipeline_integration_tests",
606 "//skia", # Direct dependency required to inherit config.
609 "//third_party/widevine/cdm:version_h",
610 "//ui/gfx:test_support",
615 isolate_file = "media_unittests.isolate"
617 "//media/base/android",
619 #"//testing/android/native_test:native_test_native_code"
623 if (media_use_ffmpeg) {
625 "ffmpeg/ffmpeg_common_unittest.cc",
626 "filters/audio_decoder_unittest.cc",
627 "filters/audio_file_reader_unittest.cc",
628 "filters/blocking_url_protocol_unittest.cc",
629 "filters/ffmpeg_demuxer_unittest.cc",
630 "filters/ffmpeg_glue_unittest.cc",
631 "filters/ffmpeg_video_decoder_unittest.cc",
632 "filters/in_memory_url_protocol_unittest.cc",
636 if (current_cpu != "arm" && is_chromeos) {
637 sources += [ "filters/h264_bitstream_buffer_unittest.cc" ]
640 if (proprietary_codecs) {
642 "cdm/cenc_utils_unittest.cc",
643 "filters/h264_to_annex_b_bitstream_converter_unittest.cc",
644 "formats/common/stream_parser_test_base.cc",
645 "formats/common/stream_parser_test_base.h",
646 "formats/mp2t/es_adapter_video_unittest.cc",
647 "formats/mp2t/es_parser_adts_unittest.cc",
648 "formats/mp2t/es_parser_h264_unittest.cc",
649 "formats/mp2t/es_parser_mpeg1audio_unittest.cc",
650 "formats/mp2t/es_parser_test_base.cc",
651 "formats/mp2t/es_parser_test_base.h",
652 "formats/mp2t/mp2t_stream_parser_unittest.cc",
653 "formats/mp2t/timestamp_unroller_unittest.cc",
654 "formats/mp4/aac_unittest.cc",
655 "formats/mp4/avc_unittest.cc",
656 "formats/mp4/box_reader_unittest.cc",
657 "formats/mp4/es_descriptor_unittest.cc",
658 "formats/mp4/mp4_stream_parser_unittest.cc",
659 "formats/mp4/sample_to_group_iterator_unittest.cc",
660 "formats/mp4/track_run_iterator_unittest.cc",
661 "formats/mpeg/adts_stream_parser_unittest.cc",
662 "formats/mpeg/mpeg1_audio_stream_parser_unittest.cc",
664 if (media_use_ffmpeg) {
666 "filters/ffmpeg_aac_bitstream_converter_unittest.cc",
667 "filters/ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc",
672 if (is_mac || is_ios) {
673 deps += [ "//media/base/mac" ]
678 [ "capture/video/mac/video_capture_device_factory_mac_unittest.mm" ]
682 # # Needed by media_drm_bridge.cc.
686 configs += [ ":media_config" ]
688 if (media_use_ffmpeg) {
689 deps += [ "//third_party/ffmpeg" ] # Direct dependency required to inherit config.
693 test("media_perftests") {
694 configs += [ ":media_config" ]
697 ":shared_memory_support",
699 "//base/test:test_support",
700 "//media/audio:test_support",
701 "//media/base:perftests",
702 "//media/base:test_support",
703 "//media/test:pipeline_integration_perftests",
707 "//third_party/widevine/cdm:version_h",
708 "//ui/gfx:test_support",
711 deps += [ "//ui/gl" ]
712 isolate_file = "media_perftests.isolate"
714 if (media_use_ffmpeg) {
715 deps += [ "//third_party/ffmpeg" ] # Direct dependency required to inherit config.
719 # For running the subset of media_unittests that might require audio hardware
720 # separately on GPU bots. media_unittests includes these too.
721 test("audio_unittests") {
723 "base/run_all_unittests.cc",
727 "//base/test:test_support",
728 "//media/audio:unittests",
729 "//ui/gfx:test_support",
733 source_set("test_support") {
736 "renderers/mock_gpu_video_accelerator_factories.cc",
737 "renderers/mock_gpu_video_accelerator_factories.h",
738 "video/mock_video_decode_accelerator.cc",
739 "video/mock_video_decode_accelerator.h",
743 ":shared_memory_support",
751 # TODO(dalecurtis): How to split this across audio/base directories??
752 component("shared_memory_support") {
754 "audio/audio_parameters.cc",
755 "audio/audio_parameters.h",
758 "base/channel_layout.cc",
759 "base/channel_layout.h",
761 "base/media_export.h",
762 "base/vector_math.cc",
763 "base/vector_math.h",
767 ":media_implementation",
774 if (media_use_ffmpeg) {
775 test("ffmpeg_regression_tests") {
777 "base/run_all_unittests.cc",
778 "ffmpeg/ffmpeg_regression_tests.cc",
781 configs += [ "//media:media_config" ]
784 "//base/test:test_support",
786 "//media:test_support",
787 "//media/audio:test_support",
788 "//media/base:test_support",
789 "//media/test:pipeline_integration_tests",
792 "//third_party/ffmpeg",
794 "//ui/gfx:test_support",