How to stream Webcam in WPF?

坚强是说给别人听的谎言 提交于 2019-12-21 09:32:28

问题


Can I stream a live video in WPF application from my web cam? If yes, then How?


回答1:


You will have to use DirectX Capture or something (is not in WPF right know, so use DirectX API's directly).

Look at: WPF Media Kit. It can grab the Vista Windows desktop manager DirectX Direct3D shared Surface, and use it as a visual brush in WPF. He does some nice things with it. Look at his blog where he explains it.

I hope this helps you on your way...

UPDATE 2009-11-06: The VideoRenderElement Codeplex project has an example on how to stream webcam content. This project looks like it would fit your requirment perfectly.

UPDATE 2013-02-18: Alternatively one can use the Expression Encoder SDK. For an example you can look at the WPF-Webcam-Control article on CodeProject



来源:https://stackoverflow.com/questions/412995/how-to-stream-webcam-in-wpf

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