Creates a converter to convert from an NV12 texture to an RGB texture. This function is for Xbox exclusive applications.
HRESULT MFCreateNV12ToRGB32ConverterX(
ID3D11Device *pDevice,
IMFAttributes *pAttribute,
IXboxColorConverter **pObject
)
pDevice
Type: ID3D11Device *
[in] The current device being used, as a pointer to ID3D11Device.
pAttribute
Type: IMFAttributes *
[in, optional] Attributes, as a pointer to IMFAttributes. Optional. Allows passing extra attributes to IXboxNV12MFSampleRenderer. Currently only MF_RENDER_DONOTUSE_SOURCE_ASPECTRATIO attribute is used; specify MF_RENDER_DONOTUSE_SOURCE_ASPECTRATIO, which is of type UINT32.
By default, the Xbox video render/converter uses the aspect ratio from the source texture to transform from the input to the target view port or texture.
When set to 1, specifies that Xbox video rendering does not use the aspect ratio from the media source; it will fill up the output region specified by the render target viewport or texture size.
pObject
Type: IXboxColorConverter **
[out] Outputs a pointer to IXboxColorConverter.
Type: HRESULT
Possible values include, but are not limited to, the following.
| Return code | Description |
|---|---|
| S_OK | The method succeeded. |
See Media Foundation return codes.
This function is for video rendering or color conversion, to replace the legacy DXVA video processing, such as the deprecated method ID3D11VideoDevice::CreateVideoProcessorEnumerator. This function can be used in a deferred rendering context, as well as in an immediate rendering context.
Header: Declared in mfapi.h.
Library: Use Mfplat.lib.