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 source_set("filters") {
9 # Do not expand the visibility here without double-checking with OWNERS, this
10 # is a roll-up target which is part of the //media component. Most other DEPs
11 # should be using //media and not directly DEP this roll-up target.
14 "//media/fuchsia/audio",
21 "audio_renderer_algorithm.cc",
22 "audio_renderer_algorithm.h",
23 "audio_timestamp_validator.cc",
24 "audio_timestamp_validator.h",
27 "decoder_selector.cc",
31 "decoder_stream_traits.cc",
32 "decoder_stream_traits.h",
33 "decrypting_audio_decoder.cc",
34 "decrypting_audio_decoder.h",
35 "decrypting_demuxer_stream.cc",
36 "decrypting_demuxer_stream.h",
37 "decrypting_media_resource.cc",
38 "decrypting_media_resource.h",
39 "decrypting_video_decoder.cc",
40 "decrypting_video_decoder.h",
41 "file_data_source.cc",
43 "frame_buffer_pool.cc",
44 "frame_buffer_pool.h",
47 "memory_data_source.cc",
48 "memory_data_source.h",
49 "offloading_video_decoder.cc",
50 "offloading_video_decoder.h",
51 "pipeline_controller.cc",
52 "pipeline_controller.h",
53 "source_buffer_parse_warnings.h",
54 "source_buffer_range.cc",
55 "source_buffer_range.h",
56 "source_buffer_state.cc",
57 "source_buffer_state.h",
58 "source_buffer_stream.cc",
59 "source_buffer_stream.h",
60 "stream_parser_factory.cc",
61 "stream_parser_factory.h",
62 "video_cadence_estimator.cc",
63 "video_cadence_estimator.h",
64 "video_renderer_algorithm.cc",
65 "video_renderer_algorithm.h",
66 "vp9_bool_decoder.cc",
68 "vp9_compressed_header_parser.cc",
69 "vp9_compressed_header_parser.h",
72 "vp9_raw_bits_reader.cc",
73 "vp9_raw_bits_reader.h",
74 "vp9_uncompressed_header_parser.cc",
75 "vp9_uncompressed_header_parser.h",
80 configs += [ "//media:subcomponent_config" ]
84 "//build:chromeos_buildflags",
85 "//cc/base", # For MathUtil.
86 "//media:media_buildflags",
91 "//third_party/libyuv",
92 "//ui/gfx/geometry:geometry",
97 if (proprietary_codecs) {
99 "h264_to_annex_b_bitstream_converter.cc",
100 "h264_to_annex_b_bitstream_converter.h",
103 if (enable_platform_hevc) {
105 "h265_to_annex_b_bitstream_converter.cc",
106 "h265_to_annex_b_bitstream_converter.h",
111 if (media_use_ffmpeg) {
114 "//third_party/ffmpeg",
115 "//third_party/ffmpeg:ffmpeg_features",
116 "//third_party/opus",
119 "audio_file_reader.cc",
120 "audio_file_reader.h",
121 "audio_video_metadata_extractor.cc",
122 "audio_video_metadata_extractor.h",
123 "blocking_url_protocol.cc",
124 "blocking_url_protocol.h",
125 "ffmpeg_audio_decoder.cc",
126 "ffmpeg_audio_decoder.h",
127 "ffmpeg_bitstream_converter.h",
132 "in_memory_url_protocol.cc",
133 "in_memory_url_protocol.h",
134 "media_file_checker.cc",
135 "media_file_checker.h",
139 if (media_use_libvpx) {
141 "vpx_video_decoder.cc",
142 "vpx_video_decoder.h",
144 deps += [ "//third_party/libvpx" ]
147 if (enable_dav1d_decoder) {
149 "dav1d_video_decoder.cc",
150 "dav1d_video_decoder.h",
152 deps += [ "//third_party/dav1d" ]
155 if (enable_libgav1_decoder) {
157 "gav1_video_decoder.cc",
158 "gav1_video_decoder.h",
160 deps += [ "//third_party/libgav1" ]
163 if (media_use_ffmpeg) {
164 if (proprietary_codecs) {
166 "ffmpeg_aac_bitstream_converter.cc",
167 "ffmpeg_aac_bitstream_converter.h",
168 "ffmpeg_h264_to_annex_b_bitstream_converter.cc",
169 "ffmpeg_h264_to_annex_b_bitstream_converter.h",
172 if (enable_platform_hevc) {
174 "ffmpeg_h265_to_annex_b_bitstream_converter.cc",
175 "ffmpeg_h265_to_annex_b_bitstream_converter.h",
180 if (enable_ffmpeg_video_decoders) {
182 "ffmpeg_video_decoder.cc",
183 "ffmpeg_video_decoder.h",
189 "android/video_frame_extractor.cc",
190 "android/video_frame_extractor.h",
197 "decrypting_audio_decoder.cc",
198 "decrypting_audio_decoder.h",
199 "decrypting_video_decoder.cc",
200 "decrypting_video_decoder.h",
203 "android/media_codec_audio_decoder.cc",
204 "android/media_codec_audio_decoder.h",
206 deps += [ "//media/base/android" ]
211 "mac/audio_toolbox_audio_decoder.cc",
212 "mac/audio_toolbox_audio_decoder.h",
213 "mac/audio_toolbox_audio_encoder.cc",
214 "mac/audio_toolbox_audio_encoder.h",
217 if (is_win && enable_platform_dts_audio) {
219 "passthrough_dts_audio_decoder.cc",
220 "passthrough_dts_audio_decoder.h",
225 "win/media_foundation_utils.cc",
226 "win/media_foundation_utils.h",
228 deps += [ "//media/base/win:media_foundation_util" ]
229 if (enable_platform_dts_audio) {
231 "win/media_foundation_audio_decoder.cc",
232 "win/media_foundation_audio_decoder.h",
235 "/DELAYLOAD:packages/Microsoft.VCRTForwarders.140.1.0.6/runtimes/win10-x64/native/release/concrt140_app.dll",
236 "/DELAYLOAD:packages/Microsoft.VCRTForwarders.140.1.0.6/runtimes/win10-x64/native/release/msvcp140_1_app.dll",
237 "/DELAYLOAD:packages/Microsoft.VCRTForwarders.140.1.0.6/runtimes/win10-x64/native/release/msvcp140_2_app.dll",
238 "/DELAYLOAD:packages/Microsoft.VCRTForwarders.140.1.0.6/runtimes/win10-x64/native/release/msvcp140_app.dll",
239 "/DELAYLOAD:packages/Microsoft.VCRTForwarders.140.1.0.6/runtimes/win10-x64/native/release/vcamp140_app.dll",
240 "/DELAYLOAD:packages/Microsoft.VCRTForwarders.140.1.0.6/runtimes/win10-x64/native/release/vccorlib140_app.dll",
241 "/DELAYLOAD:packages/Microsoft.VCRTForwarders.140.1.0.6/runtimes/win10-x64/native/release/vcomp140_app.dll",
242 "/DELAYLOAD:packages/Microsoft.VCRTForwarders.140.1.0.6/runtimes/win10-x64/native/release/vcruntime140_app.dll",
249 "h264_bitstream_buffer.cc",
250 "h264_bitstream_buffer.h",
255 source_set("perftests") {
259 if (media_use_ffmpeg) {
260 sources += [ "demuxer_perftest.cc" ]
263 configs += [ "//media:media_config" ]
266 "//base/test:test_support",
267 "//media:test_support",
274 static_library("test_support") {
276 visibility = [ "//media:test_support" ]
279 "fake_video_decoder.cc",
280 "fake_video_decoder.h",
286 "//base/test:test_support",
287 "//media/base:test_support",
291 source_set("unit_tests") {
294 "audio_clock_unittest.cc",
295 "audio_decoder_stream_unittest.cc",
296 "audio_renderer_algorithm_unittest.cc",
297 "audio_timestamp_validator_unittest.cc",
298 "chunk_demuxer_unittest.cc",
299 "decoder_selector_unittest.cc",
300 "decrypting_audio_decoder_unittest.cc",
301 "decrypting_demuxer_stream_unittest.cc",
302 "decrypting_media_resource_unittest.cc",
303 "decrypting_video_decoder_unittest.cc",
304 "fake_video_decoder_unittest.cc",
305 "file_data_source_unittest.cc",
306 "frame_buffer_pool_unittest.cc",
307 "frame_processor_unittest.cc",
308 "ivf_parser_unittest.cc",
309 "memory_data_source_unittest.cc",
310 "offloading_video_decoder_unittest.cc",
311 "pipeline_controller_unittest.cc",
312 "source_buffer_state_unittest.cc",
313 "source_buffer_stream_unittest.cc",
314 "video_cadence_estimator_unittest.cc",
315 "video_decoder_stream_unittest.cc",
316 "video_renderer_algorithm_unittest.cc",
317 "vp9_parser_unittest.cc",
318 "vp9_raw_bits_reader_unittest.cc",
319 "vp9_uncompressed_header_parser_unittest.cc",
323 "//base/test:test_support",
324 "//build:chromeos_buildflags",
325 "//media:test_support",
328 "//ui/gfx:test_support",
332 sources += [ "android/video_frame_extractor_unittest.cc" ]
334 "decrypting_audio_decoder_unittest.cc",
335 "decrypting_video_decoder_unittest.cc",
338 deps += [ "//ui/gl" ]
341 # libvpx for running vpx test on chromecast doesn't support high bit depth.
342 # This may cause some unit tests failure. See b/65382374 for further context.
344 defines = [ "LIBVPX_NO_HIGH_BIT_DEPTH" ]
347 if (media_use_ffmpeg) {
349 "audio_decoder_unittest.cc",
350 "audio_file_reader_unittest.cc",
351 "blocking_url_protocol_unittest.cc",
352 "ffmpeg_demuxer_unittest.cc",
353 "ffmpeg_glue_unittest.cc",
354 "in_memory_url_protocol_unittest.cc",
358 # Direct dependency needed for the config
359 "//third_party/opus",
362 # Even if FFmpeg is enabled on Android we don't want these.
363 # TODO(watk): Refactor tests that could be made to run on Android.
366 "audio_video_metadata_extractor_unittest.cc",
367 "media_file_checker_unittest.cc",
371 if (enable_ffmpeg_video_decoders) {
372 sources += [ "ffmpeg_video_decoder_unittest.cc" ]
376 if (media_use_libvpx) {
377 sources += [ "vpx_video_decoder_unittest.cc" ]
380 if (enable_dav1d_decoder) {
381 sources += [ "dav1d_video_decoder_unittest.cc" ]
384 if (enable_libgav1_decoder) {
385 sources += [ "gav1_video_decoder_unittest.cc" ]
389 sources += [ "h264_bitstream_buffer_unittest.cc" ]
392 if (proprietary_codecs) {
393 sources += [ "h264_to_annex_b_bitstream_converter_unittest.cc" ]
395 if (enable_platform_hevc) {
396 sources += [ "h265_to_annex_b_bitstream_converter_unittest.cc" ]
399 if (media_use_ffmpeg) {
401 "ffmpeg_aac_bitstream_converter_unittest.cc",
402 "ffmpeg_h264_to_annex_b_bitstream_converter_unittest.cc",
407 if (media_use_ffmpeg) {
408 # Direct dependency required to inherit config.
409 deps += [ "//third_party/ffmpeg" ]