IGraphConfig interface (strmif.h)
The Filter Graph Manager exposes
IGraphConfig to support dynamic graph building. This interface enables applications and filters to reconfigure the filter graph while the graph is in a running state, and without losing data from the stream.
The most straightforward way to rebuild the graph dynamically is to call the IGraphConfig::Reconnect method. This method handles most of the details of dynamically rebuilding the graph. If a situation ever arises where you want to implement your own technique,
IGraphConfig also provides the IGraphConfig::Reconfigure method. This method obtains a lock on the filter graph and then calls a callback function in your application, which reconfigures the graph. With this method, most of the work is shifted to your application. For more information, see Dynamic Graph Building.
To optimize the process of adding and removing filters, the filter graph maintains a cache of filters. During a call to the Reconnect method, you can specify that any filters removed from the graph get added to the cache. You can also add a filter to the cache directly, if you know it is likely to be needed, by calling IGraphConfig::AddFilterToCache. The IGraphBuilder::Render, IGraphBuilder::RenderFile, and IGraphBuilder::Connect methods automatically try to use filters in the cache before using other filters. Also, in the Reconnect method you can specify that only cached filters will be used for the reconnection. Note that filters held in the cache are not actually part of the graph. They are disconnected from any pins and are kept in a stopped state.
The IGraphConfig interface inherits from the IUnknown interface. IGraphConfig also has these types of members:
The IGraphConfig interface has these methods.
The AddFilterToCache method adds a filter to the filter cache.
The EnumCacheFilter method enumerates the filters in the filter cache.
The GetFilterFlags method retrieves a filter's configuration information.
The GetStartTime method retrieves the reference time that was used when the filter graph was last put into a running state.
The PushThroughData method pushes data through the filter graph to the specified pin.
The Reconfigure method locks the filter graph and calls a callback function in the application or filter to perform a dynamic reconfiguration.
The Reconnect method performs a dynamic reconnection between two pins.
The RemoveFilterEx method removes a filter from the filter graph.
The RemoveFilterFromCache method removes a filter from the filter cache.
The SetFilterFlags method sets a filter's configuration information.
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|
|Header||strmif.h (include Dshow.h)|