Add support for max-res decode
bug: 16034599 Change-Id: I12124aef03518600a27de45bae24eef9c9735be5
This commit is contained in:
@@ -14665,6 +14665,7 @@ package android.media {
|
||||
public static final class MediaCodec.CryptoException extends java.lang.RuntimeException {
|
||||
ctor public MediaCodec.CryptoException(int, java.lang.String);
|
||||
method public int getErrorCode();
|
||||
field public static final int ERROR_INSUFFICIENT_OUTPUT_PROTECTION = 4; // 0x4
|
||||
field public static final int ERROR_KEY_EXPIRED = 2; // 0x2
|
||||
field public static final int ERROR_NO_KEY = 1; // 0x1
|
||||
field public static final int ERROR_RESOURCE_BUSY = 3; // 0x3
|
||||
|
||||
@@ -733,6 +733,13 @@ final public class MediaCodec {
|
||||
*/
|
||||
public static final int ERROR_RESOURCE_BUSY = 3;
|
||||
|
||||
/**
|
||||
* This indicates that the output protection levels supported by the
|
||||
* device are not sufficient to meet the requirements set by the
|
||||
* content owner in the license policy.
|
||||
*/
|
||||
public static final int ERROR_INSUFFICIENT_OUTPUT_PROTECTION = 4;
|
||||
|
||||
/**
|
||||
* Retrieve the error code associated with a CryptoException
|
||||
*/
|
||||
|
||||
@@ -62,6 +62,7 @@ static struct CryptoErrorCodes {
|
||||
jint cryptoErrorNoKey;
|
||||
jint cryptoErrorKeyExpired;
|
||||
jint cryptoErrorResourceBusy;
|
||||
jint cryptoErrorInsufficientOutputProtection;
|
||||
} gCryptoErrorCodes;
|
||||
|
||||
static struct CodecActionCodes {
|
||||
@@ -756,6 +757,9 @@ static void throwCryptoException(JNIEnv *env, status_t err, const char *msg) {
|
||||
case ERROR_DRM_RESOURCE_BUSY:
|
||||
err = gCryptoErrorCodes.cryptoErrorResourceBusy;
|
||||
break;
|
||||
case ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION:
|
||||
err = gCryptoErrorCodes.cryptoErrorInsufficientOutputProtection;
|
||||
break;
|
||||
default: /* Other negative DRM error codes go out as is. */
|
||||
break;
|
||||
}
|
||||
@@ -1434,6 +1438,11 @@ static void android_media_MediaCodec_native_init(JNIEnv *env) {
|
||||
gCryptoErrorCodes.cryptoErrorResourceBusy =
|
||||
env->GetStaticIntField(clazz.get(), field);
|
||||
|
||||
field = env->GetStaticFieldID(clazz.get(), "ERROR_INSUFFICIENT_OUTPUT_PROTECTION", "I");
|
||||
CHECK(field != NULL);
|
||||
gCryptoErrorCodes.cryptoErrorInsufficientOutputProtection =
|
||||
env->GetStaticIntField(clazz.get(), field);
|
||||
|
||||
clazz.reset(env->FindClass("android/media/MediaCodec$CodecException"));
|
||||
CHECK(clazz.get() != NULL);
|
||||
field = env->GetStaticFieldID(clazz.get(), "ACTION_TRANSIENT", "I");
|
||||
|
||||
Reference in New Issue
Block a user