(I hope this is an appropriate list topic)
If I add a 2 second delay in glmovie before SMPEG_play() I see all the
frames of my mpg file from the beginning, with no delay I miss about the
first 120. This seems to be the time X takes to change the screen res
from 1024x768 to 640x480. If I modify glmovie.c to use 1024x768 no
delay is needed. One small mystery solved.
Another mystery remains with the callback to do the screen display.
Using the callback (rather than putting glmpeg_update() in the main
loop) glmpeg_update() is actually called every time a new frame is read,
just as it should be. However, instead of glmovie_draw() (the place
where the OpenGL stuff is done) taking about 5 or 10 ms, as it does when
the callback is not used, it only takes 0 or 1 ms (to tick resolution).
What is more, it does draw the last frame, but it seems to draw it
more or less immediately. In other words, instead of seeing the movie
you see just the last frame, held static for the duration of the movie.
I can’t understand how the program knows what the last frame is before
it has read through the whole mpg file. Maybe it looks at it first for
some reason (Sam?). The other puzzle is why the other frames (from the
beginning of the file) don’t get displayed. Since glmovie_draw is
getting called, my guess is that the block of pixels passed to it is not
changing for some reason.
All the testing I’ve done is with audio disabled, since I haven’t set up
the audio system under Linux yet.