From b6f0f962d9062ea136218f463f1105aa0076704a Mon Sep 17 00:00:00 2001 From: Jeff Tinker Date: Fri, 13 Sep 2013 15:32:08 -0700 Subject: [PATCH] Part of corrections from KLP API Review: Media b/10461617 Change-Id: Ic2e102c39428f7cef2923d00a67aec8c77cd108e --- media/java/android/media/MediaCodec.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/media/java/android/media/MediaCodec.java b/media/java/android/media/MediaCodec.java index f4e867efe4479..1250cbc2aac9e 100644 --- a/media/java/android/media/MediaCodec.java +++ b/media/java/android/media/MediaCodec.java @@ -294,6 +294,9 @@ final public class MediaCodec { */ public native final void flush(); + /** + * Thrown when a crypto error occurs while queueing a secure input buffer. + */ public final static class CryptoException extends RuntimeException { public CryptoException(int errorCode, String detailMessage) { super(detailMessage); @@ -318,6 +321,9 @@ final public class MediaCodec { */ public static final int ERROR_RESOURCE_BUSY = 3; + /** + * Retrieve the error code associated with a CryptoException + */ public int getErrorCode() { return mErrorCode; } @@ -449,6 +455,9 @@ final public class MediaCodec { * @param presentationTimeUs The time at which this buffer should be rendered. * @param flags A bitmask of flags {@link #BUFFER_FLAG_SYNC_FRAME}, * {@link #BUFFER_FLAG_CODEC_CONFIG} or {@link #BUFFER_FLAG_END_OF_STREAM}. + * @throws CryptoException if an error occurs while attempting to decrypt the buffer. + * An error code associated with the exception helps identify the + * reason for the failure. */ public native final void queueSecureInputBuffer( int index,