Re: Confusing message from GraphEdit
- From: "Taras P. Galchenko" <tpgalchenko@xxxxxxx>
- Date: Mon, 20 Nov 2006 19:47:22 +0300
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
.
- Follow-Ups:
- Re: Confusing message from GraphEdit
- From: Geraint Davies
- Re: Confusing message from GraphEdit
- From: Taras P. Galchenko
- Re: Confusing message from GraphEdit
- References:
- Confusing message from GraphEdit
- From: Taras P. Galchenko
- Re: Confusing message from GraphEdit
- From: Geraint Davies
- Re: Confusing message from GraphEdit
- From: Taras P. Galchenko
- Confusing message from GraphEdit
- Prev by Date: video data chunks in avi file
- Next by Date: Problem with skipped frames
- Previous by thread: Re: Confusing message from GraphEdit
- Next by thread: Re: Confusing message from GraphEdit
- Index(es):
Relevant Pages
|