Initializes a media type from a WAVEFORMATEX structure.
HRESULT MFInitMediaTypeFromWaveFormatEx(
IMFMediaType *pMFType,
const WAVEFORMATEX *pWaveFormat,
UINT32 cbBufSize
)
pMFType
Type: IMFMediaType *
[in]
Pointer to the IMFMediaType interface of the media type to initialize. To create the uninitialized media type object, call MFCreateMediaType.
pWaveFormat
Type: WAVEFORMATEX *
[in]
Pointer to a WAVEFORMATEX structure that describes the media type. The caller must fill in the structure members before calling this function.
cbBufSize
Type: UINT32
[in]
Size of the WAVEFORMATEX structure, in bytes.
Type: HRESULT
The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.
| Return code | Description |
|---|---|
| S_OK | The function succeeded. |
Refer to Media Foundation return codes.
Header: Declared in mfapi.h.
Library: Use mfplat.lib.