DirectShow过滤器:转换 [英] DirectShow Filter: Transform
问题描述
过滤器转换方法被称为是否有一个输入引脚发送数据?如果是的话:我如何确定在滤波器转换方法中哪个输入引脚是它? 解决方案
没有内置的方法做这个。如果您的滤波器有多个输入引脚,并且每个引脚都提供了不同的介质类型,则可以使用介质类型来确定哪个引脚。另一种方法可能是将一个唯一的ID分配给您的输入引脚的每个实例,并将其传递给您的转换函数。您可能必须从基类派生您的输入引脚来执行此操作。
Is it correct that the filters transform method gets called whener one of the input pins sends data? If yes: How do I determine in the filter transform method which input pin it is?
There is no built in way to do this. If your filter has multiple input pins, and each pin provides a distinct media type, you can figure out which pin by using the media type. Another way to do this may be to assign a unique id to each instance of your input pin and pass this on to your transform function. You may have to derive your input pin from the base class to do this.
这篇关于DirectShow过滤器:转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!