- 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:
@@ -43,6 +43,7 @@ class WVDRMPluginAPI {
|
|||||||
|
|
||||||
virtual void OpenSession() = 0;
|
virtual void OpenSession() = 0;
|
||||||
virtual void CloseSession() = 0;
|
virtual void CloseSession() = 0;
|
||||||
|
virtual bool IsSupportedMediaType(const char *uri) = 0;
|
||||||
|
|
||||||
virtual bool AcquireDrmInfo(std::string &assetPath, WVCredentials &credentials,
|
virtual bool AcquireDrmInfo(std::string &assetPath, WVCredentials &credentials,
|
||||||
std::string &dsPath,
|
std::string &dsPath,
|
||||||
|
|||||||
Binary file not shown.
@@ -340,7 +340,7 @@ bool WVMDrmPlugin::onCanHandle(int uniqueId, const String8& path) {
|
|||||||
//LOGD("WVMDrmPlugin::canHandle('%s') ", path.string());
|
//LOGD("WVMDrmPlugin::canHandle('%s') ", path.string());
|
||||||
String8 extension = path.getPathExtension();
|
String8 extension = path.getPathExtension();
|
||||||
extension.toLower();
|
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->decryptApiType = DecryptApiType::WV_BASED;
|
||||||
decryptHandle->status = DRM_NO_ERROR;
|
decryptHandle->status = DRM_NO_ERROR;
|
||||||
decryptHandle->decryptInfo = NULL;
|
decryptHandle->decryptInfo = NULL;
|
||||||
|
mDrmPluginImpl->OpenSession();
|
||||||
result = DRM_NO_ERROR;
|
result = DRM_NO_ERROR;
|
||||||
} else {
|
} else {
|
||||||
//LOGD("WVMDrmPlugin::onOpenDecryptSession - not Widevine media");
|
//LOGD("WVMDrmPlugin::onOpenDecryptSession - not Widevine media");
|
||||||
@@ -585,11 +586,7 @@ status_t WVMDrmPlugin::onOpenDecryptSession(
|
|||||||
|
|
||||||
size_t len = strlen(uri);
|
size_t len = strlen(uri);
|
||||||
|
|
||||||
if ((len >= 4 && !strncmp(&uri[len - 4], ".wvm", 4)) ||
|
if (mDrmPluginImpl->IsSupportedMediaType(uri)) {
|
||||||
(strstr(uri, ".wvm?") != NULL) ||
|
|
||||||
(len >= 5 && !strncmp(&uri[len - 5], ".m3u8", 5)) ||
|
|
||||||
(strstr(uri, ".m3u8?") != NULL))
|
|
||||||
{
|
|
||||||
//LOGD("WVMDrmPlugin::onOpenDecryptSession(uri) : %d - match", uniqueId);
|
//LOGD("WVMDrmPlugin::onOpenDecryptSession(uri) : %d - match", uniqueId);
|
||||||
decryptHandle->mimeType = String8("video/wvm");
|
decryptHandle->mimeType = String8("video/wvm");
|
||||||
decryptHandle->decryptApiType = DecryptApiType::WV_BASED;
|
decryptHandle->decryptApiType = DecryptApiType::WV_BASED;
|
||||||
|
|||||||
@@ -8,10 +8,11 @@ LOCAL_SRC_FILES:= \
|
|||||||
LOCAL_C_INCLUDES+= \
|
LOCAL_C_INCLUDES+= \
|
||||||
bionic \
|
bionic \
|
||||||
vendor/widevine/proprietary/include \
|
vendor/widevine/proprietary/include \
|
||||||
|
vendor/widevine/proprietary/drmwvmplugin/include \
|
||||||
|
vendor/widevine/proprietary/streamcontrol/include \
|
||||||
external/stlport/stlport \
|
external/stlport/stlport \
|
||||||
frameworks/base/drm/libdrmframework/include \
|
frameworks/base/drm/libdrmframework/include \
|
||||||
frameworks/base/drm/libdrmframework/plugins/common/include \
|
frameworks/base/drm/libdrmframework/plugins/common/include
|
||||||
frameworks/base/drm/libdrmframework/plugins/widevine/include
|
|
||||||
|
|
||||||
LOCAL_SHARED_LIBRARIES := \
|
LOCAL_SHARED_LIBRARIES := \
|
||||||
libstlport \
|
libstlport \
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
LOCAL_PATH:= $(call my-dir)
|
LOCAL_PATH:= $(call my-dir)
|
||||||
ifeq ($(TARGET_ARCH),arm)
|
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
@@ -12,5 +11,3 @@ LOCAL_MODULE_CLASS := SHARED_LIBRARIES
|
|||||||
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)
|
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)
|
||||||
OVERRIDE_BUILT_MODULE_PATH := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)
|
OVERRIDE_BUILT_MODULE_PATH := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)
|
||||||
include $(BUILD_PREBUILT)
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user