Hello:
I am writing a media source that output 2 streams. One is a video stream and another is a audio stream. When start play, I got a error code from session get event (MEError, E_FAIL -> no any meanful information). But if I Deselect any one stream, another stream will play normally. so what is the problem about this issue
About other similar issue. I write a MFT which accept two streams from 2 media sources and then output a single stream to audiorenderer. After set topology and play it, I got a error about "not support topology". I don't know what is the problem It is caused by 2 media sources or multi-input MFT
Thanks

Mutl-input and multi-output
i7hira7
About your Media Source... A Media Source with multiple streams should work if you've set up your topology correctly. Just as a guess off the top of my head, are you sure you're setting up the source nodes of your topology correctly Make sure that each of the source nodes refers to the correct Stream Descriptor with its MF_TOPONODE_STREAM_DESCRIPTOR attribute. If you're sure about the topology, then I would pay attention to what kinds of calls your Media Source gets (IMFMediaStream::RequestSample, etc) and make sure that each stream is outputting the samples it should.
Refer to the SDK sample Media Source; although it's only one stream, it does do Media Source stuff correctly, so you can follow that model.
As for multi-input MFTs, our MF topology loader does not handle them, which is why you get that error. If you're just trying to get two audio streams playing at once, though, you can actually do that just fine with two instances of the audio renderer.
Becky
rohit_c4u
Thanks very much. That will be very useful for us.
And other question:
Is there any substitunet solution for multi-input MFT
Some cases like audio and video mux, audio mixing, etc... those cases need to mux multi-streams into a single stream. What is your solution about those situation
Thanks
briendjf
I sort my questions and the answers I got.
1) Does MF support multi-inputs MFT
Answer is NO. althought MFv2 does not validate against this, to use multi-input MFT may cause problems.
2) Does MF support multi audio renderer
Answer is YES.
3) Does MF support multi-mediasource
Not yet get the answer
4) Can we resolve topology by ourself without using topology loader
Not yet get the answer
Thanks for your reply.
Karg Weng
Thanks
I want to make sure one thing.
Is it workable to write a MFT with multi-input streams
If multi-input is not support, that will change our architecute hugely.
Other issue about media source.
In the CreatePresentationDescriptor function of my mediasouce, I select two streams in my returned PresentationDescriptor. After building topology, a PresentationDescriptor pass into my Start function as first argument. But, the second stream is deselect in this PresentationDescriptor. Why I check all my code, I select all streams and do not deselect any stream. It is caused by topology loader
Thanks again.
johndog
OK, then I'll answer the remaining ones :-)
3) MF does support topologies with multiple Media Sources, but only if you use the IMFSequencerSource. (This is true even if you aren't actually playing a sequence.) The reason is that the MF logic that is able to deal with multiple sources lives in the Sequencer Source component.
4) Yes, you can resolve the topology yourself outside the topology loader. If you're giving IMFMediaSession::SetTopology a full topology (i.e. one that you resolved yourself), then set the MFSESSION_SETTOPOLOGY_NORESOLUTION bit in the dwSetTopologyFlags argument in that method. The Media Session will then skip its usual topology resolution step.
Becky
Rory Clark
Well, here's an example: Our ASF sink (which ships with Media Foundation) is capable of muxing multiple streams together into a single ASF (WMV/WMA) file. Basically, this Media Sink has several IMFStreamSinks, and the muxing occurs inside the sink.
Now I realize this isn't ideal if you were hoping to do some additional processing on the muxed stream in the topology; for now, the solution would be to do the muxing inside the sink (a la the ASF sink) and then do whatever additional processing you needed to do inside the sink.
I'd say that multi-input MFTs is something that future versions of Media Foundation can be expected to support; but for now, we don't yet have that support.
Becky
nzmike
Hi Fei-tian,
Whoops, I should have stated this more clearly: The MFv1 pipeline isn't going to support multi-input MFTs. It happens that the Beta 2 Media Session doesn't explicitly validate against this yet, which was probably the cause of the confusion.
Glad you found and fixed your Media Source problem. And yeah, I know that the E_FAIL MEError event is somewhat less than helpful; incorrect StreamIDs is apparently an implementation mistake that we haven't anticipated.
Thanks for all the feedback,
Becky
Part Time Australian
Hello all:
My media source has fixed the problem. ^^!!! To share my experience, my problem is the wrong value of the StreamIdentifier in StreamDescription. After fixing that, everything works perfectly. But I would like to know how to know what happen when I got a error callback. Especially when I get a error callback E_FAIL. ><
Other question:
You said TopologyLoader cannot support multi-input MFT. However, if I resolve topology by myself, Can I use multi-input MFT And Is it possible that I resolve topology by myself
thanks