Re: Confusing message from GraphEdit



Here is the description of my graph:


File Source (async) -> (My filter which exposes IAsyncReader) -> modified
Minimal Null

The last filter is the recompiled Minimal Null-Null transform in place
filter which does nothing but queries IAsyncReader from my filter. You may
see none of the filters implements IMediaSeeking.

I set breakpoints in all Pause and Stop methods but they are not triggered
when I press Stop 8-(, why? What does the graphedit do?

The dialog that GraphEdit displays offers two options: Retry and Cancel.
Retrying does nothing, pushing Cancel makes the GraphEdit to call Stop
explicitly.

I am totally misled and confused.

Taras


"Taras P. Galchenko" <tpgalchenko@xxxxxxx> wrote in message
news:eHcGOOMDHHA.1016@xxxxxxxxxxxxxxxxxxxxxxx
I suppose there must be another reason. In my test program along with call
GetState to the filter graph I walked thru the list of the filters and
asked every filter for its state. All filters returned correct current
state without any error code, while the graph's GetState returned the
correct state value and E_FAIL.

It is noteworthy that switching to Paused state (from Stopped) works fine
as well as seeking in Paused state.

When I press Stop my filters complete seeking (the graphedit calls set
start position = 0) but I see the graphedit's message even before my
worker thread manages to deliver NewSegment notification downstream and
hence before delivering the poster sample.

Taras

"Taras P. Galchenko" <tpgalchenko@xxxxxxx> wrote in message
news:uZO89sKDHHA.4224@xxxxxxxxxxxxxxxxxxxxxxx
Thanks a lot! I will dig deeper.

Taras

"Geraint Davies" <geraintd@xxxxxxxxxx> wrote in message
news:2em1djyfggf1$.xx7hdgh04hu5$.dlg@xxxxxxxxxxxxx
On Mon, 20 Nov 2006 12:29:32 +0300, Taras P. Galchenko wrote:

Hello everybody!

I am facing a strange behaviour of GraphEdit while trying to stop the
graph
with my filter.

From GraphEdit I press Run and Pause - works fine. But when I try to
stop it
says "GraphEdit cannot complete pause within 10 seconds..." although it
takes it less than a second to display such message, it does not wait
for 10
seconds at all!

I've overriden Pause and Stop methods in my filter to see if they are
called
when I press Stop, but they are not called. I've written a sample
program
that builds the graph and issues Run, Pause and Stop commands via
IMediaControl - they work without problems! Definitely the problem is
not
about Pause or Stop and the error message of GraphEdit is confusing.

The only problem I found in my sample program is calling GetState never
returned S_OK, it always returns E_FAIL. Why? What does GraphEdit do
inside?
Why does it displays such a confusing message without an attempt to
pause or
to stop the graph?

Taras

When you press stop, graphedt pauses the graph to allow the renderer to
capture a poster frame. If the graph is seekable, it will then rewind to
0.
Then it waits for the pause to complete before stopping the graph.

The pause is complete when GetState returns S_OK after a pause call --
it
is not waiting for the Pause method to return; it is waiting for the
pause
state transition to complete. Typically, the renderer will not return
S_OK
from GetState until it has received some data -- this allows the graph
to
be cued correctly before playback starts, and also allows the app to
know
that a poster frame has been shown.

So in your case, graphedt is waiting for GetState to return S_OK. In the
meantime, it is expecting to see VFW_S_STATE_INTERMEDIATE. It actually
gets
E_FAIL, and this triggers some incorrect error handling as you reported.
So
your next step is to work out which filter returned E_FAIL from
GetState,
and why.

G






.



Relevant Pages

  • 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)
  • 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: ACM encoder
    ... insert that in the graphedit and connect with async reader. ... In that case the graph is working ... When you set the output format make sure it is exactly as returned by ... Intelligent connect will insert an additional PCM filter if required. ...
    (microsoft.public.win32.programmer.directx.audio)
  • Re: How to pause/resume playing from within my source filter?
    ... prevent the graph going from pause to run until you are ready. ... In my original post I said that I had a streaming source filter, but it's really more like a streaming capture filter. ... Seems like I would somehow need to know the difference between a graph mandated pause, ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: still image source filter and VMR9
    ... >>1) Which source filter is used by GraphEdit or the filter graph ... > Add the VMR9 to the graph and specify it as your renderer in your Render ...
    (microsoft.public.win32.programmer.directx.video)

Loading