Filter Graph的动态构建[6]

[入库:2005年8月19日] [更新:2007年3月24日]

本文简介:选择自 aoosang 的 blog

2如果需要,可以在filter graph中增加新的filter

3重新连接相关的各个pin

4将新加入的filter置于pausedrunning状态,以使其与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

本文关键:Filter Graph的动态构建
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top