summaryrefslogtreecommitdiffstats
path: root/media/tests/MediaFrameworkTest/src
diff options
context:
space:
mode:
authorRajneesh Chowdury <rajneeshc@google.com>2011-08-12 16:43:37 -0700
committerRajneesh Chowdury <rajneeshc@google.com>2011-08-19 14:34:47 -0700
commit3ced044154945f9d60983032278e00fe28f4ab1b (patch)
tree84dc5de0042328edd75dc1a24982e7f3af9f92c9 /media/tests/MediaFrameworkTest/src
parent16296180984756e631611005179f42865af35621 (diff)
downloadframeworks_base-3ced044154945f9d60983032278e00fe28f4ab1b.zip
frameworks_base-3ced044154945f9d60983032278e00fe28f4ab1b.tar.gz
frameworks_base-3ced044154945f9d60983032278e00fe28f4ab1b.tar.bz2
Fix for 4142219 Don't hard code platform-specific limitations (Jni/ Java)
Also fixes 5118207 add other video codec support for video editor export. Change-Id: If72427173bd8ff684af07ba00f4425c1deef29c6
Diffstat (limited to 'media/tests/MediaFrameworkTest/src')
-rwxr-xr-xmedia/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaPropertiesTest.java105
-rwxr-xr-xmedia/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/VideoEditorExportTest.java16
-rw-r--r--media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/performance/VideoEditorPerformance.java9
-rwxr-xr-xmedia/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/VideoEditorStressTest.java15
4 files changed, 87 insertions, 58 deletions
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaPropertiesTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaPropertiesTest.java
index 4d517db..0ad6760 100755
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaPropertiesTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaPropertiesTest.java
@@ -71,7 +71,7 @@ public class MediaPropertiesTest extends
protected void validateVideoProperties(int aspectRatio, int fileType,
int videoCodecType, int duration, int videoBitrate, int fps,
- int videoProfile, int width, int height, int audioCodecType,
+ int videoProfile, int videoLevel, int width, int height, int audioCodecType,
int audioSamplingFrequency, int audioChannel, int audioBitrate,
MediaVideoItem mvi) throws Exception {
assertEquals("Aspect Ratio Mismatch", aspectRatio, mvi.getAspectRatio());
@@ -82,6 +82,8 @@ public class MediaPropertiesTest extends
duration, mvi.getDuration(), 10));
assertEquals("Video Profile " + mvi.getVideoProfile(), videoProfile,
mvi.getVideoProfile());
+ assertEquals("Video Level " + mvi.getVideoLevel(), videoLevel,
+ mvi.getVideoLevel());
assertEquals("Video height " + mvi.getHeight(), height, mvi.getHeight());
assertEquals("Video width " + mvi.getWidth(), width, mvi.getWidth());
/** Check FPS with 10% range */
@@ -143,7 +145,8 @@ public class MediaPropertiesTest extends
final int audioCodecType = MediaProperties.ACODEC_AAC_LC;
final int audioSamplingFrequency = 16000;
final int audioChannel = 2;
- final int videoProfile = MediaProperties.MPEG4_SP_LEVEL_1;
+ final int videoProfile = MediaProperties.MPEG4Profile.MPEG4ProfileSimple;
+ final int videoLevel = MediaProperties.MPEG4Level.MPEG4Level1;
final int width = 854;
final int height = MediaProperties.HEIGHT_480;
@@ -152,7 +155,7 @@ public class MediaPropertiesTest extends
MediaItem.RENDERING_MODE_BLACK_BORDER);
validateVideoProperties(aspectRatio, fileType, videoCodecType, duration,
- videoBitrate, fps, videoProfile, width, height, audioCodecType,
+ videoBitrate, fps, videoProfile, videoLevel, width, height, audioCodecType,
audioSamplingFrequency, audioChannel, audioBitrate, mvi);
}
@@ -175,7 +178,8 @@ public class MediaPropertiesTest extends
final int audioCodecType = MediaProperties.ACODEC_AMRNB;
final int audioSamplingFrequency = 8000;
final int audioChannel = 1;
- final int videoProfile = MediaProperties.MPEG4_SP_LEVEL_1;
+ final int videoProfile = MediaProperties.MPEG4Profile.MPEG4ProfileSimple;
+ final int videoLevel = MediaProperties.MPEG4Level.MPEG4Level1;
final int width = 800;
final int height = MediaProperties.HEIGHT_480;
final int renderingMode = MediaItem.RENDERING_MODE_BLACK_BORDER;
@@ -184,7 +188,7 @@ public class MediaPropertiesTest extends
(mVideoEditor, "m1", videoItemFilename, renderingMode);
validateVideoProperties(aspectRatio, fileType, videoCodecType, duration,
- videoBitrate, fps, videoProfile, width, height, audioCodecType,
+ videoBitrate, fps, videoProfile, videoLevel, width, height, audioCodecType,
audioSamplingFrequency, audioChannel, audioBitrate, mvi);
}
@@ -206,7 +210,8 @@ public class MediaPropertiesTest extends
final int audioCodecType = MediaProperties.ACODEC_AAC_LC;
final int audioSamplingFrequency = 48000;
final int audioChannel = 2;
- final int videoProfile = MediaProperties.MPEG4_SP_LEVEL_1;
+ final int videoProfile = MediaProperties.MPEG4Profile.MPEG4ProfileSimple;
+ final int videoLevel = MediaProperties.MPEG4Level.MPEG4Level1;
final int width = 720;
final int height = MediaProperties.HEIGHT_480;
final int renderingMode = MediaItem.RENDERING_MODE_BLACK_BORDER;
@@ -215,7 +220,7 @@ public class MediaPropertiesTest extends
(mVideoEditor, "m1", videoItemFilename, renderingMode);
validateVideoProperties(aspectRatio, fileType, videoCodecType, duration,
- videoBitrate, fps, videoProfile, width, height, audioCodecType,
+ videoBitrate, fps, videoProfile, videoLevel, width, height, audioCodecType,
audioSamplingFrequency, audioChannel, audioBitrate, mvi);
}
@@ -237,7 +242,8 @@ public class MediaPropertiesTest extends
final int audioCodecType = MediaProperties.ACODEC_AAC_LC;
final int audioSamplingFrequency = 48000;
final int audioChannel = 2;
- final int videoProfile = MediaProperties.MPEG4_SP_LEVEL_1;
+ final int videoProfile = MediaProperties.MPEG4Profile.MPEG4ProfileSimple;
+ final int videoLevel = MediaProperties.MPEG4Level.MPEG4Level1;
final int width = 640;
final int height = MediaProperties.HEIGHT_480;
final int renderingMode = MediaItem.RENDERING_MODE_BLACK_BORDER;
@@ -246,7 +252,7 @@ public class MediaPropertiesTest extends
(mVideoEditor, "m1", videoItemFilename, renderingMode);
validateVideoProperties(aspectRatio, fileType, videoCodecType, duration,
- videoBitrate, fps, videoProfile, width, height, audioCodecType,
+ videoBitrate, fps, videoProfile, videoLevel, width, height, audioCodecType,
audioSamplingFrequency, audioChannel, audioBitrate, mvi);
}
@@ -268,7 +274,8 @@ public class MediaPropertiesTest extends
final int audioCodecType = MediaProperties.ACODEC_AMRNB;
final int audioSamplingFrequency = 8000;
final int audioChannel = 1;
- final int videoProfile = MediaProperties.MPEG4_SP_LEVEL_1;
+ final int videoProfile = MediaProperties.MPEG4Profile.MPEG4ProfileSimple;
+ final int videoLevel = MediaProperties.MPEG4Level.MPEG4Level1;
final int width = 176;
final int height = MediaProperties.HEIGHT_144;
final int renderingMode = MediaItem.RENDERING_MODE_BLACK_BORDER;
@@ -277,7 +284,7 @@ public class MediaPropertiesTest extends
(mVideoEditor, "m1", videoItemFilename, renderingMode);
validateVideoProperties(aspectRatio, fileType, videoCodecType, duration,
- videoBitrate, fps, videoProfile, width, height, audioCodecType,
+ videoBitrate, fps, videoProfile, videoLevel, width, height, audioCodecType,
audioSamplingFrequency, audioChannel, audioBitrate, mvi);
}
@@ -299,7 +306,8 @@ public class MediaPropertiesTest extends
final int audioCodecType = MediaProperties.ACODEC_AAC_LC;
final int audioSamplingFrequency = 16000;
final int audioChannel = 1;
- final int videoProfile = MediaProperties.H263_PROFILE_0_LEVEL_10;
+ final int videoProfile = MediaProperties.H263Profile.H263ProfileBaseline;
+ final int videoLevel = MediaProperties.H263Level.H263Level10;
final int width = 176;
final int height = MediaProperties.HEIGHT_144;
final int renderingMode = MediaItem.RENDERING_MODE_BLACK_BORDER;
@@ -307,7 +315,7 @@ public class MediaPropertiesTest extends
(mVideoEditor, "m1", videoItemFilename, renderingMode);
validateVideoProperties(aspectRatio, fileType, videoCodecType, duration,
- videoBitrate, fps, videoProfile, width, height, audioCodecType,
+ videoBitrate, fps, videoProfile, videoLevel, width, height, audioCodecType,
audioSamplingFrequency, audioChannel, audioBitrate, mvi);
}
@@ -321,7 +329,7 @@ public class MediaPropertiesTest extends
+ "H264_BP_640x480_15fps_1200Kbps_AACLC_48KHz_64kps_m_0_27.3gp";
final int aspectRatio = MediaProperties.ASPECT_RATIO_4_3;
final int fileType = MediaProperties.FILE_3GP;
- final int videoCodecType = MediaProperties.VCODEC_H264BP;
+ final int videoCodecType = MediaProperties.VCODEC_H264;
final int duration = 77600;
final int videoBitrate = 745000;
final int audioBitrate = 64000;
@@ -329,7 +337,8 @@ public class MediaPropertiesTest extends
final int audioCodecType = MediaProperties.ACODEC_AAC_LC;
final int audioSamplingFrequency = 48000;
final int audioChannel = 2;
- final int videoProfile = MediaProperties.H264_PROFILE_0_LEVEL_1_3;
+ final int videoProfile = MediaProperties.H264Profile.H264ProfileBaseline;
+ final int videoLevel = MediaProperties.H264Level.H264Level13;
final int width = 640;
final int height = MediaProperties.HEIGHT_480;
final int renderingMode = MediaItem.RENDERING_MODE_BLACK_BORDER;
@@ -337,7 +346,7 @@ public class MediaPropertiesTest extends
(mVideoEditor, "m1", videoItemFilename, renderingMode);
validateVideoProperties(aspectRatio, fileType, videoCodecType, duration,
- videoBitrate, fps, videoProfile, width, height, audioCodecType,
+ videoBitrate, fps, videoProfile, videoLevel, width, height, audioCodecType,
audioSamplingFrequency, audioChannel, audioBitrate, mvi);
}
@@ -351,7 +360,7 @@ public class MediaPropertiesTest extends
+ "H264_BP_720x480_25fps_256kbps_AMRNB_8khz_12.2kbps_m_0_26.mp4";
final int aspectRatio = MediaProperties.ASPECT_RATIO_3_2;
final int fileType = MediaProperties.FILE_MP4;
- final int videoCodecType = MediaProperties.VCODEC_H264BP;
+ final int videoCodecType = MediaProperties.VCODEC_H264;
final int duration = 26880;
final int videoBitrate = 244000;
final int audioBitrate = 12200;
@@ -359,7 +368,8 @@ public class MediaPropertiesTest extends
final int audioCodecType = MediaProperties.ACODEC_AMRNB;
final int audioSamplingFrequency = 8000;
final int audioChannel = 1;
- final int videoProfile = MediaProperties.H264_PROFILE_0_LEVEL_1_3;
+ final int videoProfile = MediaProperties.H264Profile.H264ProfileBaseline;
+ final int videoLevel = MediaProperties.H264Level.H264Level13;
final int width = 720;
final int height = MediaProperties.HEIGHT_480;
final int renderingMode = MediaItem.RENDERING_MODE_BLACK_BORDER;
@@ -368,7 +378,7 @@ public class MediaPropertiesTest extends
(mVideoEditor, "m1", videoItemFilename, renderingMode);
validateVideoProperties(aspectRatio, fileType, videoCodecType, duration,
- videoBitrate, fps, videoProfile, width, height, audioCodecType,
+ videoBitrate, fps, videoProfile, videoLevel, width, height, audioCodecType,
audioSamplingFrequency, audioChannel, audioBitrate, mvi);
}
@@ -382,7 +392,7 @@ public class MediaPropertiesTest extends
"H264_BP_800x480_15fps_512kbps_AACLC_24KHz_38Kbps_s_1_17.mp4";
final int aspectRatio = MediaProperties.ASPECT_RATIO_5_3;
final int fileType = MediaProperties.FILE_MP4;
- final int videoCodecType = MediaProperties.VCODEC_H264BP;
+ final int videoCodecType = MediaProperties.VCODEC_H264;
final int duration = 77466;
final int videoBitrate = 528000;
final int audioBitrate = 38000;
@@ -390,7 +400,8 @@ public class MediaPropertiesTest extends
final int audioCodecType = MediaProperties.ACODEC_AAC_LC;
final int audioSamplingFrequency = 24000;
final int audioChannel = 2;
- final int videoProfile = MediaProperties.H264_PROFILE_0_LEVEL_1_3;
+ final int videoProfile = MediaProperties.H264Profile.H264ProfileBaseline;
+ final int videoLevel = MediaProperties.H264Level.H264Level13;
final int width = 800;
final int height = MediaProperties.HEIGHT_480;
final int renderingMode = MediaItem.RENDERING_MODE_BLACK_BORDER;
@@ -399,7 +410,7 @@ public class MediaPropertiesTest extends
(mVideoEditor, "m1", videoItemFilename, renderingMode);
validateVideoProperties(aspectRatio, fileType, videoCodecType, duration,
- videoBitrate, fps, videoProfile, width, height, audioCodecType,
+ videoBitrate, fps, videoProfile, videoLevel, width, height, audioCodecType,
audioSamplingFrequency, audioChannel, audioBitrate, mvi);
}
@@ -413,7 +424,7 @@ public class MediaPropertiesTest extends
+ "H264_BP_1280x720_15fps_512kbps_AACLC_16khz_48kbps_s_1_17.mp4";
final int aspectRatio = MediaProperties.ASPECT_RATIO_16_9;
final int fileType = MediaProperties.FILE_MP4;
- final int videoCodecType = MediaProperties.VCODEC_H264BP;
+ final int videoCodecType = MediaProperties.VCODEC_H264;
final int duration = 77600;
final int videoBitrate = 606000;
final int audioBitrate = 48000;
@@ -421,7 +432,8 @@ public class MediaPropertiesTest extends
final int audioCodecType = MediaProperties.ACODEC_AAC_LC;
final int audioSamplingFrequency = 16000;
final int audioChannel = 2;
- final int videoProfile = MediaProperties.H264_PROFILE_0_LEVEL_1_3;
+ final int videoProfile = MediaProperties.H264Profile.H264ProfileBaseline;
+ final int videoLevel = MediaProperties.H264Level.H264Level13;
final int width = 1280;
final int height = MediaProperties.HEIGHT_720;
final int renderingMode = MediaItem.RENDERING_MODE_BLACK_BORDER;
@@ -430,7 +442,7 @@ public class MediaPropertiesTest extends
(mVideoEditor, "m1", videoItemFilename, renderingMode);
validateVideoProperties(aspectRatio, fileType, videoCodecType, duration,
- videoBitrate, fps, videoProfile, width, height, audioCodecType,
+ videoBitrate, fps, videoProfile, videoLevel, width, height, audioCodecType,
audioSamplingFrequency, audioChannel, audioBitrate, mvi);
}
@@ -444,7 +456,7 @@ public class MediaPropertiesTest extends
+ "H264_BP_1080x720_30fps_12Mbps_AACLC_44.1khz_64kbps_s_1_17.mp4";
final int aspectRatio = MediaProperties.ASPECT_RATIO_3_2;
final int fileType = MediaProperties.FILE_MP4;
- final int videoCodecType = MediaProperties.VCODEC_H264BP;
+ final int videoCodecType = MediaProperties.VCODEC_H264;
final int duration = 77500;
final int videoBitrate = 1190000;
final int audioBitrate = 64000;
@@ -452,7 +464,8 @@ public class MediaPropertiesTest extends
final int audioCodecType = MediaProperties.ACODEC_AAC_LC;
final int audioSamplingFrequency = 44100;
final int audioChannel = 2;
- final int videoProfile = MediaProperties.H264_PROFILE_0_LEVEL_1_3;
+ final int videoProfile = MediaProperties.H264Profile.H264ProfileBaseline;
+ final int videoLevel = MediaProperties.H264Level.H264Level13;
final int width = 1080;
final int height = MediaProperties.HEIGHT_720;
final int renderingMode = MediaItem.RENDERING_MODE_BLACK_BORDER;
@@ -461,7 +474,7 @@ public class MediaPropertiesTest extends
(mVideoEditor, "m1", videoItemFilename, renderingMode);
validateVideoProperties(aspectRatio, fileType, videoCodecType, duration,
- videoBitrate, fps, videoProfile, width, height, audioCodecType,
+ videoBitrate, fps, videoProfile, videoLevel, width, height, audioCodecType,
audioSamplingFrequency, audioChannel, audioBitrate, mvi);
}
@@ -491,7 +504,7 @@ public class MediaPropertiesTest extends
}
/**
- *To test media properties for H.264 Main/Advanced profile. (unsupported profile input)
+ *To test media properties for H.264 Main/Advanced profile.
*/
// TODO : Remove TC_MP_013
@LargeTest
@@ -499,19 +512,28 @@ public class MediaPropertiesTest extends
final String videoItemFilename = INPUT_FILE_PATH
+ "H264_MP_960x720_25fps_800kbps_AACLC_48Khz_192Kbps_s_1_17.mp4";
final int aspectRatio = MediaProperties.ASPECT_RATIO_4_3;
- //final int videoCodecType = MediaProperties.VCODEC_H264BP;
- final int videoCodecType = MediaProperties.VCODEC_H264MP;
+ final int videoCodecType = MediaProperties.VCODEC_H264;
+ final int fileType = MediaProperties.FILE_MP4;
+ final int duration = 77500;
+ final int videoBitrate = 800000;
+ final int audioBitrate = 192000;
+ final int fps = 25;
+ final int audioCodecType = MediaProperties.ACODEC_AAC_LC;
+ final int audioSamplingFrequency = 48000;
+ final int audioChannel = 2;
+ final int videoProfile = MediaProperties.H264Profile.H264ProfileMain;
+ final int videoLevel = MediaProperties.H264Level.H264Level31;
+ final int width = 960;
+ final int height = MediaProperties.HEIGHT_720;
final int renderingMode = MediaItem.RENDERING_MODE_BLACK_BORDER;
- boolean flagForException = false;
- try {
final MediaVideoItem mvi = mVideoEditorHelper.createMediaItem
(mVideoEditor, "m1", videoItemFilename, renderingMode);
- assertEquals("VideoCodec Mismatch", videoCodecType, mvi.getVideoType());
- }catch (IllegalArgumentException e){
- flagForException = true;
- }
- assertTrue("Unsupported Main Profile", flagForException);
+
+ validateVideoProperties(aspectRatio, fileType, videoCodecType, duration,
+ videoBitrate, fps, videoProfile, videoLevel, width, height, audioCodecType,
+ audioSamplingFrequency, audioChannel, audioBitrate, mvi);
+
}
/**
@@ -544,7 +566,7 @@ public class MediaPropertiesTest extends
"H264_BP_1080x720_30fps_800kbps_1_17.mp4";
final int aspectRatio = MediaProperties.ASPECT_RATIO_3_2;
final int fileType = MediaProperties.FILE_MP4;
- final int videoCodecType = MediaProperties.VCODEC_H264BP;
+ final int videoCodecType = MediaProperties.VCODEC_H264;
final int duration = 77366;
final int videoBitrate = 859000;
final int audioBitrate = 0;
@@ -552,7 +574,8 @@ public class MediaPropertiesTest extends
final int audioCodecType = -1;
final int audioSamplingFrequency = 0;
final int audioChannel = 0;
- final int videoProfile = MediaProperties.H264_PROFILE_0_LEVEL_1_3;
+ final int videoProfile = MediaProperties.H264Profile.H264ProfileBaseline;
+ final int videoLevel = MediaProperties.H264Level.H264Level13;
final int width = 1080;
final int height = MediaProperties.HEIGHT_720;
final int renderingMode = MediaItem.RENDERING_MODE_BLACK_BORDER;
@@ -561,7 +584,7 @@ public class MediaPropertiesTest extends
(mVideoEditor, "m1", videoItemFilename, renderingMode);
validateVideoProperties(aspectRatio, fileType, videoCodecType, duration,
- videoBitrate, fps, videoProfile, width, height, audioCodecType,
+ videoBitrate, fps, videoProfile, videoLevel, width, height, audioCodecType,
audioSamplingFrequency, audioChannel, audioBitrate, mvi);
}
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/VideoEditorExportTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/VideoEditorExportTest.java
index 74d4766..e1b337d 100755
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/VideoEditorExportTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/VideoEditorExportTest.java
@@ -166,7 +166,7 @@ public class VideoEditorExportTest extends
+ mediaImageItem6.getDuration();
mVideoEditorHelper.validateExport(mVideoEditor, outFilename,
MediaProperties.HEIGHT_720, 0, storyBoardDuration,
- MediaProperties.VCODEC_H264BP, MediaProperties.ACODEC_AAC_LC);
+ MediaProperties.VCODEC_H264, MediaProperties.ACODEC_AAC_LC);
mVideoEditorHelper.checkDeleteExistingFile(outFilename);
}
@@ -294,7 +294,7 @@ public class VideoEditorExportTest extends
+ mediaImageItem6.getDuration();
mVideoEditorHelper.validateExport(mVideoEditor, outFilename,
MediaProperties.HEIGHT_720, 0, storyBoardDuration,
- MediaProperties.VCODEC_H264BP, MediaProperties.ACODEC_AAC_LC);
+ MediaProperties.VCODEC_H264, MediaProperties.ACODEC_AAC_LC);
mVideoEditorHelper.checkDeleteExistingFile(outFilename);
}
@@ -352,7 +352,7 @@ public class VideoEditorExportTest extends
}
mVideoEditorHelper.validateExport(mVideoEditor, outFilename,
MediaProperties.HEIGHT_720, 0, mediaImageItem.getDuration(),
- MediaProperties.VCODEC_H264BP, MediaProperties.ACODEC_AAC_LC);
+ MediaProperties.VCODEC_H264, MediaProperties.ACODEC_AAC_LC);
mVideoEditorHelper.checkDeleteExistingFile(outFilename);
}
@@ -412,7 +412,7 @@ public class VideoEditorExportTest extends
mVideoEditorHelper.validateExport(mVideoEditor, outFilename,
MediaProperties.HEIGHT_720, 0, (mediaVideoItem.getTimelineDuration() +
mediaImageItem.getDuration()),
- MediaProperties.VCODEC_H264BP, MediaProperties.ACODEC_AAC_LC);
+ MediaProperties.VCODEC_H264, MediaProperties.ACODEC_AAC_LC);
mVideoEditorHelper.checkDeleteExistingFile(outFilename);
}
@@ -531,7 +531,7 @@ public class VideoEditorExportTest extends
+ mediaItem6.getTimelineDuration() - transition5And6.getDuration();
mVideoEditorHelper.validateExport(mVideoEditor, outFilename,
MediaProperties.HEIGHT_720, 0, storyBoardDuration,
- MediaProperties.VCODEC_H264BP, MediaProperties.ACODEC_AAC_LC);
+ MediaProperties.VCODEC_H264, MediaProperties.ACODEC_AAC_LC);
mVideoEditorHelper.checkDeleteExistingFile(outFilename);
}
@@ -693,7 +693,7 @@ public class VideoEditorExportTest extends
mVideoEditorHelper.validateExport(mVideoEditor, outFilename,
MediaProperties.HEIGHT_144, 0, storyBoardDuration,
- MediaProperties.VCODEC_H264BP, MediaProperties.ACODEC_AAC_LC);
+ MediaProperties.VCODEC_H264, MediaProperties.ACODEC_AAC_LC);
mVideoEditorHelper.checkDeleteExistingFile(outFilename);
}
@@ -730,7 +730,7 @@ public class VideoEditorExportTest extends
}
mVideoEditorHelper.validateExport(mVideoEditor, outFilename,
MediaProperties.HEIGHT_720, 0, mediaItem1.getDuration(),
- MediaProperties.VCODEC_H264BP, MediaProperties.ACODEC_AAC_LC);
+ MediaProperties.VCODEC_H264, MediaProperties.ACODEC_AAC_LC);
mVideoEditorHelper.checkDeleteExistingFile(outFilename);
}
@@ -814,7 +814,7 @@ public class VideoEditorExportTest extends
mVideoEditorHelper.validateExport(mVideoEditor, outFilename,
MediaProperties.HEIGHT_720, 0,
(mediaVideoItem.getDuration()+ mediaVideoItem1.getDuration()),
- MediaProperties.VCODEC_H264BP, MediaProperties.ACODEC_AAC_LC);
+ MediaProperties.VCODEC_H264, MediaProperties.ACODEC_AAC_LC);
mVideoEditorHelper.checkDeleteExistingFile(outFilename);
}
}
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/performance/VideoEditorPerformance.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/performance/VideoEditorPerformance.java
index 7eb6d22..3d0be4f 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/performance/VideoEditorPerformance.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/performance/VideoEditorPerformance.java
@@ -366,7 +366,7 @@ public class VideoEditorPerformance extends
final int renderingMode = MediaItem.RENDERING_MODE_BLACK_BORDER;
final int outHeight = MediaProperties.HEIGHT_480;
final int outBitrate = MediaProperties.BITRATE_256K;
- final int outVcodec = MediaProperties.VCODEC_H264BP;
+ final int outVcodec = MediaProperties.VCODEC_H264;
final String[] loggingInfo = new String[1];
final String outFilename = mVideoEditorHelper
.createRandomFile(mVideoEditor.getPath() + "/") + ".3gp";
@@ -639,11 +639,12 @@ public class VideoEditorPerformance extends
final int renderingMode = MediaItem.RENDERING_MODE_BLACK_BORDER;
final int aspectRatio = MediaProperties.ASPECT_RATIO_3_2;
final int fileType = MediaProperties.FILE_MP4;
- final int videoCodecType = MediaProperties.VCODEC_H264BP;
+ final int videoCodecType = MediaProperties.VCODEC_H264;
final int duration = 77366;
final int videoBitrate = 3169971;
final int fps = 30;
- final int videoProfile = MediaProperties.H264_PROFILE_0_LEVEL_1_3;
+ final int videoProfile = MediaProperties.H264Profile.H264ProfileBaseline;
+ final int videoLevel = MediaProperties.H264Level.H264Level13;
final int width = 1080;
final int height = MediaProperties.HEIGHT_720;
int timeTaken = 0;
@@ -665,6 +666,8 @@ public class VideoEditorPerformance extends
duration, mediaVideoItem.getDuration());
assertEquals("Video Profile ",
videoProfile, mediaVideoItem.getVideoProfile());
+ assertEquals("Video Level ",
+ videoLevel, mediaVideoItem.getVideoLevel());
assertEquals("Video height ",
height, mediaVideoItem.getHeight());
assertEquals("Video width ",
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/VideoEditorStressTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/VideoEditorStressTest.java
index 94ffb8e..4d30784 100755
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/VideoEditorStressTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/VideoEditorStressTest.java
@@ -665,9 +665,10 @@ public class VideoEditorStressTest
int i = 0;
final int videoAspectRatio = MediaProperties.ASPECT_RATIO_3_2;
final int videoFileType = MediaProperties.FILE_MP4;
- final int videoCodecType = MediaProperties.VCODEC_H264BP;
+ final int videoCodecType = MediaProperties.VCODEC_H264;
final int videoDuration = 77366;
- final int videoProfile = MediaProperties.H264_PROFILE_0_LEVEL_1_3;
+ final int videoProfile = MediaProperties.H264Profile.H264ProfileBaseline;
+ final int videoLevel = MediaProperties.H264Level.H264Level13;
final int videoHeight = MediaProperties.HEIGHT_720;
final int videoWidth = 1080;
@@ -698,6 +699,8 @@ public class VideoEditorStressTest
videoDuration, mediaItem1.getDuration());
assertEquals("Video Profile ",
videoProfile, mediaItem1.getVideoProfile());
+ assertEquals("Video Level ",
+ videoLevel, mediaItem1.getVideoLevel());
assertEquals("Video height ",
videoHeight, mediaItem1.getHeight());
assertEquals("Video width ",
@@ -939,9 +942,9 @@ public class VideoEditorStressTest
for ( i = 0; i < 50; i++) {
if(i%4 ==0){
- final int aspectRatio = MediaProperties.ASPECT_RATIO_4_3;
+ final int aspectRatio = MediaProperties.ASPECT_RATIO_11_9;
mVideoEditor.setAspectRatio(aspectRatio);
- mVideoEditor.export(outFilename, MediaProperties.HEIGHT_480,
+ mVideoEditor.export(outFilename, MediaProperties.HEIGHT_288,
MediaProperties.BITRATE_256K,MediaProperties.ACODEC_AAC_LC,
MediaProperties.VCODEC_H263,
new ExportProgressListener() {
@@ -967,7 +970,7 @@ public class VideoEditorStressTest
mVideoEditor.setAspectRatio(aspectRatio);
mVideoEditor.export(outFilename, MediaProperties.HEIGHT_144,
MediaProperties.BITRATE_512K,MediaProperties.ACODEC_AAC_LC,
- MediaProperties.VCODEC_H264BP,
+ MediaProperties.VCODEC_H264,
new ExportProgressListener() {
public void onProgress(VideoEditor ve, String outFileName,
int progress) {
@@ -979,7 +982,7 @@ public class VideoEditorStressTest
mVideoEditor.setAspectRatio(aspectRatio);
mVideoEditor.export(outFilename, MediaProperties.HEIGHT_480,
MediaProperties.BITRATE_800K,MediaProperties.ACODEC_AAC_LC,
- MediaProperties.VCODEC_H264BP,
+ MediaProperties.VCODEC_H264,
new ExportProgressListener() {
public void onProgress(VideoEditor ve, String outFileName,
int progress) {