MF_SA_D3D_AWARE attribute
Specifies whether a Media Foundation transform (MFT) supports DirectX Video Acceleration (DXVA). This attribute applies only to video MFTs.
Data type
BOOL stored as UINT32
Remarks
To query this attribute, call IMFTransform::GetAttributes to get the global attribute store of the MFT. If GetAttributes succeeds, call IMFAttributes::GetUINT32.
This attribute tells the client whether the MFT can use Direct3D 9 video:
- If the attribute is nonzero, the client can give the MFT a pointer to the IDirect3DDeviceManager9 interface before streaming starts. To do so, the client sends the MFT_MESSAGE_SET_D3D_MANAGER message to the MFT. The client is not required to send this message.
- If this attribute is zero (FALSE), the MFT does not support Direct3D 9 video, and the client should not send the MFT_MESSAGE_SET_D3D_MANAGER message to the MFT.
The default value of this attribute is FALSE. Treat this attribute as read-only. Do not change the value; the MFT will ignore any changes to the value.
For more information about implementing this attribute in a custom MFT, see Direct3D-Aware MFTs.
The GUID constant for this attribute is exported from mfuuid.lib.
Examples
The following code tests whether an MFT supports DXVA.
// Returns TRUE is an MFT supports DirectX Video Acceleration.
BOOL IsTransformD3DAware(IMFTransform *pMFT)
{
BOOL bD3DAware = FALSE;
IMFAttributes *pAttributes = NULL;
HRESULT hr = pMFT->GetAttributes(&pAttributes);
if (SUCCEEDED(hr))
{
bD3DAware = MFGetAttributeUINT32(pAttributes, MF_SA_D3D_AWARE, FALSE);
pAttributes->Release();
}
return bD3DAware;
}
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista [desktop apps | UWP apps] |
Minimum supported server |
Windows Server 2008 [desktop apps | UWP apps] |
Header |
|
See also