hi,
I want to play a video frame by frame with the mediaplayer in android.
for example. there is a video which framerate is 20fps(frame per second).
As i think,for 50ms,a frame will pass.
what i want is this,*every time i click the frame button,the video play a
frame more or less.*
here is my code.but i find i just click less than ten times,the video has
played for a second.
Anybody can help me?Thank you!
private boolean HDPlayer_PlayByFrame() {
Log.i(TAG, "HDPlayer_PlayByFrame");
boolean ret = false;
if(mMediaPlayer == null)
return ret;
try {
mMediaPlayer.start();
Thread.sleep(50);
mMediaPlayer.pause();
mbtnPlayOrPause.setImageResource(R.drawable.play);
ret = true;
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return ret;
}
--
杨辉
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en