问题
I'm able to show a video stream in a window. I'm using DirectShow VideoMixingRenderer9 in C#. I have created an Image with sometext in it. Now, how can I mix this image with the video stream so that both video stream and text is shown in the capture window. I tried with ISampleGrabber filter but it doesn't work with all video device and capture screan only shows the text with black background but no video stream. So I don't want to use ISampleGrabber filter.
回答1:
IVMRMixerBitmap9 interface should help you, which is implemented by the VMR. This is the link to MSDN:
[http://msdn.microsoft.com/en-us/library/windows/desktop/dd390451(v=vs.85).aspx][1]
The bitmap needs to have alpha values so that it can be blended with the rendered video.
来源:https://stackoverflow.com/questions/11070645/how-can-i-mix-image-with-a-video-stream-from-usb-capture-device-using-directshow