[SDL] smpeg/glmovie crawls

Gib Bogle bogle at ihug.co.nz
Tue Jul 2 20:15:01 PDT 2002

(I'm posting about this here because as far as I know the suggested
place for raising such issues, smpeg at lokigames.com, doesn't exist any
more.  Please correct me if I'm wrong about this.)

I'm trying to find out why glmovie plays an mpg file at about 1 fps,
while plaympeg plays it at the right speed, about 30 fps.  As far as I
can tell from a quick glance both programs use the same smpeg library
functions, but glmovie does more GL stuff with glTexSubImage2D().  A
quick check shows that the function glmovie_draw() is only using 5 ms
(fast graphics card), so the problem must lie on the smpeg side, with
the reading/decoding of the frame that is passed to glmovie_draw().

I looked at MPEGvideo.cpp, and tried defining TIME_MPEG, which causes
the frames to be read as fast as possible.  plaympeg then reports 177
frames in 0.58 sec (307 fps), while glmovie reports 177 frames in 1.51
sec (117 fps).  I'm not sure why these rates should differ, but in any
case they are very fast.  With plaympeg I see the video at high speed,
while in most cases glmovie just shows a blank screen, although on one
occasion I saw the last couple of frames (in this case the time was 2.6

It almost looks like a thread timing issue, but why should glmovie
differ from plaympeg in this regard?

Any suggestions?


Gib Bogle              bogle at ihug.co.nz
1/44 Arthur St         Tel: (64-9) 525-6878
Ellerslie, N.Z.        Fax: (64-9) 525-6878

More information about the SDL mailing list