How to dynamic change topology ?

Hi all:

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

Thanks ^_^


[168 byte] By [Fei-tian] at [2008-2-14]
# 1

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

BeckyWeiss-MSFT at 2007-9-10 > top of Msdn Tech,Audio and Video Development,Media Foundation Development...