Re: Wait for SetPositions

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Iain (Iain_at_idclTAKEAWAY.co.uk)
Date: 12/14/04


Date: Tue, 14 Dec 2004 08:24:36 +0000

On 13 Dec 2004 18:06:02 -0800, Dan203 wrote:

> Instead of using a hard coded ::Sleep command I was wondering if there
> was any way to wait for the graph to completely render the previous
> jump before issuing the next one?

YOu should use IMediaControl::GetState in a loop to determine when the
graph has started to play.

> Any other way to create a more
> consistant high speed FF?
>
If you are using MPEG, one problem is that the only way to find a
particular location in the media is to start at the beginning and parse the
entire file. (well you can seek to physically in the file where you guess
it might be and then parse a bit and see if it is and move around ...).

THe other issue is that the IMediaSeeking methods Stop the graph, flush it
and restart it. All of which is time consuming.

An alterntative approach to this would be to put a filter AFTER the parser
and before the decoder which simply passed through 1 second of samples,
then discarded 4 seconds. You would need to fix the timestamps so the
stream appeared continuous (so the second of samples after the first
discard would have 4 seconds removed form the time stamp).

YOu could also do this AFTER the decoder but you will have incurred the
cost of decoding the audio.

This will work less well with the video unless you ensure that your samples
are stopped restarted at key frames.

Iain

-- 
Iain Downs (DirectShow MVP)
Software Product Consultant
www.idcl.co.uk


Relevant Pages

  • Re: Combinatorics question
    ... Now, I have to start to discard: "abce" is the first one to discard, ... Construct a graph G with vertex set T and such that two ... a problem relevant to coding theory, ... I would look in a text on coding theory ...
    (sci.math)
  • Re: GMFBridge compressed streams in suspend mode?
    ... Discard the rest. ... -set the source graph to discard mode ... -pause the capture graph on the EndOfSegment Event ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: GraphEdit Render Media File...
    ... I don't really see why the mpeg2 decoder should work in GraphEdit and not ... and I suppose that nvidia could have piggy-backed ... > But how does the nvidia filter know that it's myapp's graph and not ... > GE's or WMP's graph. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: AsyncFile Source issues
    ... window will show a grey box, or just the background of the window. ... Now if i stop or pause the graph and then play it form the start again ... The decoder will decode ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Moniker binding problem
    ... decoder that I have. ... I don't understand why, if I can identify the filter, I ... So I have been trying to build a filter graph using the ... > which most MPEG-2 decoders deliver. ...
    (microsoft.public.win32.programmer.directx.video)