summaryrefslogtreecommitdiff
path: root/chromium/components/cdm
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-05-24 11:40:17 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-05-24 12:42:11 +0000
commit5d87695f37678f96492b258bbab36486c59866b4 (patch)
treebe9783bbaf04fb930c4d74ca9c00b5e7954c8bc6 /chromium/components/cdm
parent6c11fb357ec39bf087b8b632e2b1e375aef1b38b (diff)
downloadqtwebengine-chromium-5d87695f37678f96492b258bbab36486c59866b4.tar.gz
BASELINE: Update Chromium to 75.0.3770.56
Change-Id: I86d2007fd27a45d5797eee06f4c9369b8b50ac4f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/components/cdm')
-rw-r--r--chromium/components/cdm/browser/cdm_message_filter_android.cc7
-rw-r--r--chromium/components/cdm/common/cdm_messages_android.h2
-rw-r--r--chromium/components/cdm/renderer/android_key_systems.cc10
3 files changed, 16 insertions, 3 deletions
diff --git a/chromium/components/cdm/browser/cdm_message_filter_android.cc b/chromium/components/cdm/browser/cdm_message_filter_android.cc
index 5785ee4005b..ffcc775fd78 100644
--- a/chromium/components/cdm/browser/cdm_message_filter_android.cc
+++ b/chromium/components/cdm/browser/cdm_message_filter_android.cc
@@ -9,6 +9,7 @@
#include <string>
#include <vector>
+#include "base/android/build_info.h"
#include "base/feature_list.h"
#include "base/macros.h"
#include "base/task/post_task.h"
@@ -100,7 +101,7 @@ CdmMessageFilterAndroid::CdmMessageFilterAndroid(
bool force_to_support_secure_codecs)
: BrowserMessageFilter(EncryptedMediaMsgStart),
task_runner_(base::CreateSequencedTaskRunnerWithTraits(
- {base::MayBlock(), base::TaskPriority::BEST_EFFORT})),
+ {base::MayBlock(), base::TaskPriority::USER_VISIBLE})),
can_persist_data_(can_persist_data),
force_to_support_secure_codecs_(force_to_support_secure_codecs) {}
@@ -168,6 +169,10 @@ void CdmMessageFilterAndroid::OnQueryKeySystemSupport(
response->is_persistent_license_supported =
MediaDrmBridge::IsPersistentLicenseTypeSupported(request.key_system);
+
+ response->is_cbcs_encryption_supported =
+ media::MediaCodecUtil::PlatformSupportsCbcsEncryption(
+ base::android::BuildInfo::GetInstance()->sdk_int());
}
void CdmMessageFilterAndroid::OnGetPlatformKeySystemNames(
diff --git a/chromium/components/cdm/common/cdm_messages_android.h b/chromium/components/cdm/common/cdm_messages_android.h
index b1223efe23c..27f4b5082f6 100644
--- a/chromium/components/cdm/common/cdm_messages_android.h
+++ b/chromium/components/cdm/common/cdm_messages_android.h
@@ -4,6 +4,7 @@
// IPC messages for EME on android.
// Multiply-included message file, hence no include guard.
+// no-include-guard-because-multiply-included
#include <vector>
@@ -24,6 +25,7 @@ IPC_STRUCT_BEGIN(SupportedKeySystemResponse)
IPC_STRUCT_MEMBER(media::SupportedCodecs, secure_codecs,
media::EME_CODEC_NONE)
IPC_STRUCT_MEMBER(bool, is_persistent_license_supported)
+ IPC_STRUCT_MEMBER(bool, is_cbcs_encryption_supported)
IPC_STRUCT_END()
// Messages sent from the renderer to the browser.
diff --git a/chromium/components/cdm/renderer/android_key_systems.cc b/chromium/components/cdm/renderer/android_key_systems.cc
index 7450b268daa..ccfcca05ac7 100644
--- a/chromium/components/cdm/renderer/android_key_systems.cc
+++ b/chromium/components/cdm/renderer/android_key_systems.cc
@@ -119,6 +119,8 @@ SupportedKeySystemResponse QueryKeySystemSupport(
#if BUILDFLAG(ENABLE_WIDEVINE)
void AddAndroidWidevine(
std::vector<std::unique_ptr<KeySystemProperties>>* concrete_key_systems) {
+ // TODO(crbug.com/853336): Use media.mojom.KeySystemSupport instead of
+ // separate IPC.
auto response = QueryKeySystemSupport(kWidevineKeySystem);
auto codecs = response.non_secure_codecs;
@@ -138,10 +140,11 @@ void AddAndroidWidevine(
if (codecs != media::EME_CODEC_NONE) {
DVLOG(3) << __func__ << " Widevine supported.";
- // TODO(crbug.com/813845): Determine 'cbcs' support, which may vary by
- // Android version.
base::flat_set<media::EncryptionMode> encryption_schemes = {
media::EncryptionMode::kCenc};
+ if (response.is_cbcs_encryption_supported) {
+ encryption_schemes.insert(media::EncryptionMode::kCbcs);
+ }
concrete_key_systems->emplace_back(new WidevineKeySystemProperties(
codecs, // Regular codecs.
@@ -164,6 +167,9 @@ void AddAndroidWidevine(
void AddAndroidPlatformKeySystems(
std::vector<std::unique_ptr<KeySystemProperties>>* concrete_key_systems) {
+ // TODO(crbug.com/853336): Update media.mojom.KeySystemSupport to handle this
+ // case and use it instead.
+
std::vector<std::string> key_system_names;
content::RenderThread::Get()->Send(
new ChromeViewHostMsg_GetPlatformKeySystemNames(&key_system_names));