简体   繁体   English

如何使用C#从笔记本电脑的摄像头捕获视频

[英]How do I capture video from my laptop's camera using C#

I'm new to C# and I'm trying to capture video from my laptop's camera using C#. 我是C#的新手,正在尝试使用C#从笔记本电脑的摄像头捕获视频。 I found some info at MSDN VideoCaptureDevices and CaptureSource . 我在MSDN VideoCaptureDevicesCaptureSource中找到了一些信息。 Also I added windowsbase.dll into my references. 另外,我将Windowsbase.dll添加到了引用中。 The above class and methods I'm not able to use. 我无法使用以上的类和方法。

How can the above classes be used without using Silverlight concepts? 不使用Silverlight概念如何使用以上类?

windowsbase.dll is part of Windows Presentation Foundation (which has a lot of overlap with Silverlight). windowsbase.dll是Windows Presentation Foundation的一部分(与Silverlight重叠很多)。 To use types from windowsbase.dll you'll need a WPF application (with all the learning curve if you don't know any WPF). 要使用windowsbase.dll类型,您将需要一个WPF应用程序(如果您不了解WPF,则需要学习所有的知识)。

If you want a GUI application then WPF is a good approach. 如果您需要GUI应用程序,那么WPF是一个很好的方法。

(Otherwise: please update the question with more context.) (否则:请使用更多上下文更新问题。)

Outside of Silverlight, the Microsoft Expression Encoder SDK might do the job. 在Silverlight之外,Microsoft Expression Encoder SDK可以完成此工作。 In fact it has another API to communicate to devices. 实际上,它还有另一个API与设备通信。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM