3

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?

Lev
  • 730
  • 12
  • 32
  • *"...pass a non-NULL HANDLE* which points to NULL..."* - Can you show the section of code? As I read it, I'm not clear exactly what you're passing. – Roger Rowland Jun 25 '14 at 04:45

1 Answers1

1

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.

Community
  • 1
  • 1
mofo77
  • 1,447
  • 9
  • 17