Add an offline test asset for the drm vts test
To test restoreKeys, a content configuration with a license policy allowing offline playaback was needed. Test: drm vts test bug:34178477 Change-Id: Ib90d7a878c0f310569abb09f21138c7a6ac9daae
This commit is contained in:
@@ -87,6 +87,8 @@ namespace widevine_vts {
|
|||||||
WidevineVTSVendorModule_V1::getContentConfigurations() const {
|
WidevineVTSVendorModule_V1::getContentConfigurations() const {
|
||||||
|
|
||||||
vector<DrmHalVTSVendorModule_V1::ContentConfiguration> configurations;
|
vector<DrmHalVTSVendorModule_V1::ContentConfiguration> configurations;
|
||||||
|
|
||||||
|
// Content Configuration #1
|
||||||
{
|
{
|
||||||
const string serverUrl = "http://widevine-proxy.appspot.com/proxy";
|
const string serverUrl = "http://widevine-proxy.appspot.com/proxy";
|
||||||
const vector<uint8_t> initData = a2b_hex(
|
const vector<uint8_t> initData = a2b_hex(
|
||||||
@@ -109,15 +111,51 @@ namespace widevine_vts {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ContentConfiguration config = {
|
ContentConfiguration config = {
|
||||||
.name = "UAT-asset1",
|
.name = "streaming_clip1",
|
||||||
.serverUrl = serverUrl,
|
.serverUrl = serverUrl,
|
||||||
.initData = initData,
|
.initData = initData,
|
||||||
.mimeType = "cenc",
|
.mimeType = "cenc",
|
||||||
.optionalParameters = map<string, string>(),
|
.optionalParameters = map<string, string>(),
|
||||||
|
.policy.allowOffline = false,
|
||||||
|
.keys = keys
|
||||||
|
};
|
||||||
|
configurations.push_back(config);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Content Configuration #2 - Allows offline playback
|
||||||
|
{
|
||||||
|
const string serverUrl = "http://widevine-proxy.appspot.com/proxy";
|
||||||
|
const vector<uint8_t> initData = a2b_hex(
|
||||||
|
"00000040" // blob size
|
||||||
|
"70737368" // "pssh"
|
||||||
|
"00000000" // flags
|
||||||
|
"edef8ba979d64acea3c827dcd51d21ed" // Widevine system id
|
||||||
|
"00000020" // pssh data size
|
||||||
|
"08011a0d7769646576696e655f746573" // pssh data...
|
||||||
|
"74220d6f66666c696e655f636c697033"
|
||||||
|
"7031");
|
||||||
|
const vector<uint8_t> keyId = a2b_hex("3260f39e12ccf653529990168a3583ff");
|
||||||
|
const vector<uint8_t> keyValue = a2b_hex("8040c019929b2cc116a2e8dac739eafa");
|
||||||
|
const vector<DrmHalVTSVendorModule_V1::ContentConfiguration::Key> keys = {
|
||||||
|
{
|
||||||
|
.isSecure = false,
|
||||||
|
.keyId = keyId,
|
||||||
|
.clearContentKey = keyValue
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
ContentConfiguration config = {
|
||||||
|
.name = "offline_clip3",
|
||||||
|
.serverUrl = serverUrl,
|
||||||
|
.initData = initData,
|
||||||
|
.mimeType = "cenc",
|
||||||
|
.optionalParameters = map<string, string>(),
|
||||||
|
.policy.allowOffline = true,
|
||||||
.keys = keys
|
.keys = keys
|
||||||
};
|
};
|
||||||
configurations.push_back(config);
|
configurations.push_back(config);
|
||||||
};
|
};
|
||||||
|
|
||||||
return configurations;
|
return configurations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user