locked
Media Foundation + Direct3D 11 RRS feed

  • Question

  • I'm developing an application with Direct3D 11 and I would like to use Media Foundation for in-game cinematics, however the SDK only has functions that work with Direct3D 9, is there any way to make Media Foundation interoperate with Direct3D 11 and still keep the hardware acceleration benefit?

    Alternatively, is there any other good API that would do this?
    Saturday, October 24, 2009 2:51 PM

Answers

  • You are right that Media Foundation (and DXVA) are supported for Direct3D 9 but not Direct3D 10 or 11. However, you can interop between D3D9 and D3D10/11 by creating a shared surface.

    The code is a bit tricky because you need to synchronize the D3D9 and D3D10/11 operations on the shared surface. The Direct3D team has published a lib that takes care of the details for you, so I would recommend looking at that. You can download it here:

    http://code.msdn.microsoft.com/D3D9ExDXGISharedSurf

    - Mike

    ----------------------------------------------------------------------------
    Mike Wasson, SDK Documentation
    This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.

    (c) 2009 Microsoft Corporation. All rights reserved.


    Mike Wasson (SDK Documentation)
    • Marked as answer by pablo24 Sunday, October 25, 2009 3:44 PM
    Saturday, October 24, 2009 5:08 PM

All replies

  • AFAIK, MF doesn't natively support D3D11 at this time.  There are no references to it in the SDK docs.

    1.  What versions of Windows is your game going to support?

    2.  What format is your video (WMV, AVI, etc)?


    Please use Vote As Helpful (green up arrow at top-left of posts) and Mark As Answer where appropriate.
    My dshow site is http://tmhare.mvps.org.
    Saturday, October 24, 2009 4:46 PM
  • You are right that Media Foundation (and DXVA) are supported for Direct3D 9 but not Direct3D 10 or 11. However, you can interop between D3D9 and D3D10/11 by creating a shared surface.

    The code is a bit tricky because you need to synchronize the D3D9 and D3D10/11 operations on the shared surface. The Direct3D team has published a lib that takes care of the details for you, so I would recommend looking at that. You can download it here:

    http://code.msdn.microsoft.com/D3D9ExDXGISharedSurf

    - Mike

    ----------------------------------------------------------------------------
    Mike Wasson, SDK Documentation
    This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.

    (c) 2009 Microsoft Corporation. All rights reserved.


    Mike Wasson (SDK Documentation)
    • Marked as answer by pablo24 Sunday, October 25, 2009 3:44 PM
    Saturday, October 24, 2009 5:08 PM