Media (Intel® 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
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.
3056 Discussions

How to share DXVA surfaces between different IDirect3D9 device?

____2
Beginner
591 Views

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:

pd3dDevice->StretchRect(
   src_surface, NULL,
   dst_surface, NULL,
   D3DTEXF_POINT)

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
Surbhi_M_Intel
Employee
591 Views

Hi there,

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!

-Surbhi

0 Kudos
Reply