How to dynamic change topology ?  
Author Message
Fei-tian





PostPosted: Media Foundation Development, How to dynamic change topology ? Top

Hi all:

If a mediasource will change video format (codec) according to user operations,
how do I change MFT dynamically

Thanks ^_^





Audio and Video Development2  
 
 
Becky Weiss - MSFT





PostPosted: Media Foundation Development, How to dynamic change topology ? Top

Hi Fei-tian,

Right now, Media Foundation doesn't support the ability to automatically update the various nodes in the topology based on e.g. events from the Media Source

However, it is possible for the application to make changes to the topology in the middle of streaming. This is done via IMFMediaSession::SetTopology, with the MFSESSION_SETTOPOLOGY_IMMEDIATE flag set in the dwSetTopologyFlags argument. If you do that, the Media Session will immediately put your new topology in place and start running the new topology (if this flag had not been set, it would have waited for the current topology to reach the end). So all you need is some way for your application to figure out that this needs to happen, and it should work.

Thanks, and good luck!

Becky