More on DirectShow/MPEG2 Troubles
If I do the following (psuedocode):
1
2
3
4
mediaControl.Pause
mediaControl.GetState(50, state)
mediaSeeking.SetPositions(position, AbsolutePositioning, null, NoPositioning)
mediaControl.Run
I get the first frame of video showing and the playback is a noticeable number of frames prior to the position I really wanted. This is true even if I leave out the initial Pause.
However, if I do the following:
1
2
3
mediaControl.Run
mediaControl.GetState(50, state)
mediaSeeking.SetPositions(position, AbsolutePositioning, null, NoPositioning)
I still get the first frame showing, along with a blip of audio from the beginning of the file, but now the playback seems to be just slightly after the position I specified.
What the heck is the difference? I’m talking in the range of a full second (at least) difference between the two methods. Also, if I attempt to set the position, then run, I don’t get the first frame of video, however, the position is significantly prior to the one that I specified.
Aaaaarrrrg! This is driving me insane :-)
Oh well, more experimenting tomorrow…