How to reconnect Filter Pins?
I created a resizer filter (c++) and added a property page with options Pal(720X576) and Ntsc(720X480).(default is Pal).
In Graph Edit i selected a video file and added My resizer filter to it, when i played the graph it is working fine and showing video in Pal. when i tried to change it to Ntsc, it is not working correctly. To make it work correctly i need to first disconnect the Resizer filter pins and then change the output settings and then reconnect it.(i do this manually and video is playing in Ntsc mode.)
is it possible to reconnect the filter in Transform() or any other better suggestions. Please suggest/Point me in rite direction.
While the graph is stopped, you can reconnect pins the same way you build the graph: using
IGraphBuilder::Disconnect
,IGraphBuilder::Connect
. You cannot do it fromTransform
method because stopped graph does not yet call it.When the graph is running you can try to dynamically re-agree media type connection, which is not guaranteed to work. See Dynamic Format Changes: