locked
MFMediaEngine - not possible to set specific audio endpoint ? RRS feed

  • Question

  • Hi. We currently using MFMediaEngine in our application and it seems works very good and can do everything that we need. But recently we got requirement to set audio output device and find out that there no way to set audio endpoint id. Can you please help, maybe we missed something?

    2 MS: If it is really not available - do you plan to add this function to MFMediaEngine? This is very basic function that is probably should be there already. For example, audio output device id can be set as attribute when creating MFMediaEngine. This will be good enough for us already.

    Wednesday, April 1, 2015 8:07 AM

All replies

  • Unfortunately, MFMediaEngine only tolerates MF_MEDIA_ENGINE_AUDIO_ENDPOINT_ROLE, not the MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ID. If the role is not specified, eMultimedia is used by default.

    In spite the fix for it [should] be easy, I would like to question your requirements first. Usually it's not a really good idea to use the non-default audio device (multimedia or communication), because it's not clear for the user which device is used, and the code to manage it is cumbersome, and in most cases not worth the effort.

    My questions are:

    a) Could you describe your usecase?

    b) Have you considered using WASAPI for audio output?

    Wednesday, April 1, 2015 8:45 PM
  • Hi Aleksey. I am XSplit core developer and we plan to integrate MFMediaEngine in our products. First of all, because it works much faster than other existing solutions, and also it can output directly to D3D11. Our application is much more complex than regular player so we need more advanced functions. In our application we have user option to choose sound output device and also we have switch between output device and stream only. This will be great if we can have some option to set exact sound output device id according with user choice, even just on MFMediaEngine create. This will fit all our needs. To be honest, we already have some work around to set device id, but it is better to have proper solution. I suppose MFMediaEngine can look at MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ID first and use it if it was set to valid endpoint id else use MF_MEDIA_ENGINE_AUDIO_ENDPOINT_ROLE as usual.

    We currently using WASAPI and DirectSound depends on what supported by components that we using and trying to avoid WaveOut because it have some issues and bugs.

    Monday, April 6, 2015 5:31 AM
  • I've confirmed that we have it in our backlog, but I cannot tell you ETA for it.
    Thursday, April 16, 2015 7:08 PM
  • That is really good to hear....

    MFMediaEngine is a component/API so I think we must not treat it like and end-user application.

    If best practice prescribes that general applications should not allow users to change audio render endpoints from the application, but instead from the OS, then I think it is fine to describe and remind about that best practice. But some programs are more complex applications used with professional AV equipment and peripherals and without functionality like this then its becomes hard to port older technology to new technology.

    Hope it will be there sooner that later...and on a general, but related note, then I think that Microsoft could do more to promote new technologies like Mediafoundation and direct x 11 to developers. It is important to make it easy to use but also flexible enough to replace older technologies. For example then a d3d11 replacement for VMR9 would be very welcome one day (sorry about the side note but could not help to think of it -:)


    Saturday, April 25, 2015 4:54 PM