am 87718450: Fix Show Rights for HLS content
* commit '87718450ac16621b17ec1cda9e3695b6d1f05b5c': Fix Show Rights for HLS content
This commit is contained in:
@@ -131,6 +131,7 @@ private:
|
||||
|
||||
static Vector<Listener> *sNativeListeners;
|
||||
static Vector<Listener> *sJavaAPIListeners;
|
||||
static const char *sFileExtensions[];
|
||||
|
||||
WVDRMPluginAPI *mDrmPluginImpl;
|
||||
};
|
||||
@@ -138,4 +139,3 @@ private:
|
||||
};
|
||||
|
||||
#endif /* __WVMDRMPLUGIN__ */
|
||||
|
||||
|
||||
@@ -41,6 +41,11 @@ extern "C" void destroy(IDrmEngine* pPlugIn) {
|
||||
Vector<WVMDrmPlugin::Listener> *WVMDrmPlugin::sNativeListeners = NULL;
|
||||
Vector<WVMDrmPlugin::Listener> *WVMDrmPlugin::sJavaAPIListeners = NULL;
|
||||
|
||||
// File extensions that Widevine can handle.
|
||||
// Note: the empty extension is needed because some proxy servers will strip the extension.
|
||||
const char *WVMDrmPlugin::sFileExtensions[] = {".wvm", ".m3u8", ".vob", ".smil", "", NULL};
|
||||
|
||||
|
||||
WVMDrmPlugin::WVMDrmPlugin()
|
||||
: DrmEngineBase(),
|
||||
mDrmPluginImpl(WVDRMPluginAPI::create())
|
||||
@@ -467,7 +472,9 @@ DrmSupportInfo* WVMDrmPlugin::onGetSupportInfo(int uniqueId) {
|
||||
// Add mimetype's
|
||||
drmSupportInfo->addMimeType(String8("video/wvm"));
|
||||
// Add File Suffixes
|
||||
drmSupportInfo->addFileSuffix(String8(".wvm"));
|
||||
for (int i=0; sFileExtensions[i]; i++) {
|
||||
drmSupportInfo->addFileSuffix(String8(sFileExtensions[i]));
|
||||
}
|
||||
// Add plug-in description
|
||||
drmSupportInfo->setDescription(String8("Widevine DRM plug-in"));
|
||||
return drmSupportInfo;
|
||||
@@ -516,7 +523,12 @@ bool WVMDrmPlugin::onCanHandle(int uniqueId, const String8& path) {
|
||||
//ALOGD("WVMDrmPlugin::canHandle('%s') ", path.string());
|
||||
String8 extension = path.getPathExtension();
|
||||
extension.toLower();
|
||||
return (String8(".wvm") == extension || String8("") == extension);
|
||||
for (int i=0; sFileExtensions[i]; i++) {
|
||||
if (String8(sFileExtensions[i]) == extension) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -894,4 +906,3 @@ DrmConvertedStatus* WVMDrmPlugin::onConvertData(
|
||||
DrmConvertedStatus* WVMDrmPlugin::onCloseConvertSession(int uniqueId, int convertId) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user