虚拟网络摄像头在C ++ [英] Virtual Webcam in C++

查看:171
本文介绍了虚拟网络摄像头在C ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想写一个新的虚拟网络摄像头驱动程序,例如将AVI或实况流作为屏幕和流媒体作为网络摄像头源。

I want to write a new virtual webcam driver, which for example will take an AVI or live stream for example for screen and stream it as webcam source.

我我没有网络摄像头,我想添加一个虚拟网络摄像头流式桌面屏幕。

I'll not have webcam really, I want to add a virtual webcam which streams desktop screen.

我应该在内核模式下写一个网络摄像头吗?

I should write a webcam in kernel mode to do so ? If so, could you guide me to a sample webcam driver?

如果我应该在DirectShow中做,我如何添加一个网络摄像头设备到控制列表中的网络摄像头列表例如在Yahoo Messenger中,我可以选择该设备作为网络摄像头,并将我的桌面流作为网络摄像头图像。

If I should do it in DirectShow, how can I add a webcam device to list in webcams list in Control panel, so for example in Yahoo messenger, I can choose that device as webcam and stream my desktop as webcam images.

我如何开始?

推荐答案

您需要编写一个DirectShow源过滤器。 Windows SDK包含一个名为 baseclasses 的库,可帮助您开发此类过滤器。请参见 CSourceStream 以获得良好的起点。

You need to write a DirectShow source filter. The Windows SDK contains a library called baseclasses which helps you developing such a filter. See CSourceStream for a good starting point.

要使设备显示在其他视频流设备下,您必须在DirectShow API的CLSID_VideoInputCategory下注册您的过滤器。你不需要/不应该写一个内核驱动程序。

To get the device to show up under the other Video Streaming Devices, you have to register your filter with the DirectShow API under the CLSID_VideoInputCategory. You don't need to/shouldn't write a kernel driver.

这篇关于虚拟网络摄像头在C ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆