9/16/2008

QTKit - Current frame

Get the current frame from a movie:

-(void) currentMovieFrame:(QTMovie *)movie {
QTTime currentTime = [movie currentTime];
long long currentFrame=(currentTime.timeValue/currentTime.timeScale)*currentTime.timeScale/100;
return currentFrame;
}

  • currentTime = QTTime movie current time duration, see QTMovie docs for more information.
  • timeValue = Duration of the movieclip in format frames
  • timeScale = Framerate of the movieclip in format 2997, 2400 etc.

No comments: