[futurebasic] QT movie slow to start

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : April 1998 : Group Archive : Group : All Groups

From: "Jeffrey Schwartz" <jeffrey.schwartz@...>
Date: 13 Apr 1998 02:15:46 -0400
This is probably more of an Inside Mac question than an FB question but let me try.

I've written a small QT video player (with the help of several list members!) that plays a QT movie in a window without a controller.  It is not event driven but just loops and finishes.

The first time the movie is played, the soundtrack starts right away but the video doesn't come on for a second or two.  The second and subsequent times the movie is played, both video and audio play from the beginning.

I'd like to not miss the first few seconds of video.  Any ideas?

Jeff Schwartz
--------------------------------------
  LONG IF FN ENTERMOVIES = _NoErr
    LONG IF FN OPENMOVIEFILE(fsSpec,MovieResRefNum%,_FSRdPerm) = _NoErr
      LONG IF FN NEWMOVIEFROMFILE(movieptr&,MovieResRefNum%,resID%,resName$,1,dataRefChgd%) = _NoErr
        LONG IF FN CLOSEMOVIEFILE(movieresrefnum%) =_NoErr
          CALL GETMOVIEBOX(movieptr&,rect%)
          CALL OFFSETRECT(rect%,-boxL%,-boxT%)
          CALL SETMOVIEBOX(movieptr&,rect%)
          WINDOW #_videoboxwindow, "", (h,v)-(h1,v1),_dialogplain
          CALL GETGWORLD(CGrafPtr&,CurDev&)
          CALL SETMOVIEGWORLD(movieptr&,CGrafPtr&,0)
          CALL GOTOBEGINNINGOFMOVIE(movieptr&)
          OsErr = FN PREROLLMOVIE(movieptr&,0,&1000)
          CALL STARTMOVIE(movieptr&)
        END IF
      END IF
    END IF
  END IF

  LONG IF movieptr&
    DO
      CALL MOVIESTASK(movieptr&,33)
    UNTIL FN ISMOVIEDONE(movieptr&)
  END IF
END FN