On Mon Aug 29 12:42:15 2022 +0000, Nikolay Sivov wrote:
Do we have tests that show that loader does not set the types? Calling SetTopology(0) invokes the loader, it's not immediately clear which part does initialization. Does MFSESSION_SETTOPOLOGY_NORESOLUTION also set the types? Another variant is setting with zero flags, but with MF_TOPOLOGY_RESOLUTION_STATUS set to "resolved". Setting first accepted type is weird, because it could easily cause mismatched types with upstream node, but if that's what it does..
We had already but I modified it to make it more obvious.
I haven't removed the topology loader logic that calls `SetCurrentMediaType` yet, and the session is basically doing what the topology loader was doing, but earlier: enumerate the output types and set the first that works.
I don't think that would change the outcome or that it would cause mismatched types with upstream: if downstream supports upstream type, it will succeed in topology_branch_connect_down, regardless of what is the downstream current media type.
Then it looks like the session tries also first to set the output media type directly from the source media type, which I haven't implemented. It will probably be needed if we remove the `SetCurrentMediaType` call from the topology loader.