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.

MFCreateWaveFormatExFromMFMediaType function

Converts a Media Foundation audio media type to a WAVEFORMATEX structure.

Syntax


HRESULT MFCreateWaveFormatExFromMFMediaType(
   IMFMediaType *pMFType,
   WAVEFORMATEX **ppWF,
   UINT32       *pcbSize,
   UINT32       Flags = MFWaveFormatExConvertFlag_Normal
);

Parameters

pMFType

Pointer to the IMFMediaType interface of the media type.

ppWF

Receives a pointer to the WAVEFORMATEX structure. The caller must release the memory allocated for the structure by calling CoTaskMemFree.

pcbSize

Receives the size of the WAVEFORMATEX structure.

Flags

Contains a flag from the MFWaveFormatExConvertFlags enumeration.

Return value

The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return codeDescription
S_OK

The function succeeded.

 

Remarks

If the wFormatTag member of the returned structure is WAVE_FORMAT_EXTENSIBLE, you can cast the pointer to a WAVEFORMATEXTENSIBLE structure.

Requirements

Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1

Header

Mfapi.h

Library

Mfplat.lib

DLL

Mfplat.dll

See also

Media Foundation Functions
Media Type Conversions
Media Types

 

 

Show:
© 2017 Microsoft