resolved conflicts for merge of 7eea20df to master

Change-Id: Ibd8b16745d36b24041856f315fbb09a6c25cf4fb
This commit is contained in:
John "Juce" Bruce
2014-04-02 18:59:05 -07:00
19 changed files with 288 additions and 194 deletions

View File

@@ -128,7 +128,7 @@ status_t WVDrmPlugin::closeSession(const Vector<uint8_t>& sessionId) {
status_t WVDrmPlugin::getKeyRequest(
const Vector<uint8_t>& scope,
const Vector<uint8_t>& initData,
const String8& mimeType,
const String8& initDataType,
KeyType keyType,
const KeyedVector<String8, String8>& optionalParameters,
Vector<uint8_t>& request,
@@ -149,17 +149,20 @@ status_t WVDrmPlugin::getKeyRequest(
return android::ERROR_DRM_CANNOT_HANDLE;
}
string cdmMimeType = mimeType.string();
string cdmMimeType = initDataType.string();
// Provide backwards-compatibility for apps that pass non-EME-compatible MIME
// types.
if (cdmMimeType != wvcdm::ISO_BMFF_MIME_TYPE &&
cdmMimeType != wvcdm::WEBM_MIME_TYPE) {
cdmMimeType = wvcdm::ISO_BMFF_MIME_TYPE;
if (cdmMimeType != wvcdm::ISO_BMFF_VIDEO_MIME_TYPE &&
cdmMimeType != wvcdm::ISO_BMFF_AUDIO_MIME_TYPE &&
cdmMimeType != wvcdm::WEBM_VIDEO_MIME_TYPE &&
cdmMimeType != wvcdm::WEBM_AUDIO_MIME_TYPE) {
cdmMimeType = wvcdm::ISO_BMFF_VIDEO_MIME_TYPE;
}
CdmInitData processedInitData;
if (cdmMimeType == wvcdm::ISO_BMFF_MIME_TYPE) {
if (cdmMimeType == wvcdm::ISO_BMFF_VIDEO_MIME_TYPE ||
cdmMimeType == wvcdm::ISO_BMFF_AUDIO_MIME_TYPE) {
// For ISO-BMFF, we need to wrap the init data in a new PSSH header.
static const char psshPrefix[] = {
0, 0, 0, 0, // Total size