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:
@@ -74,12 +74,29 @@ TEST(LicenseTestSession, InitNullSession) {
|
||||
}
|
||||
|
||||
// TODO(rfrias): Fix or remove test.
|
||||
TEST_F(LicenseTest, DISABLED_PrepareKeyRequest) {
|
||||
TEST_F(LicenseTest, DISABLED_PrepareIsoBmffKeyRequest) {
|
||||
std::string signed_request;
|
||||
CdmAppParameterMap app_parameters;
|
||||
std::string server_url;
|
||||
CdmSessionId session_id;
|
||||
license_.PrepareKeyRequest(a2bs_hex(kInitData),
|
||||
license_.PrepareKeyRequest("video/mp4",
|
||||
a2bs_hex(kInitData),
|
||||
kLicenseTypeStreaming,
|
||||
app_parameters,
|
||||
session_id,
|
||||
&signed_request,
|
||||
&server_url);
|
||||
EXPECT_EQ(signed_request, a2bs_hex(kSignedRequest));
|
||||
}
|
||||
|
||||
// TODO(rfrias): Fix or remove test.
|
||||
TEST_F(LicenseTest, DISABLED_PrepareWebmKeyRequest) {
|
||||
std::string signed_request;
|
||||
CdmAppParameterMap app_parameters;
|
||||
std::string server_url;
|
||||
CdmSessionId session_id;
|
||||
license_.PrepareKeyRequest("video/webm",
|
||||
a2bs_hex(kInitData),
|
||||
kLicenseTypeStreaming,
|
||||
app_parameters,
|
||||
session_id,
|
||||
@@ -94,7 +111,8 @@ TEST_F(LicenseTest, DISABLED_HandleKeyResponseValid) {
|
||||
CdmAppParameterMap app_parameters;
|
||||
CdmSessionId session_id;
|
||||
std::string server_url;
|
||||
license_.PrepareKeyRequest(a2bs_hex(kInitData),
|
||||
license_.PrepareKeyRequest("video/mp4",
|
||||
a2bs_hex(kInitData),
|
||||
kLicenseTypeStreaming,
|
||||
app_parameters,
|
||||
session_id,
|
||||
@@ -110,7 +128,8 @@ TEST_F(LicenseTest, DISABLED_HandleKeyResponseInvalid) {
|
||||
CdmAppParameterMap app_parameters;
|
||||
CdmSessionId session_id;
|
||||
std::string server_url;
|
||||
license_.PrepareKeyRequest(a2bs_hex(kInitData),
|
||||
license_.PrepareKeyRequest("video/mp4",
|
||||
a2bs_hex(kInitData),
|
||||
kLicenseTypeStreaming,
|
||||
app_parameters,
|
||||
session_id,
|
||||
|
||||
Reference in New Issue
Block a user