diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-23 18:26:28 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-09-22 08:47:19 +0000 |
commit | c0419ae89fbc4fbdc58aef5b8b01ab0b45f8ff98 (patch) | |
tree | d0bdc1f0ef144bb63ed75b8e6fcfb6f039628210 /src/core/content_client_qt.cpp | |
parent | 1e89fa4226be870d97d3b21c6c7087886c81bbc5 (diff) |
Adaptations for Chromium 68
Together-with: Tamas Zakor<ztamas@inf.u-szeged.hu>
Change-Id: I805246b6f01cb151fff48588744408c676d87c14
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'src/core/content_client_qt.cpp')
-rw-r--r-- | src/core/content_client_qt.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/core/content_client_qt.cpp b/src/core/content_client_qt.cpp index fe0ea6a0d..a2b8c4da3 100644 --- a/src/core/content_client_qt.cpp +++ b/src/core/content_client_qt.cpp @@ -251,7 +251,8 @@ namespace QtWebEngineCore { #if defined(WIDEVINE_CDM_AVAILABLE_NOT_COMPONENT) static bool IsWidevineAvailable(base::FilePath *cdm_path, std::vector<media::VideoCodec> *codecs_supported, - bool *supports_persistent_license) + bool *supports_persistent_license, + base::flat_set<media::EncryptionMode>* modes_supported) { QStringList pluginPaths; const base::CommandLine::StringType widevine_argument = base::CommandLine::ForCurrentProcess()->GetSwitchValueNative(switches::kCdmWidevinePath); @@ -307,6 +308,8 @@ static bool IsWidevineAvailable(base::FilePath *cdm_path, *supports_persistent_license = false; + modes_supported->insert(media::EncryptionMode::kCenc); + return true; } } @@ -324,12 +327,15 @@ void ContentClientQt::AddContentDecryptionModules(std::vector<content::CdmInfo> base::FilePath cdm_path; std::vector<media::VideoCodec> video_codecs_supported; bool supports_persistent_license = false; + base::flat_set<media::EncryptionMode> encryption_modes_supported; if (IsWidevineAvailable(&cdm_path, &video_codecs_supported, - &supports_persistent_license)) { + &supports_persistent_license, + &encryption_modes_supported)) { const base::Version version; cdms->push_back(content::CdmInfo(kWidevineCdmDisplayName, kWidevineCdmGuid, version, cdm_path, kWidevineCdmFileSystemId, video_codecs_supported, - supports_persistent_license, kWidevineKeySystem, false)); + supports_persistent_license, encryption_modes_supported, + kWidevineKeySystem, false)); } #endif // defined(WIDEVINE_CDM_AVAILABLE_NOT_COMPONENT) @@ -355,12 +361,14 @@ void ContentClientQt::AddContentDecryptionModules(std::vector<content::CdmInfo> cdms->push_back(content::CdmInfo(media::kClearKeyCdmDisplayName, media::kClearKeyCdmDifferentGuid, base::Version("0.1.0.0"), clear_key_cdm_path, media::kClearKeyCdmFileSystemId, {}, supports_persistent_license, + {media::EncryptionMode::kCenc, media::EncryptionMode::kCbcs}, kExternalClearKeyDifferentGuidTestKeySystem, false)); // Supported codecs are hard-coded in ExternalClearKeyProperties. cdms->push_back(content::CdmInfo(media::kClearKeyCdmDisplayName, media::kClearKeyCdmGuid, base::Version("0.1.0.0"), clear_key_cdm_path, media::kClearKeyCdmFileSystemId, {}, supports_persistent_license, + {media::EncryptionMode::kCenc, media::EncryptionMode::kCbcs}, kExternalClearKeyKeySystem, true)); } #endif // BUILDFLAG(ENABLE_LIBRARY_CDMS) |