test ofVideoPlayer new version

Thanks. I tried the new version loading different movies in the same object (one after the other using a timer). I loaded QT full frame (30fps), full size (720x480) and different codecs (DV, Sorenson, Mpg IV). In relation with the previous version I found two things:

  1. The black frame appeared just in the first loaded movie.
  2. When the first loaded movie is replaced for the second one, the last frame of the first or the first frame of the second (*) remains frozen for a while.

ivan

(*)
with DV Codec: last frame of the previous movie remain frozen for half a second aprox.
with Sorenson Codec: first frame of the new loaded movie remain frozen half a second aprox.
with Mpg IV Codec: last and first frame remain frozen for half a second each one aprox.

Bellow the function I used to test (consider I’m not a C++ progrmer)

void traceTimer(int keyValue) {

switch(sec){

case 0:
v = videoDeque[0];
delete p;
p = &v[0];
player_1.loadMovie§;
player_1.play();
break;

case 5:
//idem -second deque element
break;

case 10:
// idem - thirdth deque element
break;

case 15:
sec = 0;
break;

}//end switch

sec ++;
glutTimerFunc(1000, traceTimer, 0);

}//end trace

hi -

thanks – I can see the problem, we fixed it, but in a different way and not in the videoPlayer class itself – I will work on a fix for this videoPlayer class.

as for the delay, I’m not sure there is much we can do about that, besides invite you to use a thread to load the movie (and post some code of about that somewhere). That’s really qith quicktime, and no matter which way you slice it, I think you will always have a delay. the call we are using to load is ASYNC, but I find that even if quicktime returns “fully loaded” it freezes everything for a sec.

you could, for example, load one movie via the thread while another videoplayer is playing… that would be the ideal way to deal with latency in switching videos, I think…

more shortly on the black frame, at least. – zach

Thanks. I’ll try jumping between two player Objects.
In relation to

load one movie via the thread
if you have, I’ll thanks a link to example code.
i.

hi -

I can’t recreate the problem, but I’ve update the code in the SVN and it should get pixels in right away on load. the new code is in the same place:

http://www.openframeworks.cc/admin/inde-…-format=txt
http://www.openframeworks.cc/admin/inde-…-format=txt

can you let me know if it gets rid of black ? If not, can possibly post movies / and code so that we can test it?

the pause will still be there – we will post the thread code shortly to help with that…

thanks,
zach