[ Merge of http://go/wvgerrit/108084 ] The Widevine License Agreement has been renamed to use inclusive language. This covers files in the android directory. Bug: 168562298 Test: verified compilation (comment only change) Change-Id: I0f9e6445e0168ebe85425baeb81371e182e5a39c
47 lines
1.1 KiB
C++
47 lines
1.1 KiB
C++
//
|
|
// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
|
|
// source code may only be used and distributed under the Widevine License
|
|
// Agreement.
|
|
//
|
|
|
|
//#define LOG_NDEBUG 0
|
|
#define LOG_TAG "WVCdm"
|
|
#include <utils/Log.h>
|
|
|
|
#include "WVDrmFactory.h"
|
|
|
|
#include "utils/Errors.h"
|
|
#include "wv_cdm_constants.h"
|
|
#include "WVCDMSingleton.h"
|
|
#include "wv_content_decryption_module.h"
|
|
#include "WVDrmPlugin.h"
|
|
#include "WVUUID.h"
|
|
|
|
namespace wvdrm {
|
|
|
|
using namespace android;
|
|
|
|
WVGenericCryptoInterface WVDrmFactory::sOemCryptoInterface;
|
|
|
|
bool WVDrmFactory::isCryptoSchemeSupported(const uint8_t uuid[16]) {
|
|
return isWidevineUUID(uuid);
|
|
}
|
|
|
|
bool WVDrmFactory::isContentTypeSupported(const String8 &initDataType) {
|
|
return wvcdm::WvContentDecryptionModule::IsSupported(initDataType.string());
|
|
}
|
|
|
|
status_t WVDrmFactory::createDrmPlugin(const uint8_t uuid[16],
|
|
DrmPlugin** plugin) {
|
|
if (!isCryptoSchemeSupported(uuid)) {
|
|
*plugin = NULL;
|
|
return BAD_VALUE;
|
|
}
|
|
|
|
*plugin = new WVDrmPlugin(getCDM(), &sOemCryptoInterface);
|
|
|
|
return OK;
|
|
}
|
|
|
|
} // namespace wvdrm
|