aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2013-11-04 16:29:45 -0800
committerAndy Hung <hunga@google.com>2013-11-04 16:29:45 -0800
commit81b692f8f2ba165dd6fcd2e05d4195cff12790ea (patch)
tree0ddf88ff76c35f11f2556ca97f55f9af0284bbdb /common
parentd26c23e38fd2368d078984fc864591daaee189c5 (diff)
downloadandroid-81b692f8f2ba165dd6fcd2e05d4195cff12790ea.tar.gz
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 <hunga@google.com>
Diffstat (limited to 'common')
-rw-r--r--common/src/java/com/example/android/common/media/MediaCodecWrapper.java3
1 files changed, 2 insertions, 1 deletions
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;