Files
android/libwvdrmengine/src/WVCryptoFactory.cpp
Rahul Frias ec8bed38f4 Update Widevine Copyright header for android
[ 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
2020-10-21 02:49:05 -07:00

40 lines
890 B
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 "WVCryptoFactory.h"
#include <dlfcn.h>
#include "utils/Errors.h"
#include "WVCDMSingleton.h"
#include "WVCryptoPlugin.h"
#include "WVUUID.h"
namespace wvdrm {
using namespace android;
bool WVCryptoFactory::isCryptoSchemeSupported(const uint8_t uuid[16]) const {
return isWidevineUUID(uuid);
}
status_t WVCryptoFactory::createPlugin(const uint8_t uuid[16], const void* data,
size_t size, CryptoPlugin** plugin) {
if (!isCryptoSchemeSupported(uuid)) {
*plugin = NULL;
return BAD_VALUE;
}
*plugin = new WVCryptoPlugin(data, size, getCDM());
return OK;
}
} // namespace wvdrm