[DirectShow] 038 - Enumerating Filters

本文介绍如何使用IFilterGraph::EnumFilters方法枚举DirectShow过滤器图中的所有过滤器,并通过IBaseFilter::QueryFilterInfo方法获取每个过滤器的名称。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

The Filter Graph Manager supports the IFilterGraph::EnumFilters method, which enumerates all the filters in the filter graph. It returns a pointer to the IEnumFilters interface. The IEnumFilters::Next method retrieves IBaseFilter interface pointers.

Filter Graph Manger 支持 IFilterGraph::EnumFilters 方法用来枚举 filter graph 中的所有 filter 。这个函数返回 IEnumFilters 接口的指针。 IEnumFilters::Next 方法返回 IBaseFilter 接口指针。

The following example shows a function that enumerates the filters in a graph and displays a message box with each filter's name. It uses the IBaseFilter::QueryFilterInfo method to retrieve the name of the filter. Note the places where the function calls Release on an interface to decrement the reference count.

下面的列子展现枚举 graph filter 的方法并在一个消息框中显示每个 filter 名字。使用 IBaseFilter::QueryFilterInfo 方法获得 filter 的名字。记得调用 Release 来消耗应用计数。

 


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值