I use Intel media sdk to decode and process mutiple videos and show the results into different windows. I create DXVA surfaces by IDirect3D9 devices and IDirectXVideoAccelerationService just like what Intel Video Decoding Samples did on windows platform.
When showing the video processing result in different windows I met some trouble:
In Intel Video Decoding Samples, they use IDirect3DDevice9::StretchRect method to Copy data from one surface to another, like:
But this method doesn't work when the source surface and destination surface are created by different d3d devices!!!
As we know, a d3d device maintains the hardward resource in a scene. If I want to decode multiple videos, process them and show them in different windows with some data sharing in this process, I have to use multiple d3d device to fullfill this task.
So I want to know how to share and copy DXVA surfaces(created by diffrents d3d9 devices) data between different IDirect3D9 device?
There is a related link in Microsoft documents on this topic, check this https://msdn.microsoft.com/en-us/library/ee913554(v=vs.85).aspx
"Direct3D 10.0, Direct3D 9c, and older Direct3D runtimes do not support shared surfaces". You can do this with D3d11 devices but not with D3d9. Hope this helps!