How can I mix Image with a Video stream from USB capture device using DirectShowLib in C#

假装没事ソ 提交于 2019-12-12 00:05:42

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!