Is it possible to share a DXVA surface?

722 views Asked by At

I'm using DXVA video decoder. It works fine, but I want to share the decompressed surfaces with another IDirect3D9 device object.

I read this document, and I'm calling IDirectXVideoDecoderService::CreateSurface() method to create surfaces, and I try to pass a non-NULL HANDLE* which points to NULL as the last parameter for the method. But the method fails with 0x8876086c (D3DERR_INVALIDCALL) result. I also tried to allocate an array of HANDLEs and set every element to NULL, then pass this array as a parameter, but still getting the same error.

Is there a way to share DXVA surfaces between IDirect3D9 devices?

1

There are 1 answers

0
mofo77 On

Reading the document :

Resource creation APIs include - CreateTexture, CreateVolumeTexture, CreateCubeTexture, CreateRenderTarget, CreateVertexBuffer, CreateIndexBuffer, CreateDepthStencilSurface, CreateOffscreenPlainSurface, CreateDepthStencilSurfaceEx, CreateOffscreenPlainSurfaceEx, and CreateRenderTargetEx.

IDirectXVideoAccelerationService::CreateSurface seems not to be included.

And :

pSharedHandle [in, out]

A pointer to a handle that is used to share the surfaces between Direct3D devices. Set this parameter to NULL.

It seems not to be possible to use it.