locked
How to multiplex audio streams by using Media Foundation in a Store app.

    Question

  • Dear all,

        As you know, the MFTEnumEx function is unsupported in the Windows Store Apps. As a result, I can not enumerate the existing MFTs. Is there any other way to get the Multiplexer? If no, how to write such a custom Multiplexer? Any reference is help. Thank you.

    Tuesday, March 5, 2013 9:17 AM

All replies

  • Hello,

    It is certainly possible to write a custom multiplexer. The streams on an MFT are not represented as distinct COM objects. Instead, each stream has a designated stream identifier, and the methods in the IMFTransform interface take stream identifiers as input parameters. Override IMFTransform::GetStreamIDs  to return your particular pattern of inputs and outputs.

    IMFTransform::GetStreamIDs

    http://msdn.microsoft.com/en-us/library/windows/desktop/ms693988(v=vs.85).aspx

    I hope this helps,

    James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Tuesday, March 5, 2013 10:39 PM
    Moderator
  • Dear James,

    I'm afraid I made a mistake. What I want to do is to merge two videos. The last 3 seconds of the first video and the first 3 seconds of the second video will be played at the same time. So I should mix the audio streams and apply a crossfade effect on video sterams. The topology may be like this:

    audio stream1

                         \

                           audio mixer(MFT)

                          /                       \

    audio stream2                             \

                                                        target file

    video stream1                             /

                         \                         /

                          crossfade MFT

                         /

    video stream2

    Is this right? Is there a built-in audio-mixer MFT can be retrieved in Windows Store App.


    • Edited by AragornZhang Wednesday, March 6, 2013 7:58 AM fix error.
    Wednesday, March 6, 2013 7:07 AM
  • Hi Aragorn,

    Sorry to bother you.

    I'm doing the same thing right now. And I have the same question. Did you get the solution?

    Thank you.

    Tuesday, July 22, 2014 7:28 PM