如何使DirectShow使用可用的过滤器自动创建图形 [英] How to make directShow to Create graph automatically with available filters

查看:55
本文介绍了如何使DirectShow使用可用的过滤器自动创建图形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的应用程序中使用Medialooks多源过滤器,该输入在HKEY_CURRENT_USER \ SOFTWARE \ Classes \ CLSID \但是我仍然必须使用 CLS_ID AddFilter 函数手动添加此过滤器.

I want to use the Medialooks multisource filter in my application, This has entry in HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\ But still i have to Add this filter manually using CLS_ID and AddFilter Function.

有什么方法可以使Dshow的 Renderfile 功能通过枚举注册表中的过滤器来自动创建图形

Is there any way so that Renderfile function of Dshow will automatically creates a graph by enumerating the filters from registry

已在 Grphedt 工具中签入,但是如果我手动插入并连接滤镜,我就可以正常播放视频.否则,它不会通过构建图表自动呈现

Checked in Grphedt tool but if i manually insert and connect Filters I can play the videos properly.Otherwise it wont render automatically by building the graph

推荐答案

能够连接过滤器并获得您感兴趣的拓扑是一回事,并且在

Ability yo connect filters and obtain a topology of your interest is one thing, and having this sort of connection taking place during Intelligent Connect is another thing. For Intelligent Connect and RenderFile the filters of interest must be apparently registered, and then they have accurate DirectShow registration details: merit, media types. Quite so often filters are lacking this registration (and at other times they are "over-registrating" themselves so that they are picked up when they are obvious misfit).

即使您可以自己重新注册过滤器(请参见 IFilterMapper2 :: RegisterFilter )以及其他注册详细信息,通常您不这样做.准确注册是过滤器开发商的业务.对您来说,更好的选择是使用 AddFilter 调用来构建图形,在此您可以很好地控制图形的构建.或者,如果 RenderFile 首先失败,则您可能希望将其作为备用构造方法.

Even though you can re-register filter yourself (see IFilterMapper2::RegisterFilter) with alternate registration details, you typically do not do it. It's filter developer's business to register accurately. The better alternative for you is to build graph using AddFilter calls where you have fine control over graph construction. Or you might want to do it as a fallback construction method if RenderFile fails in first place.

这篇关于如何使DirectShow使用可用的过滤器自动创建图形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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