[DirectShow] 039 - Enumerating Pins

Filters support the IBaseFilter::EnumPins method, which enumerates the pins available on the filter. It returns a pointer to the IEnumPins interface. The IEnumPins::Next method retrieves IPin interface pointers.

filter 支持 IBaseFilter::EnumPins 方法用来枚举 filter 上可见的 pin 。这个函数返回 IEnumPins 接口的指针。 IEnumPins::Next 方法获得 IPin 接口指针。

The following example shows a function that locates a pin with a given direction (input or output) on a given filter. It uses the PIN_DIRECTION enumeration to specify the pin direction, and the IPin::QueryDirection method to find the direction of each enumerated pin. If this function finds a matching pin, it returns an IPin interface pointer with an outstanding reference count. The caller is responsible for releasing the interface.

以下例子展示一个方法,在给定 filter 上指出指定方法的 pin 。使用 PIN_DIRECTION 枚举表示 pin 方向,用 IPin::QueryDirection 方法找出每一个被枚举的 pin 的方法。如果这个方法找到了一个匹配的 pin ,就返回这个 pin 的接口指针。调用者有责任释放这个接口。

 

 


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值