简体   繁体   English

有 DirectShow 的替代品吗?

[英]Is There a replacement of DirectShow?

I want to make a virtual web cam application.我想制作一个虚拟 web cam 应用程序。 so I find out all pages that had written before 2010. But there was no result.所以我找出了2010年之前写的所有页面。但是没有结果。 All the projects are old even I open and some parts of methods of codeproject's sources is doesn't useful now.即使我打开所有项目都是旧的,并且codeproject源代码的某些部分方法现在没有用。

So I'm looking for a replacement of DirectShow.所以我正在寻找 DirectShow 的替代品。 I tried following directshow guide even the getting started guide in docs.ms didn't work.我尝试遵循 directshow 指南,即使 docs.ms 中的入门指南也不起作用。

What should I do?...我应该怎么办?...

So this is an AB question: you need one thing and instead you ask for another.所以这是一个 AB 问题:你需要一件事,而你却要求另一件事。

Yes, there is replacement for DirectShow.是的,有 DirectShow 的替代品。 DirectShow is a previous multimedia API in Windows, and its successor API and current API in Windows is Media Foundation . DirectShow is a previous multimedia API in Windows, and its successor API and current API in Windows is Media Foundation . This will however get you not an inch closer to the solution of your original problem.然而,这将使您离原始问题的解决方案更近一步。

The concept of virtual camera is abstract: Windows operating system does not offer a solid extensibility point to add virtual video input devices such that they are visible to application equally to real cameras.虚拟摄像头的概念是抽象的:Windows 操作系统没有提供可靠的扩展点来添加虚拟视频输入设备,以便它们对应用程序与真实摄像头一样可见。 To achieve this you are basically supposed to develop and fully featured driver which is not what you want to do.要实现这一点,您基本上应该开发功能齐全的驱动程序,这不是您想要做的。

I covered details in multiple questions here on StackOverflow, I will just mention a few to start reading from:我在 StackOverflow 上讨论了多个问题的详细信息,我只提几个开始阅读:

If you want some application designed to work with cameras to "see" your virtual camera as if it was a real camera, you are interested in finding out what API the application is using and if you could submit your virtual implementation as another camera option.如果您希望某个设计为与相机一起使用的应用程序“看到”您的虚拟相机,就好像它是一个真实的相机一样,您有兴趣了解该应用程序正在使用什么 API 以及是否可以将您的虚拟实现作为另一个相机选项提交。

If the application is DirectShow based, you are rather lucky and you can take the path of virtual DirectShow camera (see links above).如果应用程序是基于 DirectShow 的,那么你就很幸运了,你可以走虚拟 DirectShow 摄像头的路径(见上面的链接)。 If the application uses Media Foundation, you are pretty much in a dead end and hooking or API detouring is probably your best option.如果应用程序使用 Media Foundation,那么您几乎处于死胡同,挂钩或 API 绕道可能是您的最佳选择。

Or you have an option to develop a camera driver, which is most likely is not realistic due to required effort (even though such implementations do exist).或者您可以选择开发相机驱动程序,由于需要付出努力,这很可能是不现实的(即使确实存在这样的实现)。

Long story short if your target application is consuming cameras via DirectShow API, you are lucky enough and you don't need DirectShow replacement.长话短说,如果您的目标应用程序正在通过 DirectShow API 使用相机,那么您很幸运,不需要 DirectShow 替换。 Virtual camera code and knowledge accumulated over last 20 years is still in good standing.过去 20 年积累的虚拟相机代码和知识仍然保持良好状态。

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

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