Re: Capture Graph with VMR9 in Windowless mode
- From: "Andrew" <4brown@xxxxxxxxx>
- Date: 26 Mar 2007 14:20:21 -0700
On Mar 26, 3:03 pm, Colin White <c...@xxxxxxxxxxxxxxxxxxxx> wrote:
On 26 Mar 2007 08:38:15 -0700, "Andrew" <4br...@xxxxxxxxx> wrote:
I belive I am. I wonder if there is an order of operations error. In
my message handler I call a function that does the graph tear down,
rebuild, and restart before the FreeEventParams is called. Is my
while loop what you're talking about when you say "emptied the
queue"?
Andy
LRESULT CDVRView::OnGraphNotify(WPARAM, LPARAM)
{
long evCode, param1, param2;
HRESULT hr;
while (hr = m_pMediaEvent->GetEvent(&evCode, ¶m1, ¶m2, 0),
SUCCEEDED(hr))
{
switch(evCode)
{
caseEC_DISPLAY_CHANGED:
HandleDisplayChangedMessage();
break;
default:
break;
}
hr = m_pMediaEvent->FreeEventParams(evCode, param1, param2);
}
return TRUE;
}
Andy
Yes - using the while loop was what I meant.
Your routine is virtually identical to the method we use and we only
get a single event (although we QI for the pMediaEvent locally inside
the function and release it to avoid leaving any outstanding refcounts
- but in this scenario that's probably irrelevant).
While waiting for anyone else to comment / advise - I can only suggest
you check that you're not doing anything elsewhere in your code that
may be changing the display.
Colin- Hide quoted text -
- Show quoted text -
Colin,
Thanks for your response. I didn't find out why I was getting another
EC_DISPLAY_CHANGED message but I did find a much better work around
that you may be interested in:
1) Stop graph
2) Change output sink file and save existing file at risk.
3) Get the IPin off the Video Renderer filter
4) Call IFilterGraph::Reconnect(pin) method
5) Restart the graph (no breaking down or rebuilding).
6) If you put in a Sleep call before the Reconnect for a few ms the
screen saver acts as you would expect. Without the sleep call the
screen saver is disabled so no log in security without this sleep
call.
This method is very light weight and very fast.
Cheers!
Andy
.
- Follow-Ups:
- Re: Capture Graph with VMR9 in Windowless mode
- From: Colin White
- Re: Capture Graph with VMR9 in Windowless mode
- References:
- Capture Graph with VMR9 in Windowless mode
- From: Colin White
- Re: Capture Graph with VMR9 in Windowless mode
- From: Geraint Davies
- Re: Capture Graph with VMR9 in Windowless mode
- From: Colin White
- Re: Capture Graph with VMR9 in Windowless mode
- From: Andrew
- Re: Capture Graph with VMR9 in Windowless mode
- From: Colin White
- Re: Capture Graph with VMR9 in Windowless mode
- From: Andrew
- Re: Capture Graph with VMR9 in Windowless mode
- From: Colin White
- Capture Graph with VMR9 in Windowless mode
- Prev by Date: Re: Capture Graph with VMR9 in Windowless mode
- Next by Date: for gib: very teasingly delicious keyword searchable - vaw zullo - (1/1)
- Previous by thread: Re: Capture Graph with VMR9 in Windowless mode
- Next by thread: Re: Capture Graph with VMR9 in Windowless mode
- Index(es):
Relevant Pages
|