Methods Summary |
---|
protected void | setUp()
//Insert a 2 second before launching the test activity. This is
//the workaround for the race condition of requesting the updated surface.
Thread.sleep(2000);
getActivity();
super.setUp();
|
public void | testAMRGetCurrentPosition()
boolean currentPosition = CodecTest.getCurrentPosition(MediaNames.AMR);
assertTrue("AMR GetCurrentPosition", currentPosition);
|
public void | testAMRGetDuration()
int duration = CodecTest.getDuration(MediaNames.AMR);
duratoinWithinTolerence = verifyDuration(duration, MediaNames.AMR_LENGTH);
assertTrue("AMR getDuration", duratoinWithinTolerence);
|
public void | testAMRPause()
boolean isPaused = CodecTest.pause(MediaNames.AMR);
assertTrue("AMR Pause", isPaused);
|
public void | testAMRSeekTo()
boolean isLoop = CodecTest.seekTo(MediaNames.AMR);
assertTrue("AMR seekTo", isLoop);
|
public void | testAMRSeekToEnd()
boolean isEnd = CodecTest.seekToEnd(MediaNames.AMR);
assertTrue("AMR seekToEnd", isEnd);
|
public void | testAMRSetLooping()
boolean isLoop = CodecTest.setLooping(MediaNames.AMR);
assertTrue("AMR setLooping", isLoop);
|
public void | testGetThumbnail()
boolean getThumbnail = CodecTest.getThumbnail(MediaNames.VIDEO_H264_AAC, MediaNames.GOLDEN_THUMBNAIL_OUTPUT);
assertTrue("Get Thumbnail", getThumbnail);
|
public void | testIsLooping()
boolean isLooping = CodecTest.isLooping(MediaNames.AMR);
assertTrue("isLooping", isLooping);
|
public void | testIsLoopingAfterReset()
boolean isLooping = CodecTest.isLoopingAfterReset(MediaNames.AMR);
assertTrue("isLooping after reset", isLooping);
|
public void | testLargeVideoHeigth()
int height = 0;
height = CodecTest.videoHeight(MediaNames.VIDEO_LARGE_SIZE_3GP);
Log.v(TAG, "Video height = " + height);
assertEquals("streaming video height", 240, height);
|
public void | testLargeVideoWidth()
int width = 0;
width = CodecTest.videoWidth(MediaNames.VIDEO_LARGE_SIZE_3GP);
Log.v(TAG, "Video width = " + width);
assertEquals("streaming video width", 320, width);
|
public void | testLocalH263AMRPrepareAsyncCallback()
boolean onPrepareSuccess =
CodecTest.prepareAsyncCallback(MediaNames.VIDEO_H263_AMR, false);
assertTrue("testLocalH263AMRPrepareAsyncCallback", onPrepareSuccess);
|
public void | testLocalMp3PrepareAsyncCallback()
boolean onPrepareSuccess =
CodecTest.prepareAsyncCallback(MediaNames.MP3CBR, false);
assertTrue("LocalMp3prepareAsyncCallback", onPrepareSuccess);
|
public void | testMIDIGetCurrentPosition()
boolean currentPosition = CodecTest.getCurrentPosition(MediaNames.MIDI);
assertTrue("MIDI GetCurrentPosition", currentPosition);
|
public void | testMIDIGetDuration()
int duration = CodecTest.getDuration(MediaNames.MIDI);
duratoinWithinTolerence = verifyDuration(duration, MediaNames.MIDI_LENGTH);
assertTrue("MIDI getDuration", duratoinWithinTolerence);
|
public void | testMIDIPause()
boolean isPaused = CodecTest.pause(MediaNames.MIDI);
assertTrue("MIDI Pause", isPaused);
|
public void | testMIDIPrepareStopRelease()
CodecTest.prepareStopRelease(MediaNames.MIDI);
assertTrue("MIDI prepareStopRelease", true);
|
public void | testMIDISeekTo()
boolean isLoop = CodecTest.seekTo(MediaNames.MIDI);
assertTrue("MIDI seekTo", isLoop);
|
public void | testMIDISeekToEnd()
boolean isEnd = CodecTest.seekToEnd(MediaNames.MIDI);
assertTrue("MIDI seekToEnd", isEnd);
|
public void | testMIDISetLooping()
boolean isLoop = CodecTest.setLooping(MediaNames.MIDI);
assertTrue("MIDI setLooping", isLoop);
|
public void | testMP3CBRGetCurrentPosition()
boolean currentPosition = CodecTest.getCurrentPosition(MediaNames.MP3CBR);
assertTrue("MP3CBR GetCurrentPosition", currentPosition);
|
public void | testMP3CBRGetDuration()
int duration = CodecTest.getDuration(MediaNames.MP3CBR);
duratoinWithinTolerence = verifyDuration(duration, MediaNames.MP3CBR_LENGTH);
assertTrue("MP3CBR getDuration", duratoinWithinTolerence);
|
public void | testMP3CBRPause()
boolean isPaused = CodecTest.pause(MediaNames.MP3CBR);
assertTrue("MP3CBR Pause", isPaused);
|
public void | testMP3CBRPrepareStopRelease()
CodecTest.prepareStopRelease(MediaNames.MP3CBR);
assertTrue("MP3CBR prepareStopRelease", true);
|
public void | testMP3CBRSeekBeforeStart()
boolean seekBeforePlay = CodecTest.seektoBeforeStart(MediaNames.MP3CBR);
assertTrue("MP3CBR SeekBeforePlay", seekBeforePlay);
|
public void | testMP3CBRSeekTo()
boolean isLoop = CodecTest.seekTo(MediaNames.MP3CBR);
assertTrue("MP3CBR seekTo", isLoop);
|
public void | testMP3CBRSeekToEnd()
boolean isEnd = CodecTest.seekToEnd(MediaNames.MP3CBR);
assertTrue("MP3CBR seekToEnd", isEnd);
|
public void | testMP3CBRSetLooping()
boolean isLoop = CodecTest.setLooping(MediaNames.MP3CBR);
assertTrue("MP3CBR setLooping", isLoop);
|
public void | testMP3VBRGetCurrentPosition()
boolean currentPosition = CodecTest.getCurrentPosition(MediaNames.MP3VBR);
assertTrue("MP3VBR GetCurrentPosition", currentPosition);
|
public void | testMP3VBRGetDuration()
int duration = CodecTest.getDuration(MediaNames.MP3VBR);
Log.v(TAG, "getDuration");
duratoinWithinTolerence = verifyDuration(duration, MediaNames.MP3VBR_LENGTH);
assertTrue("MP3VBR getDuration", duratoinWithinTolerence);
|
public void | testMP3VBRPause()
boolean isPaused = CodecTest.pause(MediaNames.MP3VBR);
assertTrue("MP3VBR Pause", isPaused);
|
public void | testMP3VBRSeekTo()
boolean isLoop = CodecTest.seekTo(MediaNames.MP3VBR);
Log.v(TAG, "seekTo");
assertTrue("MP3VBR seekTo", isLoop);
|
public void | testMP3VBRSeekToEnd()
boolean isEnd = CodecTest.seekToEnd(MediaNames.MP3VBR);
Log.v(TAG, "seekTo");
assertTrue("MP3VBR seekToEnd", isEnd);
|
public void | testMP3VBRSetLooping()
boolean isLoop = CodecTest.setLooping(MediaNames.MP3VBR);
Log.v(TAG, "setLooping");
assertTrue("MP3VBR setLooping", isLoop);
|
public void | testMidiResources()
boolean midiResources = CodecTest.resourcesPlayback(MediaFrameworkTest.midiafd,16000);
assertTrue("Play midi from resources", midiResources);
|
public void | testMp3Resources()
boolean mp3Resources = CodecTest.resourcesPlayback(MediaFrameworkTest.mp3afd,25000);
assertTrue("Play mp3 from resources", mp3Resources);
|
public void | testPrepareAsyncReset()
//assertTrue(MediaFrameworkTest.checkStreamingServer());
boolean isReset = CodecTest.prepareAsyncReset(MediaNames.STREAM_MP3);
assertTrue("PrepareAsync Reset", isReset);
|
public void | testSoundRecord()
boolean isRecordered = CodecTest.mediaRecorderRecord(MediaNames.RECORDER_OUTPUT);
assertTrue("Recorder", isRecordered);
|
public void | testStreamPrepareAsyncCallback()
//assertTrue(MediaFrameworkTest.checkStreamingServer());
boolean onPrepareSuccess =
CodecTest.prepareAsyncCallback(MediaNames.STREAM_H264_480_360_1411k, false);
assertTrue("StreamH264PrepareAsyncCallback", onPrepareSuccess);
|
public void | testStreamPrepareAsyncCallbackReset()
//assertTrue(MediaFrameworkTest.checkStreamingServer());
boolean onPrepareSuccess =
CodecTest.prepareAsyncCallback(MediaNames.STREAM_H264_480_360_1411k, true);
assertTrue("StreamH264PrepareAsyncCallback", onPrepareSuccess);
|
public void | testVideoH263AACSeekTo()
boolean isSeek = CodecTest.videoSeekTo(MediaNames.VIDEO_H263_AAC);
assertTrue("H263AAC SeekTo", isSeek);
|
public void | testVideoH263AMRSeekTo()
boolean isSeek = CodecTest.videoSeekTo(MediaNames.VIDEO_H263_AMR);
assertTrue("H263AMR SeekTo", isSeek);
|
public void | testVideoH264AACSeekTo()
boolean isSeek = CodecTest.videoSeekTo(MediaNames.VIDEO_H264_AAC);
assertTrue("H264AAC SeekTo", isSeek);
|
public void | testVideoH264AMRSeekTo()
boolean isSeek = CodecTest.videoSeekTo(MediaNames.VIDEO_H264_AMR);
assertTrue("H264AMR SeekTo", isSeek);
|
public void | testVideoMP4SeekTo()
boolean isSeek = CodecTest.videoSeekTo(MediaNames.VIDEO_MP4);
assertTrue("Local MP4 SeekTo", isSeek);
|
public void | testVideoWebmSeekTo()
boolean isSeek = CodecTest.videoSeekTo(MediaNames.VIDEO_WEBM);
assertTrue("WEBM SeekTo", isSeek);
|
public void | testWAVSeekToEnd()
boolean isEnd = CodecTest.seekToEnd(MediaNames.WAV);
assertTrue("WAV seekToEnd", isEnd);
|
public boolean | verifyDuration(int duration, int expectedDuration)
if ((duration > expectedDuration * 1.1) || (duration < expectedDuration * 0.9))
return false;
else
return true;
|