我可以让我的私有DirectShow过滤器可由外部程序的Moniker发现吗? [英] Can I make my private DirectShow filter discoverable by Moniker by external programs?

查看:238
本文介绍了我可以让我的私有DirectShow过滤器可由外部程序的Moniker发现吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个长镜头,但如果我能做到这将节省我的时间和麻烦。我有一个DirectShow视频过滤器,这是一个典型的外部DLL(AX文件),将视频馈送到Skype。我已经知道如何私人使用一个过滤器。然而,我不知道是否可以做一个私人过滤器,一个嵌入在一个EXE,不是一个外部DLL,外部程序可以发现。据我所知,DirectShow过滤器的主要方式是可见的是通过注册它们作为一个ActiveX / COM控件和一个私人过滤器的注册表,我认为不能这样做,因为没有外部DLL为外部程序加载。

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.

所以,有一个聪明的方式来精巧的DirectShow发现系统,使外部程序,只知道如何访问DirectShow过滤器通过他们的友好名称通过枚举,可以使用吗?如果不是,我只是在我的主应用程序和我的视频过滤器的外部版本之间来回发送数据,但我真的不喜欢这样做。

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.

推荐答案

如果外部应用是要使用你的过滤器,它需要通过加载你的DLL和fitler并创建一个实例来实例化它。如果你把你的过滤器放到.EXE,你仍然可以注册它的fitler列表,但它不会工作:外部应用程序将无法创建你的过滤器的优雅。

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.

所以如果你想要外部应用程序使用你的过滤器,你需要把它放入DLL。注意,如果你把你的过滤器放入DLL,你不必也注册它与DirectShow:你可能希望不注册它并实例化私有,在这种情况下,它将能够在您的应用程序和在同时你留下一个选项,以便在一段时间后完全注册,并将其提供给外部应用程序。

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).

这篇关于我可以让我的私有DirectShow过滤器可由外部程序的Moniker发现吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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