DirectShow - 将参数传递给自定义源推送过滤器 [英] DirectShow - passing parameters to custom source push filter
问题描述
我正在研究一个解决方案,用来接收来自远程主机的视频流,并将各种文本放在顶部。目前它由自定义的DirectShow推送过滤器(C ++)组成,该过滤器使用RTP协议从远程主机接收数据,还包括设置DirectShow图形并用作视频容器的小型C#应用程序。我正在使用DirectShowLib互操作库。但是,我不知道如何将这个C#应用程序的参数传递给我的自定义过滤器。最简单的方法是注册你自己的协议(在HKCR下创建一个key myproto,然后创建一个包含你的clsid的值Source Filter)。然后你可以渲染myproto://ip=192.168.0.1& port = 12& param1 = x,这些传递给你的IFileSourceFilter :: Load方法。 > G
I'm working on a solution that will be used to receive video stream from remote hosts and to put various texts on the top of it. Currently it consists of custom DirectShow push filter (C++) which receives data from remote hosts using RTP protocol and tiny C# application that sets up the DirectShow graph and is used as a container for the video. I'm using DirectShowLib interop library. However, I'm not sure how to pass parameters from this C# app to my custom filter. What are possible ways to do it?
the simplest way is to register your own protocol (create a key myproto under HKCR, and then create a value "Source Filter" containing your clsid under that). Then you can render "myproto://ip=192.168.0.1&port=12¶m1=x" and these are passed to your IFileSourceFilter::Load method.
G
这篇关于DirectShow - 将参数传递给自定义源推送过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!