none
DX11 Video Renderer sample code is incomplete. RRS feed

  • Question

  • Your ref : http://code.msdn.microsoft.com/windowsdesktop/DirectX-11-Video-Renderer-0e749100

    Dear Sirs,

        So ... that project creates a DLL, which isn't a standard EVR so I have no clue how to fire it up.

    Feeback states that the only way to test it is to use a closed source version of topedit in the Windows 8 SDK.

    That isn't very helpful as that doesn't demonstrate how to use the thing.

    Please provide sample code - the simpler the better that demonstrates how to use this DirectX11 Video Renderer or a derivative to throw a video texture on some simple geometry on the screen.

    As a follow up, please demonstrate multiple video textures playing simultaneously to demonstrate the API supports this feature. If it doesn't, please add this support :)

    Sorry to give you a hard time but I need a solid video API and if Windows doesn't provide one, it's time to look to other operating systems for a robust solution.

    Regards,
    Steve.
    Friday, May 23, 2014 9:00 AM

All replies

  • Perhaps you can start by explaining your scenario a bit? What OSes are you targeting? Is it Windows Store or Win32 desktop? What is it you want to do with Media Foundation?
    Saturday, May 24, 2014 7:56 PM
  • Hi Chuck,
    The scenario is real-time 3D applications that want to use video textures.

    It's a generic feature request. There are loads of applications.

    Our app isn't therefore particuarly relevant - but FYI, it's a 3D web browser.

    We target DX11 & above on Windows so would be nice to have that DX11 EVR run anywhere DX11 can.

    We're using a custom DX9 EVR for video textures at the moment but would be nice to be able to experiment with your latest & greatest to stay current.

    Please take that DX11 presenter & configure it to throw a video texture on a quad or whatever using a standard DX11 sample app as the base for the geometry display side of things.

    Suggest you implement two independent video textures onto the geometry to ensure the API supports that and to ensure you've structured your code in such a way that this is possible.

    Display of multiple video textures doesn't matter - it's just sample code - so either pixel shader blend them together or put them side by side on different quads or geometries.

    Thanks for your interest in this sample code request. Hope the request is clear.
    Saturday, May 24, 2014 8:26 PM
  • Thanks for the detail.

    The real challenge here is that Media Foundation has changed significantly over time. For Windows Vista SP2 with DirectX 11 and Windows 7, you have to use Direct3D9Ex shared surfaces to get video playback on a Direct3D 11 device. For Windows 8.x and Windows 7 with DX 11.1, this can be done more directly with Direct3D 11 Video.

    I already have a video texture playback sample of this nature on my backlog, so I'll see if I can get to it sooner than later.

    Sunday, May 25, 2014 5:36 AM
  • Understood - suggest getting the above working initially using latest interfaces on Windows 8.x Desktop for speed of implementation/delivery, then going back over it and adding legacy and secondary platform support.

    But ... up to you. 

    I look forward to experimenting with Direct3D 11 video.

    Cheers,
    Steve.

    PS. I noticed a comment somewhere that explained how to obtain D3D11 video interface on win7 - haven't tried it & might not be correct but the comment is out here somewhere. Can't find it now I go looking for it :)

    If anyone spots it, you might like to drop it down here for Chuck.
    Sunday, May 25, 2014 8:38 AM
  • Hi Chuck,

        I have implemented a workaround on Windows Desktop so to refine my answer to your question of where this support is required - the answer is where the desktop APIs are not available - so that's RT, Phone & XBox.

    Best regards,
    Steve.
    Wednesday, July 30, 2014 10:25 AM
  • Hi Chuck,

    I wonder whether the video to texture sample ever got written. I'm in same boat as the thread author was. My ap is Desktop, Win 8.1, hopefully DirectX 11, Shader 5.0.  Any update on or vector to a relevant sample?

    Tuesday, December 2, 2014 6:34 PM
  • Media Foundation in Windows 8 added the IMFMediaEngine interface, which can be used to very easily set up media playback without dealing with media sessions, media sources, etc. The best part is that this interface lets you set it up as a D3D11 frame server and you can just pull frames from it. There is a sample that shows how to do this. There is no D3D11 support in Media Foundation before Win8, which is also when this API was introduced. It was said above, but before Win8 you need to continue to transfer textures between D3D9 and D3D11.

    Although it's probably not the method you want to use, since you asked, I'll add some info about the sample. The DX11 video renderer sample shows how to create a video renderer that is compatible with D3D11 hardware acceleration, but it's limited to the most fundamental property of a video renderer: presenting a video to a window. The sample's presenter implements IMFVideoDisplayControl just like the EVR does, so you can call IMFVideoDisplayControl::SetVideoWindow in the same way to send output to a given HWND. You can see in Presenter.h that it actually only implements SetVideoWindow and Get/SetFullscreen for this interface; the full EVR implements the entire interface.

    If you wanted to modify the sample for presenting into a larger D3D scene, you would need to change the logic a bit so that the presenter would give out textures or something instead of presenting to a swap-chain. This would roughly need to happen where the current implementation calls CPresenter::PresentFrame. Again, I think IMFMediaEngine is much simpler for your purposes, but it's certainly possible to adapt the sample if you really need the extra flexibility.

    Thursday, January 22, 2015 3:23 AM
  • Steve, у меня такая же фигня. Не могу найти адекватный код, где можно посмотреть как MF работает совместно с DirectX 11. Ничего не могу найти в интернете. Разработчики Windows 10 просто издеваются или сошли с ума. Понасоздавали всякой хуйни, усложнили себе и другим жизнь. В психушке им место этим даунам. Они почему то думают, что новички смогут грызть их единственный пример с DLL (указанный вами выше в ссылке).

    Тут тоже ни хуя нет
    https://msdn.microsoft.com/en-us/library/windows/desktop/hh447677(v=vs.85).aspx

    Они просто издеваются над нами. Короче надо нам обЪединиться и создать свою операционную систему. Windows 10 отстой.
    Вот мой телефон +79788213584
    borisbarbaris@mail.ru
    ул. Некрасова, дом 77, квартира 64, Евпатория, Крым

    https://www.youtube.com/watch?v=hTtevyXL0Lg
    Wednesday, May 30, 2018 8:45 AM
  • 1,你需要一个完整的DX11渲染器;

    2、在dx11中创建纹理,并传递给DX11RenderSink;替代掉内置的DX11窗体渲染;

    Wednesday, February 13, 2019 7:43 PM
  • 我已经修改了dx11renderSink的代码,并已经很好地在使用了;
    Wednesday, February 13, 2019 7:44 PM