diff options
author | James Dong <jdong@google.com> | 2011-10-10 15:22:04 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-10-10 15:22:04 -0700 |
commit | 50c31024e30f26720321bbd5adeb46a554beca7e (patch) | |
tree | f81d6cccce8aafbfef0a8db5326a77d1362e71df /media | |
parent | 737f33091f28251f0ac6e525e7401c841ef54af0 (diff) | |
parent | f58ba6506959947d2e646833789c859ae50e6767 (diff) | |
download | frameworks_base-50c31024e30f26720321bbd5adeb46a554beca7e.zip frameworks_base-50c31024e30f26720321bbd5adeb46a554beca7e.tar.gz frameworks_base-50c31024e30f26720321bbd5adeb46a554beca7e.tar.bz2 |
Merge "Support AMR as a file type so that it can be imported into movie studio"
Diffstat (limited to 'media')
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; |