Merge "Support AMR as a file type so that it can be imported into movie studio"
This commit is contained in:
@@ -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)) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user