Add "throws IOException" to MediaCodec constructors (8)

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: I6487408709342b390bac2b935f4642d4aaf36102
Signed-off-by: Andy Hung <hunga@google.com>
This commit is contained in:
Andy Hung
2013-11-04 15:24:46 -08:00
parent 30ae166370
commit 35133e2bc5
2 changed files with 31 additions and 19 deletions

View File

@@ -499,7 +499,8 @@ class MediaCodecView extends SurfaceView
}
private void addTrack(
int trackIndex, MediaFormat format, boolean encrypted) {
int trackIndex, MediaFormat format, boolean encrypted)
throws IOException {
String mime = format.getString(MediaFormat.KEY_MIME);
boolean isVideo = mime.startsWith("video/");