diff options
author | James Dong <jdong@google.com> | 2011-10-09 21:02:12 -0700 |
---|---|---|
committer | James Dong <jdong@google.com> | 2011-10-09 21:14:58 -0700 |
commit | f58ba6506959947d2e646833789c859ae50e6767 (patch) | |
tree | 6333600bfc316ce5db2d92be9804ad39629d7833 /media/java | |
parent | f6497e45fae88788b1c67d815458355a1f2f65b5 (diff) | |
download | frameworks_base-f58ba6506959947d2e646833789c859ae50e6767.zip frameworks_base-f58ba6506959947d2e646833789c859ae50e6767.tar.gz frameworks_base-f58ba6506959947d2e646833789c859ae50e6767.tar.bz2 |
Support AMR as a file type so that it can be imported into movie studio
Change-Id: I3fc4f49ae0a210f53b1bab68716f4e558b3d91c5
related-to-bug: 5419452
Diffstat (limited to 'media/java')
3 files changed, 8 insertions, 3 deletions
diff --git a/media/java/android/media/videoeditor/AudioTrack.java b/media/java/android/media/videoeditor/AudioTrack.java index 2de82f2..c5cc2ca 100755 --- a/media/java/android/media/videoeditor/AudioTrack.java +++ b/media/java/android/media/videoeditor/AudioTrack.java @@ -147,14 +147,16 @@ public class AudioTrack { } catch (Exception e) { throw new IllegalArgumentException(e.getMessage() + " : " + filename); } - switch (mMANativeHelper.getFileType(properties.fileType)) { + int fileType = mMANativeHelper.getFileType(properties.fileType); + switch (fileType) { case MediaProperties.FILE_3GP: case MediaProperties.FILE_MP4: case MediaProperties.FILE_MP3: + case MediaProperties.FILE_AMR: break; default: { - throw new IllegalArgumentException("Unsupported input file type"); + throw new IllegalArgumentException("Unsupported input file type: " + fileType); } } switch (mMANativeHelper.getAudioCodecType(properties.audioFormat)) { diff --git a/media/java/android/media/videoeditor/MediaArtistNativeHelper.java b/media/java/android/media/videoeditor/MediaArtistNativeHelper.java index d7b8eaa..03ae62a 100644 --- a/media/java/android/media/videoeditor/MediaArtistNativeHelper.java +++ b/media/java/android/media/videoeditor/MediaArtistNativeHelper.java @@ -3239,6 +3239,9 @@ class MediaArtistNativeHelper { case FileType.M4V: retValue = MediaProperties.FILE_M4V; break; + case FileType.AMR: + retValue = MediaProperties.FILE_AMR; + break; default: retValue = -1; diff --git a/media/java/android/media/videoeditor/MediaProperties.java b/media/java/android/media/videoeditor/MediaProperties.java index fd034ab..cf518a5 100755 --- a/media/java/android/media/videoeditor/MediaProperties.java +++ b/media/java/android/media/videoeditor/MediaProperties.java @@ -286,7 +286,7 @@ public class MediaProperties { */ public static final int FILE_3GP = 0; public static final int FILE_MP4 = 1; - // 2 is for AMRNB + public static final int FILE_AMR = 2; public static final int FILE_MP3 = 3; // 4 is for PCM public static final int FILE_JPEG = 5; |