I write a small DirectShow app: want to play video and paint static picture on it.
I follow the steps:
1.use EVR DS filter to RenderFile() and IMediaControl::Run()-> no problem, can play video normally.
2.use IMFVideoDisplayControl::GetVideoWindow() to get video window handle -> I can get.
3.use IMFGetService::GetService() to get IMFVideoMixerBitmap -> return S_OK.
4.call IMFVideoMixerBitmap::SetAlphaBitmap() -> return S_OK.
But on the video window, there is no static bitmap!
Why Do I lose some steps
MSDN sample: http://msdn2.microsoft.com/en-us/ms701866.aspx
One Topics: http://forums.microsoft.com/MSDN/

How to use IMFVideoMixerBitmap?
simon_
What are you using the HWND for
For your original question, I was going to ask to see what your MFVideoAlphaBitmap structure looked like. I'm still curious to verify that you are passing correct parameters for this...
Jay Senior
This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use. (c) 2007 Microsoft Corporation. All rights reserved.
jortiz
use the HWND to CreatCompatibleDC(), then use IMFVideoMixerBitmap::SetAlphaBitmap() to paint the bitmap DC.
My doubt:
I use IMFVideoDisplayControl::SetVideoWindow() and global video window handle to set Video Windows. But while using IMFVideoDisplayControl::GetVideoWindow(), the HWND is not the same as global video window. why
bombdrop
Now I can paint image on video.
I just use the global video window handle, and it can display.
Why the handle from IMFVideoDisplayControl can't be used