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
media / cdm / library_cdm / cdm_paths.gni [blame]
# Copyright 2016 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/chromeos/ui_mode.gni")
import("//media/media_options.gni")
# This file defines output paths for the CDM adapters and CDMs.
assert(enable_library_cdms)
# Naming and folder structure below are following the recommendation for Chrome
# components. Component-updated CDMs must follow the same recommendation.
# OS name for components is close to "target_os" but has some differences.
# Explicitly define what we use to avoid confusion.
if (is_chromeos) {
component_os = "cros"
} else if (is_linux) {
component_os = "linux"
} else if (is_win) {
component_os = "win"
} else if (is_mac) {
component_os = "mac"
} else if (is_fuchsia) {
component_os = "fuchsia"
} else {
assert(false, "unsupported_platform")
}
component_arch = "$current_cpu"
# Enable platform specific paths. This is required when the CDMs are Chrome
# components, but is optional for other platforms.
# Note:
# - |cdm_platform_specific_path| is exported as a BUILDFLAG to cdm_paths.cc.
cdm_platform_specific_path =
"_platform_specific/$component_os" + "_" + "$component_arch"
# Path of Clear Key and Widevine CDMs relative to the output dir.
clearkey_cdm_path = "ClearKeyCdm/$cdm_platform_specific_path"
widevine_cdm_path = "WidevineCdm/$cdm_platform_specific_path"
# Shared libraries must be within lib/ on Fuchsia.
# TODO(fxbug.dev/105910): Remove when the GN SDK drops this limitation.
if (is_fuchsia) {
clearkey_cdm_path = "lib/" + clearkey_cdm_path
widevine_cdm_path = "lib/" + clearkey_cdm_path
}