This repository has been archived by the owner on Apr 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
ffmpeg_options.gni
62 lines (53 loc) · 2.06 KB
/
ffmpeg_options.gni
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
61
62
# 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.
import("//build/config/arm.gni")
import("//build/config/chrome_build.gni")
import("//build/config/chromecast_build.gni")
import("//build/config/sanitizers/sanitizers.gni")
if (is_chrome_branded) {
_default_ffmpeg_branding = "Chrome"
} else {
_default_ffmpeg_branding = "Chromium"
}
if (is_chromeos) {
_default_ffmpeg_branding = _default_ffmpeg_branding + "OS"
}
if (is_chromecast && !is_android) {
# TODO(alokp): What audio codecs does Chromecast want here? Sort
# out and add configs if necessary. http://crbug.com/570754
_default_ffmpeg_branding = "ChromeOS"
}
declare_args() {
# Controls whether we build the Chromium or Google Chrome version of FFmpeg.
# The Google Chrome version contains additional codecs. Typical values are
# Chromium, Chrome, ChromiumOS, and ChromeOS.
ffmpeg_branding = _default_ffmpeg_branding
# Set true to build ffmpeg as a shared library. NOTE: this means we should
# always consult is_component_ffmpeg instead of is_component_build for
# ffmpeg targets. This helps linux chromium packagers that swap out our
# ffmpeg.so with their own. See discussion here
# https://groups.google.com/a/chromium.org/forum/#!msg/chromium-packagers/R5rcZXWxBEQ/B6k0zzmJbvcJ
is_component_ffmpeg = is_component_build
}
assert(ffmpeg_branding == "Chromium" ||
ffmpeg_branding == "Chrome" ||
ffmpeg_branding == "ChromiumOS" ||
ffmpeg_branding == "ChromeOS")
if (current_cpu == "x86") {
ffmpeg_arch = "ia32"
} else if (current_cpu == "arm" && arm_version == 7 && arm_use_neon) {
ffmpeg_arch = "arm-neon"
} else {
ffmpeg_arch = current_cpu
}
# Android ia32 can't handle textrels and ffmpeg can't compile without them.
# http://crbug.com/559379
disable_ffmpeg_asm = is_android && current_cpu == "x86"
os_config = current_os
if ((is_linux || is_chromeos) && is_msan) {
os_config = "linux-noasm"
disable_ffmpeg_asm = true
} else if (is_chromeos) {
os_config = "linux"
}