Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

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.

Windows Phone 8.1: This API is supported.

Requirements

Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Mfapi.h

Library

Mfplat.lib

DLL

Mfplat.dll

See also

Media Foundation Functions
Media Type Conversions
Media Types

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.