From 81b692f8f2ba165dd6fcd2e05d4195cff12790ea Mon Sep 17 00:00:00 2001 From: Andy Hung Date: Mon, 4 Nov 2013 16:29:45 -0800 Subject: Add "throws IOException" to MediaCodec constructors (11) Change to add "throws IOException" to android.media.MediaCodec (createByCodecName|createDecoderByType|createEncoderByType). The exception was previously thrown through the native JNI, but not explicitly declared. Requires changes to existing code for declaration compatibility. Bug: 11364276 Change-Id: Idb37e0bd97bfcef3f0951efcad3c7cce4d9c5758 Signed-off-by: Andy Hung --- .../src/java/com/example/android/common/media/MediaCodecWrapper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'common') diff --git a/common/src/java/com/example/android/common/media/MediaCodecWrapper.java b/common/src/java/com/example/android/common/media/MediaCodecWrapper.java index a511221f..a4833740 100644 --- a/common/src/java/com/example/android/common/media/MediaCodecWrapper.java +++ b/common/src/java/com/example/android/common/media/MediaCodecWrapper.java @@ -21,6 +21,7 @@ import android.os.Handler; import android.os.Looper; import android.view.Surface; +import java.io.IOException; import java.nio.ByteBuffer; import java.util.ArrayDeque; import java.util.Queue; @@ -136,7 +137,7 @@ public class MediaCodecWrapper { * @return */ public static MediaCodecWrapper fromVideoFormat(final MediaFormat trackFormat, - Surface surface) { + Surface surface) throws IOException { MediaCodecWrapper result = null; MediaCodec videoCodec = null; -- cgit v1.2.3