Skip to content

Latest commit

 

History

History
202 lines (157 loc) · 6.02 KB

nf-mfobjects-imfmediatype-getrepresentation.md

File metadata and controls

202 lines (157 loc) · 6.02 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:mfobjects.IMFMediaType.GetRepresentation
IMFMediaType::GetRepresentation (mfobjects.h)
Retrieves an alternative representation of the media type. Currently only the DirectShow AM_MEDIA_TYPE structure is supported.
2135ff86-a3b6-4e1c-a9de-867f4828f008
AM_MEDIA_TYPE_REPRESENTATION
FORMAT_MFVideoFormat
FORMAT_VideoInfo
FORMAT_VideoInfo2
GetRepresentation
GetRepresentation method [Media Foundation]
GetRepresentation method [Media Foundation]
IMFMediaType interface
IMFMediaType interface [Media Foundation]
GetRepresentation method
IMFMediaType.GetRepresentation
IMFMediaType::GetRepresentation
mf.imfmediatype_getrepresentation
mfobjects/IMFMediaType::GetRepresentation
mf\imfmediatype_getrepresentation.htm
mf
2135ff86-a3b6-4e1c-a9de-867f4828f008
12/05/2018
2135ff86-a3b6-4e1c-a9de-867f4828f008, AM_MEDIA_TYPE_REPRESENTATION, FORMAT_MFVideoFormat, FORMAT_VideoInfo, FORMAT_VideoInfo2, GetRepresentation, GetRepresentation method [Media Foundation], GetRepresentation method [Media Foundation],IMFMediaType interface, IMFMediaType interface [Media Foundation],GetRepresentation method, IMFMediaType.GetRepresentation, IMFMediaType::GetRepresentation, mf.imfmediatype_getrepresentation, mfobjects/IMFMediaType::GetRepresentation
mfobjects.h
Mfidl.h
Windows
Windows Vista [desktop apps \| UWP apps]
Windows Server 2008 [desktop apps \| UWP apps]
Mfuuid.lib
Windows
19H1
IMFMediaType::GetRepresentation
mfobjects/IMFMediaType::GetRepresentation
c++
APIRef
kbSyntax
COM
mfuuid.lib
mfuuid.dll
IMFMediaType.GetRepresentation

IMFMediaType::GetRepresentation

-description

Retrieves an alternative representation of the media type. Currently only the DirectShow AM_MEDIA_TYPE structure is supported.

-parameters

-param guidRepresentation [in]

GUID that specifies the representation to retrieve. The following values are defined.

Value Meaning
AM_MEDIA_TYPE_REPRESENTATION
Convert the media type to a DirectShow AM_MEDIA_TYPE structure. The method selects the most appropriate format structure (pbFormat).
FORMAT_MFVideoFormat
Convert the media type to a DirectShow AM_MEDIA_TYPE structure with an MFVIDEOFORMAT format structure.
FORMAT_VideoInfo
Convert the media type to a DirectShow AM_MEDIA_TYPE structure with a VIDEOINFOHEADER format structure.
FORMAT_VideoInfo2
Convert the media type to a DirectShow AM_MEDIA_TYPE structure with a VIDEOINFOHEADER2 format structure.

-param ppvRepresentation [out]

Receives a pointer to a structure that contains the representation. The method allocates the memory for the structure. The caller must release the memory by calling IMFMediaType::FreeRepresentation.

-returns

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

Return code Description
S_OK
The method succeeded.
MF_E_ATTRIBUTENOTFOUND
The details of the media type do not match the requested representation.
MF_E_INVALIDMEDIATYPE
The media type is not valid.
MF_E_UNSUPPORTED_REPRESENTATION
The media type does not support the requested representation.

-remarks

If you request a specific format structure in the guidRepresentation parameter, such as VIDEOINFOHEADER, you might lose some of the format information.

You can also use the MFInitAMMediaTypeFromMFMediaType function to convert a Media Foundation media type into a DirectShow media type.

This interface is available on the following platforms if the Windows Media Format 11 SDK redistributable components are installed:

  • Windows XP with Service Pack 2 (SP2) and later.
  • Windows XP Media Center Edition 2005 with KB900325 (Windows XP Media Center Edition 2005) and KB925766 (October 2006 Update Rollup for Windows XP Media Center Edition) installed.

-see-also

IMFMediaType

MFVIDEOFORMAT

Media Types