Initial import of Widevine Common Encryption DRM engine
Builds libwvmdrmengine.so, which is loaded by the new MediaDrm APIs to support playback of Widevine/CENC protected content. Change-Id: I6f57dd37083dfd96c402cb9dd137c7d74edc8f1c
This commit is contained in:
36
libwvdrmengine/src/WVDrmFactory.cpp
Normal file
36
libwvdrmengine/src/WVDrmFactory.cpp
Normal file
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// Copyright 2013 Google Inc. All Rights Reserved.
|
||||
//
|
||||
|
||||
//#define LOG_NDEBUG 0
|
||||
#define LOG_TAG "WVCdm"
|
||||
#include <utils/Log.h>
|
||||
|
||||
#include "WVDrmFactory.h"
|
||||
|
||||
#include "utils/Errors.h"
|
||||
#include "WVCDMSingleton.h"
|
||||
#include "WVDrmPlugin.h"
|
||||
#include "WVUUID.h"
|
||||
|
||||
namespace wvdrm {
|
||||
|
||||
using namespace android;
|
||||
|
||||
bool WVDrmFactory::isCryptoSchemeSupported(const uint8_t uuid[16]) {
|
||||
return isWidevineUUID(uuid);
|
||||
}
|
||||
|
||||
status_t WVDrmFactory::createDrmPlugin(const uint8_t uuid[16],
|
||||
DrmPlugin** plugin) {
|
||||
if (!isCryptoSchemeSupported(uuid)) {
|
||||
*plugin = NULL;
|
||||
return BAD_VALUE;
|
||||
}
|
||||
|
||||
*plugin = new WVDrmPlugin(getCDM());
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
} // namespace wvdrm
|
||||
Reference in New Issue
Block a user