Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

PDXVAHDSW_ProposeVideoPrivateFormat function pointer

Gets a private surface format from a software plug-in Microsoft DirectX Video Acceleration High Definition (DXVA-HD) device.


typedef HRESULT ( CALLBACK *PDXVAHDSW_ProposeVideoPrivateFormat)(
  _In_    HANDLE    hDevice,
  _Inout_ D3DFORMAT *pFormat


hDevice [in]

A handle to the plug-in DXVA-HD device.

pFormat [in, out]

A pointer to a D3DFORMAT value. On input, specifies the surface format that is requested by the application. On output, specifies the private surface format that the plug-in device proposes.

Return value

If this function pointer succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.


This function is called when the application calls IDXVAHD_Device::CreateVideoSurface if the following conditions are true:

  • The type of input surface is DXVAHD_SURFACE_TYPE_VIDEO_INPUT_PRIVATE.
  • The Direct3D device does not support the surface format requested by the application natively.

This function enbles the plug-in device to propose an alternate format with an equivalent memory layout. For example, if the application requests AYUV, the plug-in device might allocate a surface of type D3DFMT_A8R8G8B8.

If the function succeeds, the CreateVideoSurface method attempts to create a surface with the format returned in pFormat.


The following code shows how a plug-in device proposes D3DFMT_A8R8G8B8 as an alternative surface format for AYUV.

HRESULT CALLBACK ProposeVideoPrivateFormat(
    HANDLE hDevice,
    D3DFORMAT* pFormat 
    switch (*pFormat)
        case D3DFMT_AYUV: 
            *pFormat = D3DFMT_A8R8G8B8; 
            return S_OK;

            return E_FAIL;


Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]



See also

Media Foundation Functions



Community Additions

© 2015 Microsoft