|
@@ -44,7 +44,7 @@ namespace {
|
|
|
bool IsWidevineAvailable(
|
|
|
base::FilePath* cdm_path,
|
|
|
std::vector<media::VideoCodec>* codecs_supported,
|
|
|
- bool* supports_persistent_license,
|
|
|
+ base::flat_set<media::CdmSessionType>* session_types_supported,
|
|
|
base::flat_set<media::EncryptionMode>* modes_supported) {
|
|
|
static enum {
|
|
|
NOT_CHECKED,
|
|
@@ -71,12 +71,11 @@ bool IsWidevineAvailable(
|
|
|
codecs_supported->push_back(media::VideoCodec::kCodecH264);
|
|
|
#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
|
|
|
|
|
|
-// TODO(crbug.com/767941): Push persistent-license support info here once
|
|
|
-// we check in a new CDM that supports it on Linux.
|
|
|
+ // TODO(crbug.com/767941): Push persistent-license support info here once
|
|
|
+ // we check in a new CDM that supports it on Linux.
|
|
|
+ session_types_supported->insert(media::CdmSessionType::kTemporary);
|
|
|
#if defined(OS_CHROMEOS)
|
|
|
- *supports_persistent_license = true;
|
|
|
-#else
|
|
|
- *supports_persistent_license = false;
|
|
|
+ session_types_supported->insert(media::CdmSessionType::kPersistentLicense);
|
|
|
#endif // defined(OS_CHROMEOS)
|
|
|
|
|
|
modes_supported->insert(media::EncryptionMode::kCenc);
|
|
@@ -225,10 +224,10 @@ void AtomContentClient::AddContentDecryptionModules(
|
|
|
#if defined(WIDEVINE_CDM_AVAILABLE)
|
|
|
base::FilePath cdm_path;
|
|
|
std::vector<media::VideoCodec> video_codecs_supported;
|
|
|
- bool supports_persistent_license = false;
|
|
|
+ base::flat_set<media::CdmSessionType> session_types_supported;
|
|
|
base::flat_set<media::EncryptionMode> encryption_modes_supported;
|
|
|
if (IsWidevineAvailable(&cdm_path, &video_codecs_supported,
|
|
|
- &supports_persistent_license,
|
|
|
+ &session_types_supported,
|
|
|
&encryption_modes_supported)) {
|
|
|
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
|
|
auto cdm_version_string =
|
|
@@ -239,11 +238,13 @@ void AtomContentClient::AddContentDecryptionModules(
|
|
|
const base::Version version(cdm_version_string);
|
|
|
DCHECK(version.IsValid());
|
|
|
|
|
|
+ content::CdmCapability capability(
|
|
|
+ video_codecs_supported, encryption_modes_supported,
|
|
|
+ session_types_supported, base::flat_set<media::CdmProxy::Protocol>());
|
|
|
+
|
|
|
cdms->push_back(content::CdmInfo(
|
|
|
kWidevineCdmDisplayName, kWidevineCdmGuid, version, cdm_path,
|
|
|
- kWidevineCdmFileSystemId, video_codecs_supported,
|
|
|
- supports_persistent_license, encryption_modes_supported,
|
|
|
- kWidevineKeySystem, false));
|
|
|
+ kWidevineCdmFileSystemId, capability, kWidevineKeySystem, false));
|
|
|
}
|
|
|
#endif // defined(WIDEVINE_CDM_AVAILABLE)
|
|
|
}
|