I am trying to figure out what APIs to use to connect and record from a webcam. In al of my research, Google, I have found many OLD articles which discus Directshow and COM. I don't want to write code that is using an obsolete API.
我试图找出用于连接和记录网络摄像头的API。在我的研究中,谷歌,我发现了许多讨论Directshow和COM的OLD文章。我不想编写使用过时API的代码。
Any direction with this is greatly appreciated.
任何方向都非常感谢。
3 个解决方案
#1
DiectShow is still the best way to connect to Webcams (or other sources).
You can use DirectShow.NET which is a thin warpper arund DirectShow.
DiectShow仍然是连接网络摄像头(或其他来源)的最佳方式。你可以使用DirectShow.NET,这是一个瘦的warpper Arund DirectShow。
#2
If you are using Vista, you can use the new Media Foundation APIs. But, they are not available on XP, so DirectShow is the way to go. The DirectShow.NET wrapper pointed to by Shay works great with C#. Be sure to also download the Samples, there are several capture samples worth checking out like PlayCap and CapWMV.
如果您使用的是Vista,则可以使用新的Media Foundation API。但是,它们不适用于XP,所以DirectShow是可行的方式。 Shay指向的DirectShow.NET包装器适用于C#。一定要下载样本,有几个值得检查的捕获样本,如PlayCap和CapWMV。
UberDemo wrote an article about another way of capturing using the Windows Media Encoder SDK with WPF in this article.
UberDemo在本文中写了一篇关于使用Windows Media Encoder SDK和WPF捕获的另一种方法的文章。
#3
avicap32.dll I guess is the safest option due to its readily availability... http://channel9.msdn.com/forums/TechOff/93476-Programatically-Using-A-Webcam-In-C has the PInvoke code you will be needing.
avicap32.dll我想是最安全的选择,因为它很容易获得... http://channel9.msdn.com/forums/TechOff/93476-Programatically-Using-A-Webcam-In-C有你的PInvoke代码需要。
http://codeplex.com/touchless is an interesting related project!
http://codeplex.com/touchless是一个有趣的相关项目!
#1
DiectShow is still the best way to connect to Webcams (or other sources).
You can use DirectShow.NET which is a thin warpper arund DirectShow.
DiectShow仍然是连接网络摄像头(或其他来源)的最佳方式。你可以使用DirectShow.NET,这是一个瘦的warpper Arund DirectShow。
#2
If you are using Vista, you can use the new Media Foundation APIs. But, they are not available on XP, so DirectShow is the way to go. The DirectShow.NET wrapper pointed to by Shay works great with C#. Be sure to also download the Samples, there are several capture samples worth checking out like PlayCap and CapWMV.
如果您使用的是Vista,则可以使用新的Media Foundation API。但是,它们不适用于XP,所以DirectShow是可行的方式。 Shay指向的DirectShow.NET包装器适用于C#。一定要下载样本,有几个值得检查的捕获样本,如PlayCap和CapWMV。
UberDemo wrote an article about another way of capturing using the Windows Media Encoder SDK with WPF in this article.
UberDemo在本文中写了一篇关于使用Windows Media Encoder SDK和WPF捕获的另一种方法的文章。
#3
avicap32.dll I guess is the safest option due to its readily availability... http://channel9.msdn.com/forums/TechOff/93476-Programatically-Using-A-Webcam-In-C has the PInvoke code you will be needing.
avicap32.dll我想是最安全的选择,因为它很容易获得... http://channel9.msdn.com/forums/TechOff/93476-Programatically-Using-A-Webcam-In-C有你的PInvoke代码需要。
http://codeplex.com/touchless is an interesting related project!
http://codeplex.com/touchless是一个有趣的相关项目!