IDirectXVideoProcessorService::GetVideoProcessorSubStreamFormats method

Gets a list of substream formats supported by a specified video processor device.

Syntax


HRESULT GetVideoProcessorSubStreamFormats(
  [in]   REFGUID VideoProcDeviceGuid,
  [in]   const DXVA2_VideoDesc *pVideoDesc,
  [in]   D3DFORMAT RenderTargetFormat,
  [out]  UINT *pCount,
  [out]  D3DFORMAT **ppFormats
);

Parameters

VideoProcDeviceGuid [in]

A GUID that identifies the video processor device. To get the list of video processor GUIDs, call IDirectXVideoProcessorService::GetVideoProcessorDeviceGuids.

pVideoDesc [in]

A pointer to a DXVA2_VideoDesc structure that describes the video content.

RenderTargetFormat [in]

The format of the render target surface, specified as a D3DFORMAT value. For more information, see the Direct3D documentation. You can also use a FOURCC code to specify a format that is not defined in the D3DFORMAT enumeration. See Video FOURCCs.

pCount [out]

Receives the number of elements returned in the ppFormats array.

ppFormats [out]

Receives an array of D3DFORMAT values. The caller must free the array by calling CoTaskMemFree. The array can contain both RGB and YUB pixel formats.

Return value

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

Examples


    // Query the supported substream formats.

    formats = NULL;

    hr = g_pDXVAVPS->GetVideoProcessorSubStreamFormats(
        guid, &g_VideoDesc, VIDEO_RENDER_TARGET_FORMAT, &count, &formats);

    if (FAILED(hr))
    {
        DBGMSG((L"GetVideoProcessorSubStreamFormats failed: 0x%x.\n", hr));
        return FALSE;
    }

    for (i = 0; i < count; i++)
    {
        if (formats[i] == VIDEO_SUB_FORMAT)
        {
            break;
        }
    }

    CoTaskMemFree(formats);

    if (i >= count)
    {
        DBGMSG((L"The device does not support the substream format.\n"));
        return FALSE;
    }


Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Dxva2api.h

See also

IDirectXVideoProcessorService
DXVA Video Processing

 

 

Community Additions

ADD
Show:
© 2014 Microsoft