Sync the definition of WidevinePssh data
Merge from Widevine repo of http://go/wvgerrit/43202 Sync the definition of WidevinePssh data with the latest in support of entitlement keys. bug: 73297961 Fix or remove sublicense support. Test: tested as part of http://go/ag/4674759 Change-Id: Ia9faf82732854a705b4b14430169ce4c8ecbcfcd
This commit is contained in:
@@ -89,21 +89,14 @@ InitializationData::InitializationData(const std::string& type,
|
||||
std::vector<video_widevine::SubLicense>
|
||||
InitializationData::ExtractSublicenseKeys() const {
|
||||
std::vector<video_widevine::SubLicense> keys;
|
||||
WidevinePsshData cenc_header;
|
||||
if (!is_cenc_ || !cenc_header.ParseFromString(data_) ||
|
||||
cenc_header.sub_licenses().size() == 0)
|
||||
return keys;
|
||||
|
||||
keys.reserve(cenc_header.sub_licenses().size());
|
||||
for (int i = 0; i < cenc_header.sub_licenses().size(); ++i) {
|
||||
keys.push_back(cenc_header.sub_licenses(i));
|
||||
}
|
||||
// TODO(jfore): The pssh has changed in ways that are not compatible with
|
||||
//sublicenses. Restructure or remove sublicense support including this method.
|
||||
return keys;
|
||||
}
|
||||
|
||||
std::vector<video_widevine::WrappedKey> InitializationData::ExtractWrappedKeys()
|
||||
const {
|
||||
std::vector<video_widevine::WrappedKey> keys;
|
||||
std::vector<video_widevine::WidevinePsshData_EntitledKey>
|
||||
InitializationData::ExtractWrappedKeys() const {
|
||||
std::vector<video_widevine::WidevinePsshData_EntitledKey> keys;
|
||||
WidevinePsshData cenc_header;
|
||||
if (!is_cenc_ || !cenc_header.ParseFromString(data_) ||
|
||||
cenc_header.entitled_keys().size() == 0)
|
||||
|
||||
Reference in New Issue
Block a user