- Support streaming of content without .wvm extension.
If the .wvm extension is not present, the file header is parsed to determine if it is Widevine content. - Fixed a missing call to OpenSession. - Fixed unit test build. - Fixed x86-eng build. - This is cherry-picked from master to hc-mr1 branch "DO NOT MERGE" Change-Id: Ied0579325d3c11a91f6f182fe59cd978eca68368
This commit is contained in:
@@ -340,7 +340,7 @@ bool WVMDrmPlugin::onCanHandle(int uniqueId, const String8& path) {
|
||||
//LOGD("WVMDrmPlugin::canHandle('%s') ", path.string());
|
||||
String8 extension = path.getPathExtension();
|
||||
extension.toLower();
|
||||
return (String8(".wvm") == extension);
|
||||
return (String8(".wvm") == extension || String8("") == extension);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -558,6 +558,7 @@ status_t WVMDrmPlugin::onOpenDecryptSession(
|
||||
decryptHandle->decryptApiType = DecryptApiType::WV_BASED;
|
||||
decryptHandle->status = DRM_NO_ERROR;
|
||||
decryptHandle->decryptInfo = NULL;
|
||||
mDrmPluginImpl->OpenSession();
|
||||
result = DRM_NO_ERROR;
|
||||
} else {
|
||||
//LOGD("WVMDrmPlugin::onOpenDecryptSession - not Widevine media");
|
||||
@@ -585,11 +586,7 @@ status_t WVMDrmPlugin::onOpenDecryptSession(
|
||||
|
||||
size_t len = strlen(uri);
|
||||
|
||||
if ((len >= 4 && !strncmp(&uri[len - 4], ".wvm", 4)) ||
|
||||
(strstr(uri, ".wvm?") != NULL) ||
|
||||
(len >= 5 && !strncmp(&uri[len - 5], ".m3u8", 5)) ||
|
||||
(strstr(uri, ".m3u8?") != NULL))
|
||||
{
|
||||
if (mDrmPluginImpl->IsSupportedMediaType(uri)) {
|
||||
//LOGD("WVMDrmPlugin::onOpenDecryptSession(uri) : %d - match", uniqueId);
|
||||
decryptHandle->mimeType = String8("video/wvm");
|
||||
decryptHandle->decryptApiType = DecryptApiType::WV_BASED;
|
||||
|
||||
Reference in New Issue
Block a user