int numFramesToSkip = 3;
LONGLONG currentFrame = 0, pos = 0;
pMediaSeeking->GetPositions( ¤tFrame, NULL );
pos = currentFrame + numFramesToSkip;
Is there a difference between these 2 lines:?
pFrameStep->Step( numFramesToSkip, NULL );
or
pMediaSeeking->SetPositions( &pos, AM_SEEKING_AbsolutePositioning, NULL,
AM_SEEKING_NoPositioning );
I want to have forward and backward frame stepping but seem to have
compatibity errors when I use Step for going forward and SetPositions for
going backwards, but when I use SetPositions for both frowards and backwards,
they seem to move smoothly. Is there a way to tell if I am using these
correctly or if they are equivalent? Thanks!
> I want to have forward and backward frame stepping but seem to have
> compatibity errors when I use Step for going forward and SetPositions for
> going backwards, but when I use SetPositions for both frowards and backwards,
> they seem to move smoothly. Is there a way to tell if I am using these
> correctly or if they are equivalent? Thanks!
They are not equivalent. Step occurs in real time (example: at 30 fps at 3
frame step will take 1/10 sec) whereas SetPositions happens as fast as
possible. There is no reason to use Step.
--
Please read this before replying:
1. Dshow & posting help: http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others: follow up if you are helped or you found a solution
> So the two will get me the same desired results in that the movie would be
> for example, 3 steps ahead of where it previously was but using SetPositions
> is better than using Step? Thanks again as I am a little unclear as to if the
> process is the only difference or the end result is also different. Thanks!
SetPositions may not be frame accurate, depending on the parser. Most will
only seek to Sync Points (key frames), the actual times seeked to can be
returned to you by passing the AM_SEEKING_ReturnTime flag.
--
http://www.chrisnet.net/code.htm
http://www.avdevforum.com/AV
> On Wed, 3 May 2006 08:45:06 -0700, Todd Dobmeyer wrote:
>
>> So the two will get me the same desired results in that the movie would be
>> for example, 3 steps ahead of where it previously was but using SetPositions
>> is better than using Step? Thanks again as I am a little unclear as to if the
>> process is the only difference or the end result is also different. Thanks!
>
> SetPositions may not be frame accurate, depending on the parser. Most will
> only seek to Sync Points (key frames), the actual times seeked to can be
> returned to you by passing the AM_SEEKING_ReturnTime flag.
Step controls the renderer -- n frames are allowed past (in real time as
TMH said, along with audio), and then the graph is paused. SetPositions
flushes the graph, resets the decoder, jumps to the new position and starts
decoding from the previous key frame, discarding any preroll frames until
it arrives at the target location. Most of the time, SetPositions is what
you want, but you can see from this description that in some cases Step
will be better.
G