Files
android/libwvdrmengine/src/WVCryptoFactory.cpp
Fred Gylys-Colwell 1a25cbdad6 Update Copyright
Merge from Widevine repo of http://go/wvgerrit/47860

This CL updates the copyright notice to indicate that files
shared with partners are shared under the Widevine Master
License Agreement.

bug: 77926774
test: comment change only
Change-Id: I0423668111578b80fb39a932d763df2827e2dfc3
2018-04-16 16:38:05 -07:00

40 lines
897 B
C++

//
// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
// source code may only be used and distributed under the Widevine Master
// 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