Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PDXVAHDSW_ProposeVideoPrivateFormat function pointer

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

Syntax


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

Parameters

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.

Remarks

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.

Examples

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;

        default: 
            return E_FAIL;
    }
}


Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Dxvahd.h

See also

DXVA-HD
Media Foundation Functions
DXVAHDSW_CALLBACKS
IDXVAHD_Device::CreateVideoSurface

 

 

Show:
© 2017 Microsoft