Re: Capture Graph with VMR9 in Windowless mode
- From: "Andrew" <4brown@xxxxxxxxx>
- Date: 26 Mar 2007 08:38:15 -0700
On Mar 24, 7:40 am, Colin White <c...@xxxxxxxxxxxxxxxxxxxx> wrote:
On 23 Mar 2007 15:06:52 -0700, "Andrew" <4br...@xxxxxxxxx> wrote:>> Use CancelDefaultHandling onEC_DISPLAY_CHANGED, added an handler in
my app, detach the currently open file, then unbuild and re-build the
graph and re-start capturing.
Thanks for posting your workaround. I've also seen this problem in my
application and after implementing your suggestion the
EC_DISPLAY_CHANGEDmessage is posted again right after I re-start.
It's like the event wasn't cleared or something even though the entire
graph was unloaded and reloaded.
Has anyone else seen this behavior?
Andy
Andy
Are you certain that you've full emptied the queue and freed up all
resources (FreeEventParams) before returning TRUE in your event
handler?
(see the topics Event Notification in Directshow and subtopic
Retrieving Events)
Colin
Colin,
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)
{
case EC_DISPLAY_CHANGED:
HandleDisplayChangedMessage();
break;
default:
break;
}
hr = m_pMediaEvent->FreeEventParams(evCode, param1, param2);
}
return TRUE;
}
.
- 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
- Capture Graph with VMR9 in Windowless mode
- Prev by Date: Re: WMF SDK - How to write a wmv stream starting from a raw mpeg4 stream
- Next by Date: DirectShow: How to capture the RGB data to a buffer?
- 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
|
Loading