more widevine fixes

This commit is contained in:
Alexander Frick 2023-07-04 05:52:26 -05:00
parent f2c295f3b6
commit 9fe1ef70d0
24 changed files with 180 additions and 59 deletions

View file

@ -1,9 +1,10 @@
"Google Inc. and its affiliates ("Google") own all legal right, title and
Copyright (c) 2023 Google LLC
Google LLC and its affiliates ("Google") own all legal right, title and
interest in and to the content decryption module software ("Software") and
related documentation, including any intellectual property rights in the
Software. You may not use, modify, sell, or otherwise distribute the Software
without a separate license agreement with Google. The Software is not open
source software.
If you are interested in licensing the Software, please contact
widevine@google.com.
If you are interested in licensing the Software, please contact www.widevine.com

View file

@ -14,7 +14,6 @@
// - WIDEVINE_CDM_VERSION_STRING (with the version of the CDM that's available
// as a string, e.g., "1.0.123.456").
#define WIDEVINE_CDM_AVAILABLE
#define WIDEVINE_CDM_VERSION_STRING "4.10.2252.0"
#endif // WIDEVINE_CDM_VERSION_H_

View file

@ -8,8 +8,8 @@
#
thorium.exe: %(ChromeDir)s\
chrome_proxy.exe: %(ChromeDir)s\
initial_preferences: %(ChromeDir)s\
# initial_preferences file, to show Thorium welcome page on first start
initial_preferences: %(ChromeDir)s\
#
# Chrome version dir assembly manifest.
# The name of this file must match the name of the version dir, so we cannot
@ -35,8 +35,6 @@ content_resources.pak: %(VersionDir)s\
content_shell.pak: %(VersionDir)s\
d3dcompiler_47.dll: %(VersionDir)s\
eventlog_provider.dll: %(VersionDir)s\
ffmpeg.dll: %(VersionDir)s\
initial_preferences: %(VersionDir)s\
icudtl.dat: %(VersionDir)s\
libEGL.dll: %(VersionDir)s\
libGLESv2.dll: %(VersionDir)s\
@ -75,6 +73,18 @@ default_apps\external_extensions.json: %(VersionDir)s\default_apps\
ClearKeyCdm\_platform_specific\win_x64\clearkeycdm.dll: %(VersionDir)s\ClearKeyCdm\_platform_specific\win_x64\
ClearKeyCdm\_platform_specific\win_x86\clearkeycdm.dll: %(VersionDir)s\ClearKeyCdm\_platform_specific\win_x86\
#
# Widevine CDM sub-dir
#
WidevineCdm\manifest.json: %(VersionDir)s\WidevineCdm\
WidevineCdm\LICENSE: %(VersionDir)s\WidevineCdm\
WidevineCdm\_platform_specific\win_x86\widevinecdm.dll: %(VersionDir)s\WidevineCdm\_platform_specific\win_x86\
WidevineCdm\_platform_specific\win_x86\widevinecdm.dll.sig: %(VersionDir)s\WidevineCdm\_platform_specific\win_x86\
WidevineCdm\_platform_specific\win_x64\widevinecdm.dll: %(VersionDir)s\WidevineCdm\_platform_specific\win_x64\
WidevineCdm\_platform_specific\win_x64\widevinecdm.dll.sig: %(VersionDir)s\WidevineCdm\_platform_specific\win_x64\
WidevineCdm\_platform_specific\win_arm64\widevinecdm.dll: %(VersionDir)s\WidevineCdm\_platform_specific\win_arm64\
WidevineCdm\_platform_specific\win_arm64\widevinecdm.dll.sig: %(VersionDir)s\WidevineCdm\_platform_specific\win_arm64\
#
# VisualElements sub-dir.
#
@ -120,18 +130,6 @@ SmallLogoBeta.png: %(VersionDir)s\VisualElements\
SmallLogoCanary.png: %(VersionDir)s\VisualElements\
SmallLogoDev.png: %(VersionDir)s\VisualElements\
#
# Widevine CDM sub-dir
#
WidevineCdm\manifest.json: %(VersionDir)s\WidevineCdm\
WidevineCdm\LICENSE: %(VersionDir)s\WidevineCdm\
WidevineCdm\_platform_specific\win_x86\widevinecdm.dll: %(VersionDir)s\WidevineCdm\_platform_specific\win_x86\
WidevineCdm\_platform_specific\win_x86\widevinecdm.dll.sig: %(VersionDir)s\WidevineCdm\_platform_specific\win_x86\
WidevineCdm\_platform_specific\win_x64\widevinecdm.dll: %(VersionDir)s\WidevineCdm\_platform_specific\win_x64\
WidevineCdm\_platform_specific\win_x64\widevinecdm.dll.sig: %(VersionDir)s\WidevineCdm\_platform_specific\win_x64\
WidevineCdm\_platform_specific\win_arm64\widevinecdm.dll: %(VersionDir)s\WidevineCdm\_platform_specific\win_arm64\
WidevineCdm\_platform_specific\win_arm64\widevinecdm.dll.sig: %(VersionDir)s\WidevineCdm\_platform_specific\win_arm64\
[SNAPSHOTBLOB]
# The snapshot_blob.bin V8 snapshot is needed in builds that don't use
# v8_context_snapshot.bin, such as Linux-Windows cross-builds.

View file

@ -226,8 +226,8 @@ declare_args() {
alternate_cdm_storage_id_key = ""
}
assert(!enable_cdm_host_verification || is_mac || is_win,
"CDM host verification is only supported on Mac and Windows.")
# assert(!enable_cdm_host_verification || is_mac || is_win,
# "CDM host verification is only supported on Mac and Windows.")
# Default |mojo_media_services| and |mojo_media_host| on various platforms. See
# comments below for valid values. Can be overridden by gn build arguments from

115
src/third_party/widevine/cdm/BUILD.gn vendored Normal file
View file

@ -0,0 +1,115 @@
# Copyright 2014 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/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) {
widevine_cdm_binary_files += [ "${widevine_cdm_root}/${cdm_file_name}.sig" ]
}
} 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/" ]
}
}

10
src/third_party/widevine/cdm/LICENSE vendored Normal file
View file

@ -0,0 +1,10 @@
Copyright (c) 2023 Google LLC
Google LLC and its affiliates ("Google") own all legal right, title and
interest in and to the content decryption module software ("Software") and
related documentation, including any intellectual property rights in the
Software. You may not use, modify, sell, or otherwise distribute the Software
without a separate license agreement with Google. The Software is not open
source software.
If you are interested in licensing the Software, please contact www.widevine.com

View file

@ -1,3 +1,5 @@
Copyright (c) 2023 Google LLC
Google LLC and its affiliates ("Google") own all legal right, title and
interest in and to the content decryption module software ("Software") and
related documentation, including any intellectual property rights in the

View file

@ -14,7 +14,6 @@
// - WIDEVINE_CDM_VERSION_STRING (with the version of the CDM that's available
// as a string, e.g., "1.0.123.456").
#define WIDEVINE_CDM_AVAILABLE
#define WIDEVINE_CDM_VERSION_STRING "4.10.2557.0"
#endif // WIDEVINE_CDM_VERSION_H_

View file

@ -1,9 +1,10 @@
"Google Inc. and its affiliates ("Google") own all legal right, title and
Copyright (c) 2023 Google LLC
Google LLC and its affiliates ("Google") own all legal right, title and
interest in and to the content decryption module software ("Software") and
related documentation, including any intellectual property rights in the
Software. You may not use, modify, sell, or otherwise distribute the Software
without a separate license agreement with Google. The Software is not open
source software.
If you are interested in licensing the Software, please contact
widevine@google.com.
If you are interested in licensing the Software, please contact www.widevine.com

View file

@ -14,7 +14,6 @@
// - WIDEVINE_CDM_VERSION_STRING (with the version of the CDM that's available
// as a string, e.g., "1.0.123.456").
#define WIDEVINE_CDM_AVAILABLE
#define WIDEVINE_CDM_VERSION_STRING "4.10.2557.0"
#endif // WIDEVINE_CDM_VERSION_H_

View file

@ -1,9 +1,10 @@
"Google Inc. and its affiliates ("Google") own all legal right, title and
Copyright (c) 2023 Google LLC
Google LLC and its affiliates ("Google") own all legal right, title and
interest in and to the content decryption module software ("Software") and
related documentation, including any intellectual property rights in the
Software. You may not use, modify, sell, or otherwise distribute the Software
without a separate license agreement with Google. The Software is not open
source software.
If you are interested in licensing the Software, please contact
widevine@google.com.
If you are interested in licensing the Software, please contact www.widevine.com

View file

@ -14,7 +14,6 @@
// - WIDEVINE_CDM_VERSION_STRING (with the version of the CDM that's available
// as a string, e.g., "1.0.123.456").
#define WIDEVINE_CDM_AVAILABLE
#define WIDEVINE_CDM_VERSION_STRING "4.10.2557.0"
#endif // WIDEVINE_CDM_VERSION_H_

View file

@ -1,9 +1,10 @@
"Google Inc. and its affiliates ("Google") own all legal right, title and
Copyright (c) 2023 Google LLC
Google LLC and its affiliates ("Google") own all legal right, title and
interest in and to the content decryption module software ("Software") and
related documentation, including any intellectual property rights in the
Software. You may not use, modify, sell, or otherwise distribute the Software
without a separate license agreement with Google. The Software is not open
source software.
If you are interested in licensing the Software, please contact
widevine@google.com.
If you are interested in licensing the Software, please contact www.widevine.com

View file

@ -14,7 +14,6 @@
// - WIDEVINE_CDM_VERSION_STRING (with the version of the CDM that's available
// as a string, e.g., "1.0.123.456").
#define WIDEVINE_CDM_AVAILABLE
#define WIDEVINE_CDM_VERSION_STRING "4.10.2557.0"
#endif // WIDEVINE_CDM_VERSION_H_

View file

@ -1,9 +1,10 @@
"Google Inc. and its affiliates ("Google") own all legal right, title and
Copyright (c) 2023 Google LLC
Google LLC and its affiliates ("Google") own all legal right, title and
interest in and to the content decryption module software ("Software") and
related documentation, including any intellectual property rights in the
Software. You may not use, modify, sell, or otherwise distribute the Software
without a separate license agreement with Google. The Software is not open
source software.
If you are interested in licensing the Software, please contact
widevine@google.com.
If you are interested in licensing the Software, please contact www.widevine.com

View file

@ -14,7 +14,6 @@
// - WIDEVINE_CDM_VERSION_STRING (with the version of the CDM that's available
// as a string, e.g., "1.0.123.456").
#define WIDEVINE_CDM_AVAILABLE
#define WIDEVINE_CDM_VERSION_STRING "4.10.2557.0"
#endif // WIDEVINE_CDM_VERSION_H_

View file

@ -12,7 +12,7 @@ declare_args() {
# on Android. For Fuchsia, see crbug.com/1354347.
# Can be optionally enabled in Chromium on non-Android platforms. Please see
# //src/third_party/widevine/LICENSE file for details.
enable_widevine = true
enable_widevine = !is_fuchsia
}
# Disable Widevine when running linux-chromeos.
@ -43,11 +43,12 @@ enable_library_widevine_cdm =
# Note: Not enabled on ChromeOS. See https://crbug.com/971433
enable_widevine_cdm_component =
enable_library_widevine_cdm &&
(is_linux || is_chromeos_lacros)
(is_win || is_mac || is_linux || is_chromeos_lacros)
# Enable (Windows) Media Foundation Widevine CDM component.
declare_args() {
enable_media_foundation_widevine_cdm = false
enable_media_foundation_widevine_cdm =
is_win && enable_widevine && is_chrome_branded
}
assert(!enable_media_foundation_widevine_cdm || is_win)
assert(!enable_media_foundation_widevine_cdm || enable_widevine)
@ -61,13 +62,10 @@ declare_args() {
widevine_root = "."
}
if (target_os == "win" && target_cpu == "arm64") {
bundle_widevine_cdm = false
}
# 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
enable_widevine_cdm_host_verification =
enable_library_widevine_cdm && enable_cdm_host_verification
declare_args() {
# If set, and Widevine CDM host verification signing failed due to no signing

View file

@ -14,7 +14,6 @@
// - WIDEVINE_CDM_VERSION_STRING (with the version of the CDM that's available
// as a string, e.g., "1.0.123.456").
#define WIDEVINE_CDM_AVAILABLE
#define WIDEVINE_CDM_VERSION_STRING "undefined"
#endif // WIDEVINE_CDM_VERSION_H_

View file

@ -1,9 +1,10 @@
"Google Inc. and its affiliates ("Google") own all legal right, title and
Copyright (c) 2023 Google LLC
Google LLC and its affiliates ("Google") own all legal right, title and
interest in and to the content decryption module software ("Software") and
related documentation, including any intellectual property rights in the
Software. You may not use, modify, sell, or otherwise distribute the Software
without a separate license agreement with Google. The Software is not open
source software.
If you are interested in licensing the Software, please contact
widevine@google.com.
If you are interested in licensing the Software, please contact www.widevine.com

View file

@ -14,7 +14,6 @@
// - WIDEVINE_CDM_VERSION_STRING (with the version of the CDM that's available
// as a string, e.g., "1.0.123.456").
#define WIDEVINE_CDM_AVAILABLE
#define WIDEVINE_CDM_VERSION_STRING "4.10.2557.0"
#endif // WIDEVINE_CDM_VERSION_H_

View file

@ -1,9 +1,10 @@
"Google Inc. and its affiliates ("Google") own all legal right, title and
Copyright (c) 2023 Google LLC
Google LLC and its affiliates ("Google") own all legal right, title and
interest in and to the content decryption module software ("Software") and
related documentation, including any intellectual property rights in the
Software. You may not use, modify, sell, or otherwise distribute the Software
without a separate license agreement with Google. The Software is not open
source software.
If you are interested in licensing the Software, please contact
widevine@google.com.
If you are interested in licensing the Software, please contact www.widevine.com

View file

@ -14,7 +14,6 @@
// - WIDEVINE_CDM_VERSION_STRING (with the version of the CDM that's available
// as a string, e.g., "1.0.123.456").
#define WIDEVINE_CDM_AVAILABLE
#define WIDEVINE_CDM_VERSION_STRING "4.10.2557.0"
#endif // WIDEVINE_CDM_VERSION_H_

View file

@ -1,9 +1,10 @@
"Google Inc. and its affiliates ("Google") own all legal right, title and
Copyright (c) 2023 Google LLC
Google LLC and its affiliates ("Google") own all legal right, title and
interest in and to the content decryption module software ("Software") and
related documentation, including any intellectual property rights in the
Software. You may not use, modify, sell, or otherwise distribute the Software
without a separate license agreement with Google. The Software is not open
source software.
If you are interested in licensing the Software, please contact
widevine@google.com.
If you are interested in licensing the Software, please contact www.widevine.com

View file

@ -14,7 +14,6 @@
// - WIDEVINE_CDM_VERSION_STRING (with the version of the CDM that's available
// as a string, e.g., "1.0.123.456").
#define WIDEVINE_CDM_AVAILABLE
#define WIDEVINE_CDM_VERSION_STRING "4.10.2557.0"
#endif // WIDEVINE_CDM_VERSION_H_