我可以让外部程序通过 Moniker 发现我的私有 DirectShow 过滤器吗?
虽然可能性不大,但如果我能做到这一点,将会节省我的时间和麻烦。我有一个 DirectShow 视频过滤器,它是一个典型的外部 DLL(AX 文件),可将视频提供给 Skype。我已经知道如何私下使用过滤器了。但是,我不知道是否可以制作一个私有过滤器,该过滤器嵌入在 EXE 中,而不是外部 DLL,可以被外部程序发现。据我所知,使 DirectShow 过滤器可见的主要方法是通过将它们在注册表中注册为 ActiveX/COM 控件并使用私有过滤器,我认为这是不可能完成的,因为没有外部 DLL 可以实现要加载的外部程序。
那么,是否有一种巧妙的方法来巧妙地改进 DirectShow 发现系统,以便仅知道如何通过枚举的“友好名称”访问 DirectShow 过滤器的外部程序可以使用它?如果不是,我将继续在我的主应用程序和视频过滤器的外部版本之间来回发送数据,但我真的宁愿不必这样做。
This is a long shot but if I could do this it would save me time and a hassle. I have a DirectShow video filter that is a typical external DLL (AX file) that feeds video to Skype. I already know how to use a filter privately. However, I don't know if it's possible to make a private filter, one that is embedded in an EXE and is not an external DLL, discoverable by external programs. As far as I know, the main way DirectShow filters are made visible is via registering them in the Registry as an ActiveX/COM control and with a private filter, I would think that can't be done since there is no external DLL for the external program to load.
So, is there a clever way to finesse the DirectShow discovery system so that an external program, that only knows how to access DirectShow filter's via their "friendly name" through enumeration, can use it? If not I'll just keep sending data back and forth between my main app and an external version of my video filter, but I'd really prefer not to have to do that.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果外部应用程序要使用您的过滤器,则需要通过使用过滤器加载 DLL 并从那里创建一个实例来实例化它。如果您将过滤器放入 .EXE 中,您仍然可以将其注册到过滤器列表中,但它不会起作用:外部应用程序将无法创建过滤器的实例。
因此,如果您希望外部应用程序使用您的过滤器,您需要将其放入 DLL 中。请注意,如果将过滤器放入 DLL 中,则不必向 DirectShow 注册它:您可能希望不注册它并私有实例化,在这种情况下,它将能够在您的应用程序和同时,您可以选择稍后完全注册并使其可供外部应用程序使用。
如果您希望过滤器在外部程序中运行并以某种方式与您的应用程序通信,也可以这样做,但您对将要发生的所有进程间通信负全部责任(也就是说,您需要实现它)。
If an external applciation is to use your filter, it would need to instantiate it by loading your DLL with the fitler and creating an instance from there. If you put your filter into .EXE, you still can register it with the fitler list, but it won't work out: an external app would just be unable to create an instgance of your filter.
So if you want external apps to use your filter, you need to put it into DLL. Note that if you put your filter into DLL, you don't have to also register it with DirectShow: you might want to prefer to NOT register it and instantiate privately, in which case it will be able to work in your application and in the same time you leave an option to fully register it some time later and make it available to external apps.
If you want the filter to run in external program and in some way talk to your application, this can also be done but you are fully responsible for all interprocess commuinication which will be taking place (that is, you will need to implement it).