1 # Copyright 2017 The Chromium Authors
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//media/gpu/args.gni")
6 import("//media/media_options.gni")
8 if (tizen_multimedia) {
9 import("//tizen_src/chromium_impl/media/media_efl.gni")
12 source_set("filters") {
13 # Do not expand the visibility here without double-checking with OWNERS, this
14 # is a roll-up target which is part of the //media component. Most other DEPs
15 # should be using //media and not directly DEP this roll-up target.
18 "//media/fuchsia/audio",
25 "audio_renderer_algorithm.cc",
26 "audio_renderer_algorithm.h",
27 "audio_timestamp_validator.cc",
28 "audio_timestamp_validator.h",
31 "decoder_selector.cc",
35 "decoder_stream_traits.cc",
36 "decoder_stream_traits.h",
37 "decrypting_audio_decoder.cc",
38 "decrypting_audio_decoder.h",
39 "decrypting_demuxer_stream.cc",
40 "decrypting_demuxer_stream.h",
41 "decrypting_media_resource.cc",
42 "decrypting_media_resource.h",
43 "decrypting_video_decoder.cc",
44 "decrypting_video_decoder.h",
47 "file_data_source.cc",
49 "frame_buffer_pool.cc",
50 "frame_buffer_pool.h",
53 "memory_data_source.cc",
54 "memory_data_source.h",
55 "offloading_video_decoder.cc",
56 "offloading_video_decoder.h",
57 "pipeline_controller.cc",
58 "pipeline_controller.h",
59 "source_buffer_parse_warnings.h",
60 "source_buffer_range.cc",
61 "source_buffer_range.h",
62 "source_buffer_state.cc",
63 "source_buffer_state.h",
64 "source_buffer_stream.cc",
65 "source_buffer_stream.h",
66 "stream_parser_factory.cc",
67 "stream_parser_factory.h",
68 "video_cadence_estimator.cc",
69 "video_cadence_estimator.h",
70 "video_renderer_algorithm.cc",
71 "video_renderer_algorithm.h",
72 "vp9_bool_decoder.cc",
74 "vp9_compressed_header_parser.cc",
75 "vp9_compressed_header_parser.h",
78 "vp9_raw_bits_reader.cc",
79 "vp9_raw_bits_reader.h",
80 "vp9_uncompressed_header_parser.cc",
81 "vp9_uncompressed_header_parser.h",
86 configs += [ "//media:subcomponent_config" ]
90 "//build:chromeos_buildflags",
91 "//cc/base", # For MathUtil.
92 "//media:media_buildflags",
97 "//third_party/libyuv",
98 "//ui/gfx/geometry:geometry",
103 if (proprietary_codecs) {
105 "h264_to_annex_b_bitstream_converter.cc",
106 "h264_to_annex_b_bitstream_converter.h",
109 if (enable_platform_hevc) {
111 "h265_to_annex_b_bitstream_converter.cc",
112 "h265_to_annex_b_bitstream_converter.h",
117 if (media_use_ffmpeg) {
120 "//third_party/ffmpeg",
121 "//third_party/ffmpeg:ffmpeg_features",
122 "//third_party/opus",
125 "audio_file_reader.cc",
126 "audio_file_reader.h",
127 "audio_video_metadata_extractor.cc",
128 "audio_video_metadata_extractor.h",
129 "blocking_url_protocol.cc",
130 "blocking_url_protocol.h",
131 "ffmpeg_audio_decoder.cc",
132 "ffmpeg_audio_decoder.h",
133 "ffmpeg_bitstream_converter.h",
138 "in_memory_url_protocol.cc",
139 "in_memory_url_protocol.h",
140 "media_file_checker.cc",
141 "media_file_checker.h",
145 if (media_use_libvpx) {
147 "vpx_video_decoder.cc",
148 "vpx_video_decoder.h",
150 deps += [ "//third_party/libvpx" ]
153 if (enable_dav1d_decoder) {
155 "dav1d_video_decoder.cc",
156 "dav1d_video_decoder.h",
158 deps += [ "//third_party/dav1d" ]
161 if (media_use_ffmpeg) {
162 if (proprietary_codecs) {
164 "ffmpeg_aac_bitstream_converter.cc",
165 "ffmpeg_aac_bitstream_converter.h",
166 "ffmpeg_h264_to_annex_b_bitstream_converter.cc",
167 "ffmpeg_h264_to_annex_b_bitstream_converter.h",
170 if (enable_platform_hevc) {
172 "ffmpeg_h265_to_annex_b_bitstream_converter.cc",
173 "ffmpeg_h265_to_annex_b_bitstream_converter.h",
178 if (enable_ffmpeg_video_decoders) {
180 "ffmpeg_video_decoder.cc",
181 "ffmpeg_video_decoder.h",
187 "android/video_frame_extractor.cc",
188 "android/video_frame_extractor.h",
195 "decrypting_audio_decoder.cc",
196 "decrypting_audio_decoder.h",
197 "decrypting_video_decoder.cc",
198 "decrypting_video_decoder.h",
201 "android/media_codec_audio_decoder.cc",
202 "android/media_codec_audio_decoder.h",
204 deps += [ "//media/base/android" ]
209 "mac/audio_toolbox_audio_decoder.cc",
210 "mac/audio_toolbox_audio_decoder.h",
211 "mac/audio_toolbox_audio_encoder.cc",
212 "mac/audio_toolbox_audio_encoder.h",
214 deps += [ "//media/base/mac" ]
216 if (is_win && enable_platform_dts_audio) {
218 "passthrough_dts_audio_decoder.cc",
219 "passthrough_dts_audio_decoder.h",
224 "win/media_foundation_audio_decoder.cc",
225 "win/media_foundation_audio_decoder.h",
227 deps += [ "//media/base/win:media_foundation_util" ]
228 if (enable_platform_dts_audio) {
230 "/DELAYLOAD:packages/Microsoft.VCRTForwarders.140.1.0.6/runtimes/win10-x64/native/release/concrt140_app.dll",
231 "/DELAYLOAD:packages/Microsoft.VCRTForwarders.140.1.0.6/runtimes/win10-x64/native/release/msvcp140_1_app.dll",
232 "/DELAYLOAD:packages/Microsoft.VCRTForwarders.140.1.0.6/runtimes/win10-x64/native/release/msvcp140_2_app.dll",
233 "/DELAYLOAD:packages/Microsoft.VCRTForwarders.140.1.0.6/runtimes/win10-x64/native/release/msvcp140_app.dll",
234 "/DELAYLOAD:packages/Microsoft.VCRTForwarders.140.1.0.6/runtimes/win10-x64/native/release/vcamp140_app.dll",
235 "/DELAYLOAD:packages/Microsoft.VCRTForwarders.140.1.0.6/runtimes/win10-x64/native/release/vccorlib140_app.dll",
236 "/DELAYLOAD:packages/Microsoft.VCRTForwarders.140.1.0.6/runtimes/win10-x64/native/release/vcomp140_app.dll",
237 "/DELAYLOAD:packages/Microsoft.VCRTForwarders.140.1.0.6/runtimes/win10-x64/native/release/vcruntime140_app.dll",
244 "h264_bitstream_buffer.cc",
245 "h264_bitstream_buffer.h",
249 if (enable_hls_demuxer) {
251 "hls_codec_detector.cc",
252 "hls_codec_detector.h",
253 "hls_data_source_provider.cc",
254 "hls_data_source_provider.h",
255 "hls_demuxer_status.h",
256 "hls_live_rendition.cc",
257 "hls_live_rendition.h",
258 "hls_manifest_demuxer_engine.cc",
259 "hls_manifest_demuxer_engine.h",
262 "hls_vod_rendition.cc",
263 "hls_vod_rendition.h",
264 "manifest_demuxer.cc",
265 "manifest_demuxer.h",
269 if (tizen_multimedia) {
270 configs += external_media_video_decode_config
271 sources += external_media_video_decode_sources
275 source_set("perftests") {
279 if (media_use_ffmpeg) {
280 sources += [ "demuxer_perftest.cc" ]
283 configs += [ "//media:media_config" ]
286 "//base/test:test_support",
287 "//media:test_support",
294 static_library("test_support") {
296 visibility = [ "//media:test_support" ]
299 "fake_video_decoder.cc",
300 "fake_video_decoder.h",
306 "//base/test:test_support",
307 "//media/base:test_support",
311 source_set("unit_tests") {
314 "audio_clock_unittest.cc",
315 "audio_decoder_stream_unittest.cc",
316 "audio_renderer_algorithm_unittest.cc",
317 "audio_timestamp_validator_unittest.cc",
318 "chunk_demuxer_unittest.cc",
319 "decoder_selector_unittest.cc",
320 "decrypting_audio_decoder_unittest.cc",
321 "decrypting_demuxer_stream_unittest.cc",
322 "decrypting_media_resource_unittest.cc",
323 "decrypting_video_decoder_unittest.cc",
324 "fake_video_decoder_unittest.cc",
325 "file_data_source_unittest.cc",
326 "frame_buffer_pool_unittest.cc",
327 "frame_processor_unittest.cc",
328 "ivf_parser_unittest.cc",
329 "memory_data_source_unittest.cc",
330 "offloading_video_decoder_unittest.cc",
331 "pipeline_controller_unittest.cc",
332 "source_buffer_state_unittest.cc",
333 "source_buffer_stream_unittest.cc",
334 "video_cadence_estimator_unittest.cc",
335 "video_decoder_stream_unittest.cc",
336 "video_renderer_algorithm_unittest.cc",
337 "vp9_parser_unittest.cc",
338 "vp9_raw_bits_reader_unittest.cc",
339 "vp9_uncompressed_header_parser_unittest.cc",
343 "//base/test:test_support",
344 "//build:chromeos_buildflags",
345 "//media:test_support",
348 "//ui/gfx:test_support",
352 sources += [ "android/video_frame_extractor_unittest.cc" ]
354 "decrypting_audio_decoder_unittest.cc",
355 "decrypting_video_decoder_unittest.cc",
358 deps += [ "//ui/gl" ]
361 # libvpx for running vpx test on chromecast doesn't support high bit depth.
362 # This may cause some unit tests failure. See b/65382374 for further context.
364 defines = [ "LIBVPX_NO_HIGH_BIT_DEPTH" ]
367 if (media_use_ffmpeg) {
369 "audio_decoder_unittest.cc",
370 "audio_file_reader_unittest.cc",
371 "blocking_url_protocol_unittest.cc",
372 "ffmpeg_demuxer_unittest.cc",
373 "ffmpeg_glue_unittest.cc",
374 "in_memory_url_protocol_unittest.cc",
378 # Direct dependency needed for the config
379 "//third_party/opus",
382 # Even if FFmpeg is enabled on Android we don't want these.
383 # TODO(watk): Refactor tests that could be made to run on Android.
386 "audio_video_metadata_extractor_unittest.cc",
387 "media_file_checker_unittest.cc",
391 if (enable_ffmpeg_video_decoders && proprietary_codecs) {
392 sources += [ "ffmpeg_video_decoder_unittest.cc" ]
396 if (media_use_libvpx) {
397 sources += [ "vpx_video_decoder_unittest.cc" ]
400 if (enable_dav1d_decoder) {
401 sources += [ "dav1d_video_decoder_unittest.cc" ]
405 sources += [ "h264_bitstream_buffer_unittest.cc" ]
408 if (proprietary_codecs) {
409 sources += [ "h264_to_annex_b_bitstream_converter_unittest.cc" ]
411 if (enable_platform_hevc) {
412 sources += [ "h265_to_annex_b_bitstream_converter_unittest.cc" ]
415 if (media_use_ffmpeg) {
417 "ffmpeg_aac_bitstream_converter_unittest.cc",
418 "ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc",
423 if (enable_hls_demuxer) {
425 "hls_codec_detector_unittest.cc",
426 "hls_data_source_provider_unittest.cc",
427 "hls_live_rendition_unittest.cc",
428 "hls_manifest_demuxer_engine_unittest.cc",
429 "hls_test_helpers.cc",
430 "hls_test_helpers.h",
431 "hls_vod_rendition_unittest.cc",
432 "manifest_demuxer_unittest.cc",
436 if (media_use_ffmpeg) {
437 # Direct dependency required to inherit config.
438 deps += [ "//third_party/ffmpeg" ]