Ok, I think I've narrowed down the issue, and I've managed to get an app that compiles and reads H.264 files. My thinking is that the ofVideoPlayer::loadMovie() method needs a modification for files like H.264, where GetMovieNextInterestingTime() returns only two interesting times when there should be many more than that. So, I added this mod to loadMovie():
AFTER this code:
while( curMovieTime >= 0 ) {
nFrames++;
GetMovieNextInterestingTime(moviePtr,flags,1,&whichMediaType,curMovieTime,0,&curMovieTime,&duration);
flags = nextTimeMediaSample;
}
nFrames--; // there's an extra time step at the end of themovie
I added this code:
if(nFrames == 2){
Media movieMedia;
MediaHandler movieMediaHandler;
MovieGetVideoMediaAndMediaHandler(moviePtr, &movieMedia, &movieMediaHandler);
nFrames = GetMediaSampleCount(movieMedia);
}
Also, in MediaGetStaticFrameRate() method of ofQtUtil.cpp, I uncommented the QuickTime 7 line of code, and commented out the GetMediaDuration() line of code:
//Quicktime 7.0 code
TimeValue64 duration = GetMediaDisplayDuration(inMovieMedia);
//TimeValue64 duration = GetMediaDuration(inMovieMedia);
Now, my OF app at least gets the right number of frames in the loaded H.264 movie, and nextFrame() works without throwing the error I mentioned at the beginning of this thread. However, going from frame to frame seems to be much slower now. Any thoughts? Should I look at some other classes and/or methods related to ofVideoPlayer.nextFrame()?
Many thanks in advance.