2如果需要,可以在filter graph中增加新的filter;
3重新连接相关的各个pin;
4将新加入的filter置于paused或running状态,以使其与filter graph同步。示例如下:
pgraph->addfilter(pnewfilter, l"new filter for the graph");
pconfig->reconnect(
ppina, // reconnect this output pin...
ppind, // ... to this input pin.
pmediatype, // use this media type.
pnewfilter, // connect them through this filter.
null,
0);
实际应用中,如果你觉得reconnect不够灵活,还可以改用reconfigure方法。这个方法可以通过应用程序中的回调函数来重新连接pin