Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MFCreateVideoMediaTypeFromSubtype
Collapse the table of content
Expand the table of content

MFCreateVideoMediaTypeFromSubtype function

Creates a partial video media type with a specified subtype.

Syntax


HRESULT MFCreateVideoMediaTypeFromSubtype(
  _In_  const GUID              *pAMSubtype,
  _Out_       IMFVideoMediaType **ppIVideoMediaType
);

Parameters

pAMSubtype [in]

Pointer to a GUID that specifies the subtype. See Video Subtype GUIDs.

ppIVideoMediaType [out]

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

Return value

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This function creates a media type and sets the major type equal to MFMediaType_Video and the subtype equal to the value specified in pAMSubtype.

You can get the same result with the following steps:

  1. Call MFCreateMediaType. This function returns a pointer to the IMFMediaType interface.
  2. Set the MF_MT_MAJOR_TYPE attribute to MFMediaType_Video.
  3. Set the MF_MT_SUBTYPE attribute to the subtype.
Note  Prior to Windows 7, this function was exported from evr.dll. Starting in Windows 7, this function is exported from mfplat.dll, and evr.dll exports a stub function that calls into mfplat.dll. For more information, see Library Changes in Windows 7.
 

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Mfapi.h

Library

Evr.lib

DLL

Mfplat.dll

See also

Media Foundation Functions
Media Types

 

 

Community Additions

ADD
Show:
© 2015 Microsoft