Allow the crypto plugin to specify error detail if it returns an error
in the range ERROR_DRM_VENDOR_MIN..ERROR_DRM_VENDOR_MAX. Change-Id: Ic5d53e98cf6d98d92ad305d51f848e03d0bf3a84 related-to-bug: 6365261
This commit is contained in:
parent
56a2bbe708
commit
383190e475
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
namespace android {
|
namespace android {
|
||||||
|
|
||||||
|
struct AString;
|
||||||
struct CryptoPlugin;
|
struct CryptoPlugin;
|
||||||
|
|
||||||
struct CryptoFactory {
|
struct CryptoFactory {
|
||||||
@ -63,6 +64,12 @@ struct CryptoPlugin {
|
|||||||
// media data of the given mime type.
|
// media data of the given mime type.
|
||||||
virtual bool requiresSecureDecoderComponent(const char *mime) const = 0;
|
virtual bool requiresSecureDecoderComponent(const char *mime) const = 0;
|
||||||
|
|
||||||
|
// If the error returned falls into the range
|
||||||
|
// ERROR_DRM_VENDOR_MIN..ERROR_DRM_VENDOR_MAX, errorDetailMsg should be
|
||||||
|
// filled in with an appropriate string.
|
||||||
|
// At the java level these special errors will then trigger a
|
||||||
|
// MediaCodec.CryptoException that gives clients access to both
|
||||||
|
// the error code and the errorDetailMsg.
|
||||||
virtual status_t decrypt(
|
virtual status_t decrypt(
|
||||||
bool secure,
|
bool secure,
|
||||||
const uint8_t key[16],
|
const uint8_t key[16],
|
||||||
@ -70,7 +77,8 @@ struct CryptoPlugin {
|
|||||||
Mode mode,
|
Mode mode,
|
||||||
const void *srcPtr,
|
const void *srcPtr,
|
||||||
const SubSample *subSamples, size_t numSubSamples,
|
const SubSample *subSamples, size_t numSubSamples,
|
||||||
void *dstPtr) = 0;
|
void *dstPtr,
|
||||||
|
AString *errorDetailMsg) = 0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CryptoPlugin(const CryptoPlugin &);
|
CryptoPlugin(const CryptoPlugin &);
|
||||||
|
Loading…
Reference in New Issue
Block a user