diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-09-25 03:31:28 -0400 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-09-25 03:31:28 -0400 |
commit | 3f790d87838114a71bff96b4a0a51537ca879597 (patch) | |
tree | 28d3750bbc51b328064dafe0d3868e2626344c69 /media | |
parent | fdf53a4628f915203752660aa07049aa22c01b5a (diff) | |
parent | a56e653130f2253edb97fe3a5feb18789c29ec9e (diff) | |
download | frameworks_base-3f790d87838114a71bff96b4a0a51537ca879597.zip frameworks_base-3f790d87838114a71bff96b4a0a51537ca879597.tar.gz frameworks_base-3f790d87838114a71bff96b4a0a51537ca879597.tar.bz2 |
Merge change 27011 into eclair
* changes:
Added the checking for the wma in the memory test.
Diffstat (limited to 'media')
-rw-r--r-- | media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/performance/MediaPlayerPerformance.java | 32 |
1 files changed, 17 insertions, 15 deletions
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 01c0920..0ae354a 100644 --- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/performance/MediaPlayerPerformance.java +++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/performance/MediaPlayerPerformance.java @@ -40,6 +40,7 @@ import java.io.FileWriter; import java.io.BufferedWriter; import android.media.MediaMetadataRetriever; +import com.android.mediaframeworktest.MediaProfileReader; /** * Junit / Instrumentation - performance measurement for media player and @@ -384,23 +385,24 @@ public class MediaPlayerPerformance extends ActivityInstrumentationTestCase<Medi @LargeTest public void testWMVVideoPlaybackMemoryUsage() throws Exception { boolean memoryResult = false; - mStartPid = getMediaserverPid(); - - File wmvMemoryOut = new File(MEDIA_MEMORY_OUTPUT); - Writer output = new BufferedWriter(new FileWriter(wmvMemoryOut, true)); - output.write("WMV video playback only\n"); - for (int i = 0; i < NUM_STRESS_LOOP; i++) { - mediaStressPlayback(MediaNames.VIDEO_WMV); - if (i == 0) { - mStartMemory = getMediaserverVsize(); - output.write("Start memory : " + mStartMemory + "\n"); + if (MediaProfileReader.getWMVEnable()){ + mStartPid = getMediaserverPid(); + File wmvMemoryOut = new File(MEDIA_MEMORY_OUTPUT); + Writer output = new BufferedWriter(new FileWriter(wmvMemoryOut, true)); + output.write("WMV video playback only\n"); + for (int i = 0; i < NUM_STRESS_LOOP; i++) { + mediaStressPlayback(MediaNames.VIDEO_WMV); + if (i == 0) { + mStartMemory = getMediaserverVsize(); + output.write("Start memory : " + mStartMemory + "\n"); + } + getMemoryWriteToLog(output); } - getMemoryWriteToLog(output); + output.write("\n"); + memoryResult = validateMemoryResult(mStartPid, mStartMemory, output); + output.close(); + assertTrue("wmv playback memory test", memoryResult); } - output.write("\n"); - memoryResult = validateMemoryResult(mStartPid, mStartMemory, output); - output.close(); - assertTrue("wmv playback memory test", memoryResult); } // Test case 4: Capture the memory usage after every 20 video only recorded |