Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / media / media_options.gni
blob1f3f64438e1030b626d97863070d99f579d28a9b
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/chromecast_build.gni")
7 declare_args() {
8   # Allows distributions to link pulseaudio directly (DT_NEEDED) instead of
9   # using dlopen. This helps with automated detection of ABI mismatches and
10   # prevents silent errors.
11   link_pulseaudio = false
13   # Enable usage of FFmpeg within the media library. Used for most software
14   # based decoding, demuxing, and sometimes optimized FFTs. If disabled,
15   # implementors must provide their own demuxers and decoders.
16   media_use_ffmpeg = true
18   # Enable usage of libvpx within the media library. Used for software based
19   # decoding of VP9 and VP8A type content.
20   media_use_libvpx = true
22   # Enable libwebm for multiplexing video and audio for JS recording API.
23   media_use_libwebm = true
25   # Neither Android nor iOS use ffmpeg, libvpx nor libwebm.
26   if (is_android || is_ios) {
27     media_use_ffmpeg = false
28     media_use_libvpx = false
29     media_use_libwebm = false
30   }
32   # Override to dynamically link the cras (ChromeOS audio) library.
33   use_cras = false
35   # Enables runtime selection of PulseAudio library.
36   use_pulseaudio = false
38   # Enables runtime selection of ALSA library for audio.
39   use_alsa = false
41   # Alsa should be used on non-Android, non-Mac POSIX systems, and Chromecast
42   # builds for desktop Linux.
43   if ((is_posix && !is_android && !is_mac) ||
44       (is_chromecast && target_cpu != "arm" && is_linux)) {
45     use_alsa = true
46     if (!use_cras) {
47       use_pulseaudio = true
48     }
49   }
51   # Use low-memory buffers on non-Android builds of Chromecast.
52   use_low_memory_buffer = is_chromecast && !is_android
54   # Enables the MPEG2-TS stream parser for use with Media Source. Disabled by
55   # default (except on Chromecast) since it's not available on the normal Web
56   # Platform and costs money.
57   enable_mpeg2ts_stream_parser = is_chromecast
59   # Enable HEVC/H265 demuxing. Actual decoding must be provided by the
60   # platform. Enable by default for Chromecast.
61   enable_hevc_demuxing = is_chromecast
63   # Experiment to enable mojo media application: http://crbug.com/431776
64   # Valid options are:
65   # - "none": Do not use mojo media application.
66   # - "browser": Use mojo media application hosted in the browser process.
67   # - "utility": Use mojo media application hosted in the utility process.
68   enable_mojo_media = "none"
70   # TODO(GYP): This should be a platform define.
71   is_openbsd = false