充当虚拟网络摄像头的设备驱动程序
我正在寻找编写虚拟相机驱动程序。有人有想法吗?
任何有帮助的书或任何链接。
添加更多细节: 我开发了一个设备驱动程序,它将图像保存到磁盘,显示器使用设备驱动程序来显示图像。看来表现并不好。 fns。我用过的是: //捕获 获取桌面窗口() 创建兼容位图() 节省() //显示 WM_MOUSEMOVE 每次调用捕获并显示 但显示不是连续的,只有在窗口失焦并再次聚焦后才会出现。
我应该使用其他技术来记录或显示图像,什么会产生丰硕的结果,请帮忙。
谢谢, -米特什
I'm looking for writing virtual camera drivers. Does anybody has idea?
Any book that would be helpful or any link.
Adding more details:
I have developed a device driver which saves the image to disk and the display uses the device driver to display the image. The performance does not seem good.
The fns. that I have used are:
//to capture
GetDesktopWindow()
CreateCompatibleBitmap()
Save()
//to display
WM_MOUSEMOVE
giving a call to capture and display every time
but the display is not continuous and appears only after window goes out of focus and comes in focus again
Should I use some other technique to record or display images, what will give fruitful results, please help.
Thanks,
-mitesh
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
虚拟摄像头驱动程序是什么意思?
可以使用 DirectShow 编写虚拟捕获设备。这样的虚拟捕获设备可以被 Skype 等应用程序使用。如果这足以满足您的需求,您可以从 http 下载 vcam ://tmhare.mvps.org/downloads.htm 在“捕获源过滤器”链接下。
编辑:
为了使用我发布的链接中的捕获设备,您需要下载 Windows SDK。 Windows SDK有一个名为“GraphEdit”的工具,如果你在网上搜索,我相信你可以找到一个快速的GraphEdit教程。基本上,GraphEdit 允许您通过连接一堆过滤器来构建多媒体管道。 (例如,当您在计算机上播放电影时,这就是在后台发生的情况。)这可能类似于
网络摄像头 ->渲染器
或
文件源 ->一些解码器 ->渲染器
,并会导致您看到网络摄像头捕获的视频或文件的内容。该示例下载显示了如何构建虚拟捕获设备,即看起来媒体来自“真实”捕获设备,但实际上,如果您将代码适应您的特定方式,即采取屏幕截图和输出那个。如果注册正确,Skype 等应用程序可以拾取您的虚拟捕获设备。
确定这是否足以满足您的需求的最简单方法是下载捕获源过滤器,使用 regsvr32 命令注册它,然后使用 GraphEdit 将捕获源插入到图形中,将源连接到视频渲染器并点击播放按钮。上面提到的许多概念/关键词对您来说可能看起来很新,但是您可以对每个主题进行一些阅读,也许这会给您一个入门的基础。
编辑2:
捕获源过滤器方法是否不足以满足您的要求?
1) AFAIR,您在(现已删除)答案中表示,您想要抓取屏幕截图,并将其用作虚拟摄像头设备,以便在 Skype 等应用程序中使用。
如果这就是您所需要的,那么您不必编写设备驱动程序。 DirectShow 可以通过捕获源过滤器完美地做到这一点。然后,您需要
至于书籍中涉及编写设备驱动程序来完成相同的任务,我不知道。我想说的一点是,您需要确定是否确实需要编写设备驱动程序,或者简单地修改开源捕获过滤器是否就足够了。
What do you mean by virtual camera driver?
It is possible to write a virtual capture device using DirectShow. Such a virtual capture device can then be used by applications such as skype, etc. If that suffices for your needs, you can download vcam from http://tmhare.mvps.org/downloads.htm under the "Capture Source Filter" link.
Edit:
In order to use that capture device in the link I posted you need to download the Windows SDK. The Windows SDK has a tool called "GraphEdit" If you search online, I'm sure you can find a quick GraphEdit tutorial. Basically GraphEdit allows you to construct a multimedia pipeline by connecting a bunch of filters. (This is what happens in the background for instance when you play a movie on your computer. ) This could be something like
web cam -> renderer
or
file source -> some decoder -> renderer
and would result in you seeing the video captured by the web cam or the content of the file. The example download shows how you can construct a virtual capture device i.e. it looks like media is coming from a 'real' capture device, but actually you can generate any video you want if you adapt the code to your specific means i.e. take a screengrab and output that. Applications like skype can pick up you virtual capture device if it is registered correctly.
The easiest way to find out if this is sufficient for your needs is to download the capture source filter, register it with the regsvr32 command, and then to use GraphEdit to insert the capture source into a graph, connect the source to a video renderer and hit the play button. A lot of the above mentioned concepts/keywords might seem new to you, but you can do some reading on each topic, and perhaps this will give you a point to get started.
Edit 2:
Is the capture source filter approach not sufficient for your requirements?
1) AFAIR you stated in your (now deleted) answer that you would like to take a screen grab, and use that as a virtual camera device for use in applications such as skype.
If that is all you require, you do NOT have to write a device driver. DirectShow can do that perfectly well by means of the capture source filter. You would then need to
As far as books are concerned to write device driver to accomplish the same, I have no idea. The point I'm trying to make, is that you need to determine whether you actually need to write a device driver or whether simply modifying the open source capture filter is sufficient.