waiting for avi to finish, please help

Posted By: carlpa

waiting for avi to finish, please help - 05/05/15 13:29

I am working on a project for medical research. This is a reaction time study. The beginning is for inputinging test id. This is to be followed by an instructional avi. media_play is a background process and following instructions continue without waiting for the end of the avi, I know there are prior posts on this problem. There are so many posts in this forum that I don't know where to look. Can anyone direct me to the appropriate post? I need my test complete by June 1 as I hope to take it to China.

Thank you.
Posted By: Anonymous

Re: waiting for avi to finish, please help - 05/05/15 13:44

There is no time stamp seeking in media_play. So I would break the avi into many small avi's and look at checking media_playing var.

But I am not sure I understand what the problem is and what you would like to achieve.
Posted By: Ch40zzC0d3r

Re: waiting for avi to finish, please help - 05/05/15 14:34

Dont use media_play
The quality is shit and its not multithreaded loading
-> You cant do anything while you play the video without resulting in nervy lags

Take a look at the Bink player and some rip-ofs
Posted By: carlpa

Re: waiting for avi to finish, please help - 05/05/15 16:21

Thanks to all of you. The introduction function begins with enter ID, Enter age, etc. Then an avi. The avi is very simple, brief instructions on how and where to place the cursor and click.

My thought is to time the avi, then
media_play (...);
wait(-4);

in main: wait_for(introduction) to keep any other functions waiting. A good idea?
one simple solution?
Posted By: Anonymous

Re: waiting for avi to finish, please help - 05/05/15 16:36

Ch40zzC0d3r gives the best advice.

However

Code:
var mhandle =0;

function play_vid()
{
 mhandle = media_play(.....AVI);
while(media_playing(mhandle)){wait(1);}
... other actions to fallow....
}

Posted By: carlpa

Re: waiting for avi to finish, please help - 05/06/15 00:14

Dear Malice,

Your suggestion worked. You have taught me a valuable trick. It also made me feel foolish not to have seen it. Thank you very much.
Posted By: Anonymous

Re: waiting for avi to finish, please help - 05/06/15 00:30

Sure thing, your welcome.

Good luck on your project.
Mal
© 2024 lite-C Forums