Re: Modify frame rate of avi and asf file using Windows Media Obje

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



From: "ak268"

example, if i set the currrent pos i find that the
associated callback gets called, indicating that the pos
has been changed, but there is no such indication about
when the media has actually repainted at that position.

WMP just relies on DS and can only tell you when the seeking
operation completes on the graph.

Seeking is a complicated operation. The gist of it is that
seeking is performed by the file parser and causes all data
to be flushed and re-buffered and it may take some time for
the new data to reach the renderer after the parser has
completed the seek.

What you can do (in DS) is to stop the graph, seek, then
pause and wait for the pause to complete (Pause() is
asynchronous). When pause completes, the renderer will be
displaying the first frame.

Notice however that, if you always seek to the same position
all of your files at once and you use DS, you can also just
render all of the files in the same graph and they will stay
in sync automagically.



--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm


.



Relevant Pages

  • Re: WMR9, dual-screen, EC_PAUSED and delay in video playback
    ... graph, the filter graph manager first pauses the graph, if ... filter chain. ... In case anybody else is having the same problem, I've overriden the Pause, ... the renderer somehow cancels the first pause but I'd need to do some more ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Need more about Pause command
    ... I know that it immediatly stops renderer while graph goes on ... I need this information cause my source filter get a delayed pause ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Need more about Pause command
    ... I know that it immediatly stops renderer while graph goes on ... I need this information cause my source filter get a delayed pause ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Time not changing while fast forwarding
    ... I found, Pausemethod of source filter is getting called, when i ... The graph is definately "running" when in Pause mode. ... BeginFlush/EndFlush on the output pin and the renderer will release the ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Confusing message from GraphEdit
    ... GetState to the filter graph I walked thru the list of the filters and asked ... From GraphEdit I press Run and Pause - works fine. ...
    (microsoft.public.win32.programmer.directx.video)