tags:

views:

78

answers:

1

I have a CView which I would like to host a DirectShow renderer.

I did not write the original code, I am simply cleaning up and moving the code to VS2005. This necessitated an upgrade of certain third party tools and so I'm trying to change the code a bit without having a full understanding of DX/DirectShow.

The problem is that my app hangs when I run

hr = gcap.pFg->QueryInterface(IID_IVideoWindow, (void **)&gcap.pVW);
[trimmed some code]
gcap.pVW->put_Owner((OAHWND) m_pDockWnd->GetSafeHwnd());    // We own the window now

m_pDockWnd is the CView. I can do this when in preview mode, but not when in capture mode. In capture mode, it hangs the app.

If I don't own the render window, there is no problem (although the capture window is owned by the desktop, which won't work for me).

Also, the capture window shows a busy cursor when it is owned by the desktop--probably it's actually not working then either, but it's at least not hanging the app. By hang I mean that the app does not respond to user input, but background threads continue to run.

Update: We were using an old version of DirectX (Aug '06). I compiled/linked against the DirectShow stuff packaged with the Vista SDK and .... no dice.

+1  A: 

I've got a resolution for this.

The video stream as getting started from a thread without a message pump, this was causing the video window to become non-responsive. (I guess XP was more tolerant of this, maybe the new display driver model in Vista mucked it up.) Anyways, once I did a SendMessage to the main app window and started the video capture from there, everything seems to work!

Nick