Media (Intel® oneAPI Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
3002 Discussions

How to share DXVA surfaces between different IDirect3D9 device?


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:

   src_surface, NULL,
   dst_surface, NULL,

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?

0 Kudos
1 Reply

Hi there,

There is a related link in Microsoft documents on this topic, check this
"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!