Monday, January 31, 2011 7:36 PM
Is it possible to create a presenter using only Direct3D 11? I found the following thread here ( http://social.msdn.microsoft.com/Forums/en-US/mediafoundationdevelopment/thread/fca0821f-8b5c-4722-bb59-844aef98f887 ) and it is pretty close to the implementation I have now which is to share the resulting texture from my Direct3D 11 operations with Direct3D 9 to present through its swapchain. This was quickly thrown together on top of the sample custom EVR project for testing.
But for my purposes, it would be best if I could create a pure Direct3D 11 presenter and I wanted a bit of insight. It's ok if it does not use DXVA as speed is not my main concern. Can such a thing be done with MF? Would it require manual topology resolution or will MF's built in topology resolver implementation support it? If a manual topology resolution is required, are there samples for how to do this? Creating a partial topology seems quite different from the topology the results after being successfully resolved but I wasn't able to find samples on this.
Thursday, February 03, 2011 10:25 PMOwnerIn addition, you would need to provide your own EVR mixer. The default EVR mixer is designed to work with Direct3D 9. If you had both the custom mixer + presenter, then I believe it should work without any special topology building. (You will not get DXVA acceleration, as you noted.) - Mike 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)
Friday, February 04, 2011 10:01 PM
Hi Mike, thanks for the insight. I was looking into creating a custom EVR Mixer and Presenter but I ran into some problems very early when testing it. I started removing the Direct3D 9 functionality from the sample presenter but I found that it would cause the EVR fail on creation. I tried by just assigning the IMFActivate of the presenter to a IMFTopologyNode and passing in the partial topology to the Media Session to resolve. I also tried just activating the object through IMFActivate::ActivateObject() and found that MF was calling my presenter's GetService() function with a REFIID for a IDirect3DDeviceManager9 interface. My presenter returns MF_E_UNSUPPORTED_SERVICE and it seems that causes my presenter to fail creation.
Is there another return code I should use instead that will allow my presenter to be created? Or can I just return S_OK eventhough I do not support Direct3D 9 and expect things to still work?
Saturday, February 19, 2011 1:54 AMModeratorYour presenter and mixer need to implement the IMFVideoDeviceID interface, and return the same ID. It should not return IID_IDirect3DDevice9 as the ID. When the EVR sees a matching mixer that is not using the device ID IID_IDirect3DDevice9, it will not require IDirect3DDeviceManager9 to be provided by the presenter.