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:
37
libwvdrmengine/mediacrypto/include/WVCryptoPlugin.h
Normal file
37
libwvdrmengine/mediacrypto/include/WVCryptoPlugin.h
Normal file
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// Copyright 2013 Google Inc. All Rights Reserved.
|
||||
//
|
||||
|
||||
#ifndef WV_CRYPTO_PLUGIN_H_
|
||||
#define WV_CRYPTO_PLUGIN_H_
|
||||
|
||||
#include "media/hardware/CryptoAPI.h"
|
||||
#include "media/stagefright/foundation/ABase.h"
|
||||
#include "media/stagefright/foundation/AString.h"
|
||||
#include "wv_content_decryption_module.h"
|
||||
|
||||
namespace wvdrm {
|
||||
|
||||
class WVCryptoPlugin : public android::CryptoPlugin {
|
||||
public:
|
||||
WVCryptoPlugin(const void* data, size_t size,
|
||||
wvcdm::WvContentDecryptionModule* cdm);
|
||||
virtual ~WVCryptoPlugin() {}
|
||||
|
||||
virtual bool requiresSecureDecoderComponent(const char *mime) const;
|
||||
|
||||
virtual ssize_t decrypt(bool secure, const uint8_t key[16],
|
||||
const uint8_t iv[16], Mode mode, const void* srcPtr,
|
||||
const SubSample* subSamples, size_t numSubSamples,
|
||||
void* dstPtr, android::AString* errorDetailMsg);
|
||||
|
||||
private:
|
||||
DISALLOW_EVIL_CONSTRUCTORS(WVCryptoPlugin);
|
||||
|
||||
wvcdm::WvContentDecryptionModule* const mCDM;
|
||||
const wvcdm::CdmSessionId mSessionId;
|
||||
};
|
||||
|
||||
} // namespace wvdrm
|
||||
|
||||
#endif // WV_CRYPTO_PLUGIN_H_
|
||||
Reference in New Issue
Block a user