Add Support for WebM Back

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

The previous version of this change broke playback for certain
apps that were being allowed to pass invalid MIME types before
this change was made. This version maintains backwards-compatiblity
for these apps for now by rewriting their MIME types as "video/mp4".

Merge of https://widevine-internal-review.googlesource.com/9225/
and https://widevine-internal-review.googlesource.com/9611/ from
the Widevine cdm repo.

Bug: 10638562
Change-Id: Ib37e838d08363f07b34b3a2e79a3f80a1f43e9ad
This commit is contained in:
John "Juce" Bruce
2014-03-31 14:12:11 -07:00
parent 66cadaa9fa
commit 702aadf853
16 changed files with 329 additions and 105 deletions

View File

@@ -46,14 +46,14 @@ TEST(WVDrmFactoryTest, SupportsSupportedContainerFormats) {
EXPECT_TRUE(factory.isContentTypeSupported(String8("video/mp4"))) <<
"WVPluginFactory does not support ISO-BMFF";
EXPECT_TRUE(factory.isContentTypeSupported(String8("video/webm"))) <<
"WVPluginFactory does not support WebM";
}
TEST(WVDrmFactoryTest, DoesNotSupportUnsupportedContainerFormats) {
WVDrmFactory factory;
EXPECT_FALSE(factory.isContentTypeSupported(String8("video/webm"))) <<
"WVPluginFactory incorrectly claims to support Web-M";
// Taken from Encoding.com's list of the most common internet video MIME-types
EXPECT_FALSE(factory.isContentTypeSupported(String8("video/x-matroska"))) <<
"WVPluginFactory incorrectly claims to support Matroska";