add widevine .sig
This commit is contained in:
parent
e6d2575bb6
commit
5e64a609eb
7 changed files with 125 additions and 6 deletions
|
@ -60,6 +60,7 @@ bundle_widevine_cdm = true
|
|||
# enable_widevine_cdm_component = true
|
||||
# enable_media_foundation_widevine_cdm = true
|
||||
enable_cdm_host_verification = false
|
||||
enable_widevine_cdm_host_verification = true
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
|
|
|
@ -58,6 +58,7 @@ bundle_widevine_cdm = true
|
|||
# enable_widevine_cdm_component = true
|
||||
# enable_media_foundation_widevine_cdm = true
|
||||
enable_cdm_host_verification = false
|
||||
enable_widevine_cdm_host_verification = true
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
|
|
|
@ -58,6 +58,7 @@ bundle_widevine_cdm = true
|
|||
# enable_widevine_cdm_component = true
|
||||
# enable_media_foundation_widevine_cdm = true
|
||||
enable_cdm_host_verification = false
|
||||
enable_widevine_cdm_host_verification = true
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
|
|
|
@ -32,7 +32,6 @@ chrome_pwa_launcher.exe: %(VersionDir)s\
|
|||
chrome_wer.dll: %(VersionDir)s\
|
||||
thorium_shell.exe: %(VersionDir)s\
|
||||
thorium_shell.ico: %(VersionDir)s\
|
||||
thorium_shell.png: %(VersionDir)s\
|
||||
content_resources.pak: %(VersionDir)s\
|
||||
content_shell.pak: %(VersionDir)s\
|
||||
d3dcompiler_47.dll: %(VersionDir)s\
|
||||
|
|
117
src/third_party/widevine/cdm/BUILD.gn
vendored
Normal file
117
src/third_party/widevine/cdm/BUILD.gn
vendored
Normal file
|
@ -0,0 +1,117 @@
|
|||
# Copyright 2023 The Chromium Authors and Alex313031
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//build/buildflag_header.gni")
|
||||
import("//build/config/chrome_build.gni")
|
||||
import("//build/config/chromeos/ui_mode.gni")
|
||||
import("//build/config/chromeos/ui_mode.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/toolchain/toolchain.gni")
|
||||
import("//media/media_options.gni")
|
||||
import("//third_party/widevine/cdm/widevine.gni")
|
||||
|
||||
if (bundle_widevine_cdm) {
|
||||
import("//media/cdm/library_cdm/cdm_paths.gni")
|
||||
}
|
||||
|
||||
assert(!bundle_widevine_cdm || (enable_widevine && enable_library_cdms))
|
||||
|
||||
buildflag_header("buildflags") {
|
||||
header = "buildflags.h"
|
||||
|
||||
flags = [
|
||||
"ENABLE_WIDEVINE=$enable_widevine",
|
||||
"BUNDLE_WIDEVINE_CDM=$bundle_widevine_cdm",
|
||||
"ENABLE_WIDEVINE_CDM_COMPONENT=$enable_widevine_cdm_component",
|
||||
"ENABLE_MEDIA_FOUNDATION_WIDEVINE_CDM=$enable_media_foundation_widevine_cdm",
|
||||
]
|
||||
}
|
||||
|
||||
# TODO(xhwang): widevine_cdm_version.h is only used in few places. Clean this up
|
||||
# so we don't need to copy it in most cases.
|
||||
# Also, merge the bundle_widevine_cdm blocks as much as possible.
|
||||
if (bundle_widevine_cdm) {
|
||||
widevine_arch = target_cpu
|
||||
|
||||
widevine_cdm_root = "${widevine_root}/${target_os}/${widevine_arch}"
|
||||
cdm_file_name = "${shlib_prefix}widevinecdm${shlib_extension}"
|
||||
|
||||
widevine_cdm_version_h_file = "${widevine_cdm_root}/widevine_cdm_version.h"
|
||||
widevine_cdm_binary_files = [ "${widevine_cdm_root}/${cdm_file_name}" ]
|
||||
widevine_cdm_manifest_and_license_files = [
|
||||
"${widevine_cdm_root}/manifest.json",
|
||||
"../LICENSE",
|
||||
]
|
||||
|
||||
if (enable_widevine_cdm_host_verification) {
|
||||
assert(target_os == "win" || is_mac)
|
||||
widevine_cdm_binary_files += [ "${widevine_cdm_root}/${cdm_file_name}.sig" ]
|
||||
widevine_cdm_binary_files += [ "${widevine_cdm_root}/${cdm_file_name}.lib" ]
|
||||
}
|
||||
} else {
|
||||
# The CDM is not bundled. Use the default file.
|
||||
widevine_cdm_version_h_file = "widevine_cdm_version.h"
|
||||
}
|
||||
|
||||
copy("version_h") {
|
||||
visibility = [ ":*" ] # Depend on ":headers" instead.
|
||||
sources = [ widevine_cdm_version_h_file ]
|
||||
|
||||
# TODO(brettw) this should go into target_out_dir and callers should include
|
||||
# it from there. This requires, however, renaming the default
|
||||
# widevine_cdm_version.h in this directory to avoid conflicts.
|
||||
outputs = [ "${root_gen_dir}/widevine_cdm_version.h" ]
|
||||
}
|
||||
|
||||
source_set("headers") {
|
||||
public = [ "widevine_cdm_common.h" ]
|
||||
|
||||
public_deps = [
|
||||
":buildflags",
|
||||
":version_h", # Forward permission to use version header.
|
||||
"//base",
|
||||
]
|
||||
}
|
||||
|
||||
if (bundle_widevine_cdm) {
|
||||
copy("widevine_cdm_manifest_and_license") {
|
||||
sources = widevine_cdm_manifest_and_license_files
|
||||
outputs = [ "${root_out_dir}/WidevineCdm/{{source_file_part}}" ]
|
||||
}
|
||||
|
||||
copy("widevine_cdm_binary") {
|
||||
sources = widevine_cdm_binary_files
|
||||
outputs = [ "${root_out_dir}/${widevine_cdm_path}/{{source_file_part}}" ]
|
||||
|
||||
# TODO(jrummell)
|
||||
# 'COPY_PHASE_STRIP': 'NO',
|
||||
}
|
||||
|
||||
group("cdm") {
|
||||
# Needed at run time by tests, e.g. swarming tests to generate isolate.
|
||||
# See https://crbug.com/824493 for context.
|
||||
data_deps = [
|
||||
":widevine_cdm_binary",
|
||||
":widevine_cdm_manifest_and_license",
|
||||
]
|
||||
|
||||
# Needed at build time e.g. for mac bundle (//chrome:chrome_framework).
|
||||
public_deps = [
|
||||
":widevine_cdm_binary",
|
||||
":widevine_cdm_manifest_and_license",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
group("cdm") {
|
||||
# NOP
|
||||
}
|
||||
}
|
||||
|
||||
# This target exists for tests to depend on that pulls in a runtime dependency
|
||||
# on the license server.
|
||||
group("widevine_test_license_server") {
|
||||
if (bundle_widevine_cdm && (is_linux || is_chromeos)) {
|
||||
data = [ "//third_party/widevine/test/license_server/" ]
|
||||
}
|
||||
}
|
9
src/third_party/widevine/cdm/widevine.gni
vendored
9
src/third_party/widevine/cdm/widevine.gni
vendored
|
@ -60,12 +60,11 @@ declare_args() {
|
|||
widevine_root = "."
|
||||
}
|
||||
|
||||
# Enable Widevine CDM host verification, which will sign additional binaries
|
||||
# with Widevine certs and copy signature files as needed.
|
||||
enable_widevine_cdm_host_verification =
|
||||
enable_library_widevine_cdm && enable_cdm_host_verification
|
||||
|
||||
declare_args() {
|
||||
# Enable Widevine CDM host verification, which will sign additional binaries
|
||||
# with Widevine certs and copy signature files as needed.
|
||||
enable_widevine_cdm_host_verification = false
|
||||
|
||||
# If set, and Widevine CDM host verification signing failed due to no signing
|
||||
# cert, the failure will be ignored. Otherwise the build process will fail.
|
||||
# Set to false by default for official build to catch missing cert error.
|
||||
|
|
|
@ -58,6 +58,7 @@ bundle_widevine_cdm = true
|
|||
# enable_widevine_cdm_component = true
|
||||
# enable_media_foundation_widevine_cdm = true
|
||||
enable_cdm_host_verification = false
|
||||
enable_widevine_cdm_host_verification = true
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
|
|
Loading…
Reference in a new issue