DirectShow - passing parameters to custom source push filter

泪湿孤枕 提交于 2019-12-04 09:50:15

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&param1=x" and these are passed to your IFileSourceFilter::Load method.

G

Creating the key:

HKEY_CLASS_ROOT

  • myproto
    • "Source Filter" = "187463A0-5BB7-11D3-ACBE-0080C75E246E"

is not enough on Windows 7. There are two issues with that:

  • you need to wrap your CLSID with curly brackets
  • you need to add "Url Protocol"

The correct version looks like that:

HKEY_CLASS_ROOT

  • myproto
    • "Source Filter" = "{187463A0-5BB7-11D3-ACBE-0080C75E246E}"
    • "Url Protocol" = ""

Moreover, you can check HKEY_CLASS_ROOT->MMS for reference.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!