Merge "Merging the same files on top of tree." into honeycomb
diff --git a/media/java/android/media/videoeditor/MediaArtistNativeHelper.java b/media/java/android/media/videoeditor/MediaArtistNativeHelper.java
index 362de03..27ea3c0 100644
--- a/media/java/android/media/videoeditor/MediaArtistNativeHelper.java
+++ b/media/java/android/media/videoeditor/MediaArtistNativeHelper.java
@@ -339,10 +339,13 @@
public static final int JPG = 5;
/** GIF image file type. */
- public static final int GIF = 6;
+ public static final int GIF = 7;
/** PNG image file type. */
- public static final int PNG = 7;
+ public static final int PNG = 8;
+
+ /** M4V file type. */
+ public static final int M4V = 10;
/** Unsupported file type. */
public static final int UNSUPPORTED = 255;
@@ -3256,6 +3259,9 @@
case FileType.MP3:
retValue = MediaProperties.FILE_MP3;
break;
+ case FileType.M4V:
+ retValue = MediaProperties.FILE_M4V;
+ break;
default:
retValue = -1;
@@ -3386,6 +3392,9 @@
case MediaProperties.FILE_PNG:
retValue = FileType.PNG;
break;
+ case MediaProperties.FILE_M4V:
+ retValue = FileType.M4V;
+ break;
default:
retValue = -1;
diff --git a/media/java/android/media/videoeditor/MediaProperties.java b/media/java/android/media/videoeditor/MediaProperties.java
index 9654a6a..a2e01f6 100755
--- a/media/java/android/media/videoeditor/MediaProperties.java
+++ b/media/java/android/media/videoeditor/MediaProperties.java
@@ -190,15 +190,20 @@
public static final int FILE_MP3 = 3;
// 4 is for PCM
public static final int FILE_JPEG = 5;
- // 6 is for GIF
- public static final int FILE_PNG = 7;
+ // 6 is for BMP
+ // 7 is for GIF
+ public static final int FILE_PNG = 8;
+ // 9 is for ARGB8888
+ public static final int FILE_M4V = 10;
public static final int FILE_UNSUPPORTED = 255;
+
/**
* The array of the supported file formats
*/
private static final int[] SUPPORTED_VIDEO_FILE_FORMATS = new int[] {
FILE_3GP,
- FILE_MP4
+ FILE_MP4,
+ FILE_M4V
};
/**
diff --git a/media/java/android/media/videoeditor/MediaVideoItem.java b/media/java/android/media/videoeditor/MediaVideoItem.java
index 2981b41..02155db 100755
--- a/media/java/android/media/videoeditor/MediaVideoItem.java
+++ b/media/java/android/media/videoeditor/MediaVideoItem.java
@@ -120,8 +120,8 @@
switch (mMANativeHelper.getFileType(properties.fileType)) {
case MediaProperties.FILE_3GP:
- break;
case MediaProperties.FILE_MP4:
+ case MediaProperties.FILE_M4V:
break;
default:
@@ -130,11 +130,8 @@
switch (mMANativeHelper.getVideoCodecType(properties.videoFormat)) {
case MediaProperties.VCODEC_H263:
- break;
case MediaProperties.VCODEC_H264BP:
- break;
case MediaProperties.VCODEC_H264MP:
- break;
case MediaProperties.VCODEC_MPEG4:
break;
diff --git a/media/jni/mediaeditor/VideoEditorClasses.cpp b/media/jni/mediaeditor/VideoEditorClasses.cpp
index c3585e8..8a35041 100755
--- a/media/jni/mediaeditor/VideoEditorClasses.cpp
+++ b/media/jni/mediaeditor/VideoEditorClasses.cpp
@@ -145,6 +145,7 @@
VIDEOEDIT_JAVA_CONSTANT_INIT("MP3", M4VIDEOEDITING_kFileType_MP3),
VIDEOEDIT_JAVA_CONSTANT_INIT("PCM", M4VIDEOEDITING_kFileType_PCM),
VIDEOEDIT_JAVA_CONSTANT_INIT("JPG", M4VIDEOEDITING_kFileType_JPG),
+ VIDEOEDIT_JAVA_CONSTANT_INIT("M4V", M4VIDEOEDITING_kFileType_M4V),
VIDEOEDIT_JAVA_CONSTANT_INIT("UNSUPPORTED", M4VIDEOEDITING_kFileType_Unsupported)
};
@@ -330,6 +331,7 @@
VIDEOEDIT_JAVA_CONSTANT_INIT("JPG", VideoEditClasses_kFileType_JPG),
VIDEOEDIT_JAVA_CONSTANT_INIT("GIF", VideoEditClasses_kFileType_GIF),
VIDEOEDIT_JAVA_CONSTANT_INIT("PNG", VideoEditClasses_kFileType_PNG),
+ VIDEOEDIT_JAVA_CONSTANT_INIT("M4V", VideoEditClasses_kFileType_M4V),
VIDEOEDIT_JAVA_CONSTANT_INIT("UNSUPPORTED", VideoEditClasses_kFileType_Unsupported)
};
diff --git a/media/jni/mediaeditor/VideoEditorClasses.h b/media/jni/mediaeditor/VideoEditorClasses.h
index 3c8f055..045f229 100755
--- a/media/jni/mediaeditor/VideoEditorClasses.h
+++ b/media/jni/mediaeditor/VideoEditorClasses.h
@@ -91,8 +91,11 @@
VideoEditClasses_kFileType_MP3,
VideoEditClasses_kFileType_PCM,
VideoEditClasses_kFileType_JPG,
+ VideoEditClasses_kFileType_BMP,
VideoEditClasses_kFileType_GIF,
VideoEditClasses_kFileType_PNG,
+ VideoEditClasses_kFileType_ARGB8888,
+ VideoEditClasses_kFileType_M4V,
VideoEditClasses_kFileType_Unsupported
} VideoEditClasses_FileType;
diff --git a/media/jni/mediaeditor/VideoEditorJava.cpp b/media/jni/mediaeditor/VideoEditorJava.cpp
index 1d610f6..884256a 100755
--- a/media/jni/mediaeditor/VideoEditorJava.cpp
+++ b/media/jni/mediaeditor/VideoEditorJava.cpp
@@ -410,7 +410,7 @@
(*pValue) = pEnv->GetStaticIntField(clazz, fieldId);
// Log the value.
- VIDEOEDIT_LOG_EXCEPTION(ANDROID_LOG_INFO, "VIDEO_EDITOR_JAVA",
+ VIDEOEDIT_LOG_FUNCTION(ANDROID_LOG_INFO, "VIDEO_EDITOR_JAVA",
"videoEditJava_getStaticIntField, %s = %d", pName, (*pValue));
}
else
diff --git a/media/jni/mediaeditor/VideoEditorPropertiesMain.cpp b/media/jni/mediaeditor/VideoEditorPropertiesMain.cpp
index 7bf76da..35c14b6 100755
--- a/media/jni/mediaeditor/VideoEditorPropertiesMain.cpp
+++ b/media/jni/mediaeditor/VideoEditorPropertiesMain.cpp
@@ -165,7 +165,8 @@
(VideoEditClasses_kFileType_MP4 == fileType) ||
(VideoEditClasses_kFileType_3GPP == fileType) ||
(VideoEditClasses_kFileType_AMR == fileType) ||
- (VideoEditClasses_kFileType_PCM == fileType))
+ (VideoEditClasses_kFileType_PCM == fileType) ||
+ (VideoEditClasses_kFileType_M4V == fileType))
{
// Allocate a new clip properties structure.
pClipProperties =
@@ -316,12 +317,13 @@
extension[index] = M4OSA_chrToLower(pExtension[index]);
}
- // Check if the extension is ".mp3".
+ // Check if the extension is ".mp3".
if (!(VideoEdit_chrCompare(extension, (M4OSA_Char*)"mp3", &cmpResult)))
{
*pFileType = VideoEditClasses_kFileType_MP3;
*pClipType = M4VIDEOEDITING_kFileType_MP3;
- } // Check if the extension is ".mp4".
+ }
+ // Check if the extension is ".mp4".
else if (!(VideoEdit_chrCompare(extension, (M4OSA_Char*)"mp4", &cmpResult)))
{
*pFileType = VideoEditClasses_kFileType_MP4;
@@ -333,7 +335,7 @@
*pFileType = VideoEditClasses_kFileType_3GPP;
*pClipType = M4VIDEOEDITING_kFileType_3GPP;
}
- // Check if the extension is ".3gp".
+ // Check if the extension is ".m4a".
else if (!(VideoEdit_chrCompare(extension, (M4OSA_Char*)"m4a", &cmpResult)))
{
*pFileType = VideoEditClasses_kFileType_3GPP;
@@ -348,7 +350,6 @@
// Check if the extension is ".amr".
else if (!(VideoEdit_chrCompare(extension, (M4OSA_Char*)"amr", &cmpResult)))
{
-
*pFileType = VideoEditClasses_kFileType_AMR;
*pClipType = M4VIDEOEDITING_kFileType_AMR;
}
@@ -378,9 +379,13 @@
{
*pFileType = VideoEditClasses_kFileType_PNG;
}
-
+ // Check if the extension is ".m4v".
+ else if (!(VideoEdit_chrCompare(extension, (M4OSA_Char*)"m4v", &cmpResult)))
+ {
+ *pFileType = VideoEditClasses_kFileType_M4V;
+ *pClipType = M4VIDEOEDITING_kFileType_M4V;
+ }
}
-
}
static M4OSA_ERR getClipProperties(