Add Support for WebM

Adds support for WebM to the CDM. Decryption remains untouched,
however the initialization data is passed differently for WebM.

Merge of https://widevine-internal-review.googlesource.com/#/c/9225/
from the widevine cdm repo.

Bug: 10638562
Change-Id: I7b8cf4888fa408af77cee103f768f5a7c8ffdc7e
This commit is contained in:
John "Juce" Bruce
2014-03-18 15:10:31 -07:00
parent a59b935928
commit ab95cf27f1
16 changed files with 314 additions and 105 deletions

View File

@@ -9,6 +9,7 @@
#include "WVDrmFactory.h"
#include "utils/Errors.h"
#include "wv_cdm_constants.h"
#include "WVCDMSingleton.h"
#include "WVDrmPlugin.h"
#include "WVUUID.h"
@@ -24,8 +25,9 @@ bool WVDrmFactory::isCryptoSchemeSupported(const uint8_t uuid[16]) {
}
bool WVDrmFactory::isContentTypeSupported(const String8 &mimeType) {
// For now, only ISO-BMFF is supported, which has MIME-type video/mp4
return mimeType == "video/mp4";
// Support ISO-BMFF (video/mp4) and WebM (video/webm).
return mimeType == wvcdm::ISO_BMFF_MIME_TYPE.c_str() ||
mimeType == wvcdm::WEBM_MIME_TYPE.c_str();
}
status_t WVDrmFactory::createDrmPlugin(const uint8_t uuid[16],