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:
@@ -1 +0,0 @@
|
||||
Juce and Jerry to fill in.
|
||||
16
libwvdrmengine/include/WVCDMSingleton.h
Normal file
16
libwvdrmengine/include/WVCDMSingleton.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// Copyright 2013 Google Inc. All Rights Reserved.
|
||||
//
|
||||
|
||||
#ifndef WV_CDM_SINGLETON_H_
|
||||
#define WV_CDM_SINGLETON_H_
|
||||
|
||||
#include "wv_content_decryption_module.h"
|
||||
|
||||
namespace wvdrm {
|
||||
|
||||
wvcdm::WvContentDecryptionModule* getCDM();
|
||||
|
||||
} // namespace wvdrm
|
||||
|
||||
#endif // WV_CDM_SINGLETON_H_
|
||||
16
libwvdrmengine/include/WVCreatePluginFactories.h
Normal file
16
libwvdrmengine/include/WVCreatePluginFactories.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// Copyright 2013 Google Inc. All Rights Reserved.
|
||||
//
|
||||
|
||||
#ifndef WV_CREATE_PLUGIN_FACTORIES_H_
|
||||
#define WV_CREATE_PLUGIN_FACTORIES_H_
|
||||
|
||||
#include "media/drm/DrmAPI.h"
|
||||
#include "media/hardware/CryptoAPI.h"
|
||||
|
||||
extern "C" {
|
||||
android::DrmFactory* createDrmFactory();
|
||||
android::CryptoFactory* createCryptoFactory();
|
||||
}
|
||||
|
||||
#endif // WV_CREATE_PLUGIN_FACTORIES_H_
|
||||
34
libwvdrmengine/include/WVCryptoFactory.h
Normal file
34
libwvdrmengine/include/WVCryptoFactory.h
Normal file
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// Copyright 2013 Google Inc. All Rights Reserved.
|
||||
//
|
||||
|
||||
#ifndef WV_CRYPTO_FACTORY_H_
|
||||
#define WV_CRYPTO_FACTORY_H_
|
||||
|
||||
#include "media/hardware/CryptoAPI.h"
|
||||
#include "media/stagefright/foundation/ABase.h"
|
||||
#include "utils/Errors.h"
|
||||
|
||||
namespace wvdrm {
|
||||
|
||||
class WVCryptoFactory : public android::CryptoFactory {
|
||||
public:
|
||||
WVCryptoFactory();
|
||||
virtual ~WVCryptoFactory();
|
||||
|
||||
virtual bool isCryptoSchemeSupported(const uint8_t uuid[16]) const;
|
||||
|
||||
virtual android::status_t createPlugin(const uint8_t uuid[16],
|
||||
const void* data, size_t size,
|
||||
android::CryptoPlugin** plugin);
|
||||
|
||||
private:
|
||||
DISALLOW_EVIL_CONSTRUCTORS(WVCryptoFactory);
|
||||
|
||||
void* mLegacyLibraryHandle;
|
||||
android::CryptoFactory* mLegacyFactory;
|
||||
};
|
||||
|
||||
} // namespace wvdrm
|
||||
|
||||
#endif // WV_CRYPTO_FACTORY_H_
|
||||
30
libwvdrmengine/include/WVDrmFactory.h
Normal file
30
libwvdrmengine/include/WVDrmFactory.h
Normal file
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// Copyright 2013 Google Inc. All Rights Reserved.
|
||||
//
|
||||
|
||||
#ifndef WV_DRM_FACTORY_H_
|
||||
#define WV_DRM_FACTORY_H_
|
||||
|
||||
#include "media/drm/DrmAPI.h"
|
||||
#include "media/stagefright/foundation/ABase.h"
|
||||
#include "utils/Errors.h"
|
||||
|
||||
namespace wvdrm {
|
||||
|
||||
class WVDrmFactory : public android::DrmFactory {
|
||||
public:
|
||||
WVDrmFactory() {};
|
||||
virtual ~WVDrmFactory() {};
|
||||
|
||||
virtual bool isCryptoSchemeSupported(const uint8_t uuid[16]);
|
||||
|
||||
virtual android::status_t createDrmPlugin(const uint8_t uuid[16],
|
||||
android::DrmPlugin** plugin);
|
||||
|
||||
private:
|
||||
DISALLOW_EVIL_CONSTRUCTORS(WVDrmFactory);
|
||||
};
|
||||
|
||||
} // namespace wvdrm
|
||||
|
||||
#endif // WV_DRM_FACTORY_H_
|
||||
16
libwvdrmengine/include/WVUUID.h
Normal file
16
libwvdrmengine/include/WVUUID.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// Copyright 2013 Google Inc. All Rights Reserved.
|
||||
//
|
||||
|
||||
#ifndef WV_UUID_H_
|
||||
#define WV_UUID_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
namespace wvdrm {
|
||||
|
||||
bool isWidevineUUID(const uint8_t uuid[16]);
|
||||
|
||||
} // namespace wvdrm
|
||||
|
||||
#endif // WV_UUID_H_
|
||||
Reference in New Issue
Block a user