Welcome to AddressOf.com Sign in | Help

More on DirectShow/MPEG2 Troubles

If I do the following (psuedocode):

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 noticable number of frames prior to the position I really wanted. This is true even if I leave out the inital Pause.

However, if I do the following:

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 beginnig 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...
Published Tuesday, September 23, 2003 7:17 PM by CorySmith
Filed under:

Comments

# re: More on DirectShow/MPEG2 Troubles

Sunday, April 24, 2005 6:02 AM by Rebel87
Try different Mpeg codecs (not elecard)

# re: More on DirectShow/MPEG2 Troubles

Monday, September 26, 2005 6:49 AM by Luz Avila
please need
Anonymous comments are disabled