Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

MFCreateMediaTypeFromRepresentation function

Creates a Media Foundation media type from another format representation.

Syntax


HRESULT MFCreateMediaTypeFromRepresentation(
  _In_  GUID         guidRepresentation,
  _In_  LPVOID       pvRepresentation,
  _Out_ IMFMediaType **ppIMediaType
);

Parameters

guidRepresentation [in]

GUID that specifies which format representation to convert. The following value is defined.

GUIDDescription
AM_MEDIA_TYPE_REPRESENTATIONConvert a DirectShow AM_MEDIA_TYPE structure.

 

pvRepresentation [in]

Pointer to a buffer that contains the format representation to convert. The layout of the buffer depends on the value of guidRepresentation.

ppIMediaType [out]

Receives a pointer to the IMFMediaType interface. The caller must release the interface.

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.

MF_E_UNSUPPORTED_REPRESENTATION

The GUID specified in guidRepresentation is not supported.

 

Remarks

If the original format is a DirectShow audio media type, and the format type is not recognized, the function sets the following attributes on the converted media type.

AttributeDescription
MF_MT_AM_FORMAT_TYPE Contains the format type GUID.
MF_MT_USER_DATA Contains the format block.

 

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Mfapi.h

Library

Mfplat.lib

DLL

Mfplat.dll

See also

Media Foundation Functions

 

 

Community Additions

ADD
Show:
© 2015 Microsoft