summaryrefslogtreecommitdiffstats
path: root/media/tests
diff options
context:
space:
mode:
authorHarish Mahendrakar <harish.mahendrakar@ittiam.com>2015-04-18 10:04:39 +0530
committerLajos Molnar <lajos@google.com>2015-05-05 11:05:22 -0700
commit34265cd94f76cc18648c310e4f120d280bf3a0a4 (patch)
treee84dafa7b195c5edb83f24d5db11bd40ca61df3e /media/tests
parentdef4c0c49aeebccbb42d9b82901a7de81782baad (diff)
downloadframeworks_base-34265cd94f76cc18648c310e4f120d280bf3a0a4.zip
frameworks_base-34265cd94f76cc18648c310e4f120d280bf3a0a4.tar.gz
frameworks_base-34265cd94f76cc18648c310e4f120d280bf3a0a4.tar.bz2
media: Added MPEG2 profile/levels and tests
Bug: 20852831 Change-Id: I172f2f08c30d12bf684f32a52db64823cc286d35
Diffstat (limited to 'media/tests')
-rw-r--r--media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaNames.java1
-rw-r--r--media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/performance/MediaPlayerPerformance.java25
-rw-r--r--media/tests/contents/media_api/video/MPEG2_1500_AAC_128.mp4bin0 -> 2100454 bytes
3 files changed, 21 insertions, 5 deletions
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaNames.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaNames.java
index 86c23c7..16b4c43 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaNames.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaNames.java
@@ -60,6 +60,7 @@ public class MediaNames {
public static final String VIDEO_H264_AAC = "/sdcard/media_api/video/H264_320_AAC_64.3gp";
public static final String VIDEO_H264_AMR = "/sdcard/media_api/video/H264_320_AMRNB_6.3gp";
public static final String VIDEO_HEVC_AAC = "/sdcard/media_api/video/HEVC_320_AAC_128.mp4";
+ public static final String VIDEO_MPEG2_AAC = "/sdcard/media_api/video/MPEG2_1500_AAC_128.mp4";
public static final String VIDEO_HIGHRES_H263 = "/sdcard/media_api/video/H263_500_AMRNB_12.3gp";
public static final String VIDEO_HIGHRES_MP4 = "/sdcard/media_api/video/H264_500_AAC_128.3gp";
public static final String VIDEO_WEBM = "/sdcard/media_api/video/big-buck-bunny_trailer.webm";
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/performance/MediaPlayerPerformance.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/performance/MediaPlayerPerformance.java
index 244b07f..c528165 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/performance/MediaPlayerPerformance.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/performance/MediaPlayerPerformance.java
@@ -432,7 +432,22 @@ public class MediaPlayerPerformance extends ActivityInstrumentationTestCase2<Med
assertTrue("HEVC playback memory test", memoryResult);
}
- // Test case 4: Capture the memory usage after every 20 video only recorded
+ // Test case 4: Capture the memory usage after every 20 mpeg2 playback
+ @LargeTest
+ public void testMPEG2VideoPlaybackMemoryUsage() throws Exception {
+ boolean memoryResult = false;
+
+ mStartPid = getMediaserverPid();
+ for (int i = 0; i < NUM_STRESS_LOOP; i++) {
+ mediaStressPlayback(MediaNames.VIDEO_MPEG2_AAC);
+ getMemoryWriteToLog(i);
+ writeProcmemInfo();
+ }
+ memoryResult = validateMemoryResult(mStartPid, mStartMemory, DECODER_LIMIT);
+ assertTrue("MPEG2 playback memory test", memoryResult);
+ }
+
+ // Test case 5: Capture the memory usage after every 20 video only recorded
@LargeTest
public void testH263RecordVideoOnlyMemoryUsage() throws Exception {
if (mCamcorderProfile != null) {
@@ -453,7 +468,7 @@ public class MediaPlayerPerformance extends ActivityInstrumentationTestCase2<Med
}
}
- // Test case 5: Capture the memory usage after every 20 video only recorded
+ // Test case 6: Capture the memory usage after every 20 video only recorded
@LargeTest
public void testMpeg4RecordVideoOnlyMemoryUsage() throws Exception {
if (mCamcorderProfile != null) {
@@ -474,7 +489,7 @@ public class MediaPlayerPerformance extends ActivityInstrumentationTestCase2<Med
}
}
- // Test case 6: Capture the memory usage after every 20 video and audio
+ // Test case 7: Capture the memory usage after every 20 video and audio
// recorded
@LargeTest
public void testRecordVideoAudioMemoryUsage() throws Exception {
@@ -496,7 +511,7 @@ public class MediaPlayerPerformance extends ActivityInstrumentationTestCase2<Med
}
}
- // Test case 7: Capture the memory usage after every 20 audio only recorded
+ // Test case 8: Capture the memory usage after every 20 audio only recorded
@LargeTest
public void testRecordAudioOnlyMemoryUsage() throws Exception {
boolean memoryResult = false;
@@ -511,7 +526,7 @@ public class MediaPlayerPerformance extends ActivityInstrumentationTestCase2<Med
assertTrue("audio record only memory test", memoryResult);
}
- // Test case 8: Capture the memory usage after every 20 camera preview
+ // Test case 9: Capture the memory usage after every 20 camera preview
@LargeTest
public void testCameraPreviewMemoryUsage() throws Exception {
boolean memoryResult = false;
diff --git a/media/tests/contents/media_api/video/MPEG2_1500_AAC_128.mp4 b/media/tests/contents/media_api/video/MPEG2_1500_AAC_128.mp4
new file mode 100644
index 0000000..33f66a0
--- /dev/null
+++ b/media/tests/contents/media_api/video/MPEG2_1500_AAC_128.mp4
Binary files differ