Hi,

I am currently writing a video file to the SDCard while playing it
with VideoView.

My problem is that, if I buffer 1MB of video and begin the Video
playback, the video stops after 1MB has been played, even though by
this time, 5MBs of file has now been written to the sdcard.

I have been trying various things in onCompletion handler.. such as:
                int curLoc = mp.getCurrentPosition();
                Log.e(LogName.onCompletion, LogName.onCompletion + 
"CurrentLocation:
" + mp.getCurrentPosition());
                Log.e(LogName.onCompletion, LogName.onCompletion + "Duration: " 
+
mp.getDuration());
                mp.pause();
                mp.prepareAsync();
                mp.start();
                mp.seekTo(curLoc);

In this case I get a "Cannot play video" message.

Or:
                int curLoc = mp.getCurrentPosition();
                Log.e(LogName.onCompletion, LogName.onCompletion + 
"CurrentLocation:
" + mp.getCurrentPosition());
                Log.e(LogName.onCompletion, LogName.onCompletion + "Duration: " 
+
mp.getDuration());
                mp.prepareAsync();
                mp.start();
                mp.seekTo(curLoc);

This crashes with "prepare Async in State 128".

Has anyone solved the problem of re-queuing file in the videoView so
that it plays everything that has been written to the sdcard even
though it starts with a smaller file?

Regards,
-jm

-- 
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

Reply via email to