summaryrefslogtreecommitdiffstats
path: root/media/media_options.gni
blob: f8b1646168897b3eb0fd7c774a355c316130d963 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

declare_args() {
  # Allows distributions to link pulseaudio directly (DT_NEEDED) instead of
  # using dlopen. This helps with automated detection of ABI mismatches and
  # prevents silent errors.
  link_pulseaudio = false

  # Enable usage of FFmpeg within the media library. Used for most software
  # based decoding, demuxing, and sometimes optimized FFTs. If disabled,
  # implementors must provide their own demuxers and decoders.
  media_use_ffmpeg = true

  # Enable usage of libvpx within the media library. Used for software based
  # decoding of VP9 and VP8A type content.
  media_use_libvpx = true

  # Neither Android nor iOS use ffmpeg or libvpx.
  if (is_android || is_ios) {
    media_use_ffmpeg = false
    media_use_libvpx = false
  }

  # Override to dynamically link the cras (ChromeOS audio) library.
  use_cras = false

  # Enables runtime selection of PulseAudio library.
  use_pulseaudio = false

  # Enables runtime selection of ALSA library for audio.
  use_alsa = false

  # TODO(GYP): How to handled the "embedded" use case?
  # Original conditional: (OS=="linux" or OS=="freebsd" or OS=="solaris") and embedded!=1
  if (is_posix && !is_android && !is_mac) {
    use_alsa = true
    if (!use_cras) {
      use_pulseaudio = true
    }
  }

  # Enables the MPEG2-TS stream parser for use with Media Source. Disabled by
  # default since it's not available on the normal Web Platform and costs money.
  enable_mpeg2ts_stream_parser = false

  # Enables browser side Content Decryption Modules. Required for embedders
  # (e.g. Android and ChromeCast) that use a browser side CDM.
  enable_browser_cdms = is_android

  # Experiment to enable mojo based media renderer: http://crbug.com/431776
  enable_media_mojo_renderer = false

  # TODO(GYP): This should be a platform define.
  is_openbsd = false

  # Override to omit code that depends on the X11 and fontconfig libraries.
  is_ensemble = false
}