Loading api/current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -15141,8 +15141,11 @@ package android.media { public static final class MediaCodec.CodecException extends java.lang.IllegalStateException { method public java.lang.String getDiagnosticInfo(); method public int getReason(); method public boolean isRecoverable(); method public boolean isTransient(); field public static final int REASON_HARDWARE = 0; // 0x0 field public static final int REASON_RECLAIMED = 1; // 0x1 } public static final class MediaCodec.CryptoException extends java.lang.RuntimeException { api/system-current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -16353,8 +16353,11 @@ package android.media { public static final class MediaCodec.CodecException extends java.lang.IllegalStateException { method public java.lang.String getDiagnosticInfo(); method public int getReason(); method public boolean isRecoverable(); method public boolean isTransient(); field public static final int REASON_HARDWARE = 0; // 0x0 field public static final int REASON_RECLAIMED = 1; // 0x1 } public static final class MediaCodec.CryptoException extends java.lang.RuntimeException { media/java/android/media/MediaCodec.java +24 −0 Original line number Diff line number Diff line Loading @@ -687,6 +687,7 @@ final public class MediaCodec { CodecException(int errorCode, int actionCode, String detailMessage) { super(detailMessage); mErrorCode = errorCode; mReason = REASON_HARDWARE; mActionCode = actionCode; // TODO get this from codec Loading @@ -713,6 +714,15 @@ final public class MediaCodec { return mActionCode == ACTION_RECOVERABLE; } /** * Retrieve the reason associated with a CodecException. * The reason could be one of {@link #REASON_HARDWARE} or {@link #REASON_RECLAIMED}. * */ public int getReason() { return mReason; } /** * Retrieve the error code associated with a CodecException. * This is opaque diagnostic information and may depend on Loading @@ -734,6 +744,19 @@ final public class MediaCodec { return mDiagnosticInfo; } /** * This indicates the exception is caused by the hardware. */ public static final int REASON_HARDWARE = 0; /** * This indicates the exception is because the resource manager reclaimed * the media resource used by the codec. * <p> * With this exception, the codec must be released, as it has moved to terminal state. */ public static final int REASON_RECLAIMED = 1; /* Must be in sync with android_media_MediaCodec.cpp */ private final static int ACTION_FATAL = 0; private final static int ACTION_TRANSIENT = 1; Loading @@ -741,6 +764,7 @@ final public class MediaCodec { private final String mDiagnosticInfo; private final int mErrorCode; private final int mReason; private final int mActionCode; } Loading Loading
api/current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -15141,8 +15141,11 @@ package android.media { public static final class MediaCodec.CodecException extends java.lang.IllegalStateException { method public java.lang.String getDiagnosticInfo(); method public int getReason(); method public boolean isRecoverable(); method public boolean isTransient(); field public static final int REASON_HARDWARE = 0; // 0x0 field public static final int REASON_RECLAIMED = 1; // 0x1 } public static final class MediaCodec.CryptoException extends java.lang.RuntimeException {
api/system-current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -16353,8 +16353,11 @@ package android.media { public static final class MediaCodec.CodecException extends java.lang.IllegalStateException { method public java.lang.String getDiagnosticInfo(); method public int getReason(); method public boolean isRecoverable(); method public boolean isTransient(); field public static final int REASON_HARDWARE = 0; // 0x0 field public static final int REASON_RECLAIMED = 1; // 0x1 } public static final class MediaCodec.CryptoException extends java.lang.RuntimeException {
media/java/android/media/MediaCodec.java +24 −0 Original line number Diff line number Diff line Loading @@ -687,6 +687,7 @@ final public class MediaCodec { CodecException(int errorCode, int actionCode, String detailMessage) { super(detailMessage); mErrorCode = errorCode; mReason = REASON_HARDWARE; mActionCode = actionCode; // TODO get this from codec Loading @@ -713,6 +714,15 @@ final public class MediaCodec { return mActionCode == ACTION_RECOVERABLE; } /** * Retrieve the reason associated with a CodecException. * The reason could be one of {@link #REASON_HARDWARE} or {@link #REASON_RECLAIMED}. * */ public int getReason() { return mReason; } /** * Retrieve the error code associated with a CodecException. * This is opaque diagnostic information and may depend on Loading @@ -734,6 +744,19 @@ final public class MediaCodec { return mDiagnosticInfo; } /** * This indicates the exception is caused by the hardware. */ public static final int REASON_HARDWARE = 0; /** * This indicates the exception is because the resource manager reclaimed * the media resource used by the codec. * <p> * With this exception, the codec must be released, as it has moved to terminal state. */ public static final int REASON_RECLAIMED = 1; /* Must be in sync with android_media_MediaCodec.cpp */ private final static int ACTION_FATAL = 0; private final static int ACTION_TRANSIENT = 1; Loading @@ -741,6 +764,7 @@ final public class MediaCodec { private final String mDiagnosticInfo; private final int mErrorCode; private final int mReason; private final int mActionCode; } Loading