C# 控件使用 DirectShow.Net 显示摄像头视频
我想使用 DirectShow.Net 从网络摄像头捕获流。
我可以使用什么类型的 UI 控件来显示网络摄像头视频捕获?
我见过一个使用表单整个窗口的示例,但是还有其他我可以使用的控件吗:面板、PictureBox?
I want to use DirectShow.Net to capture the stream from a webcam.
What type of UI control can I use to display a the webcam video capture?
I have seen an example that uses the whole window of a Form, but are there any other controls I can use: a Panel, PictureBox?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的。您可以使用图片框、表格或面板。
您需要调用并使用IVideoWindow。您可以将正在流式传输/捕获的 directshow.net 图形投射到 IVideoWindow,然后您可以将其设置为由您想要将视频流放入的任何对象拥有。只需给它对象句柄,然后将其窗口样式设置为父对象的子对象即可。
yes. you can use pictureboxes or forms or panels.
You need to call and use IVideoWindow. you can cast the directshow.net graph that is streaming/capturing to the IVideoWindow and then you can set it to being owned by whatever object you want to put your video stream into. just have to give it the objects handle and then set its windowstyle to child of the parent object.
http://channel9.msdn.com/Forums /TechOff/93476-Programatically-Using-A-Webcam-In-C - 它没有格式化,但它有一个代码,可以实际植入您需要的内容。
http://channel9.msdn.com/Forums/TechOff/93476-Programatically-Using-A-Webcam-In-C - its not formatted, but it has a code that actually implants what you need.