Freigeben über


IMFMediaTypeHandler::SetCurrentMediaType Method

Sets the object's media type.

Syntax

HRESULT SetCurrentMediaType(
  [in]  IMFMediaType *pMediaType
);

Parameter

  • pMediaType [in]
    Pointer to the IMFMediaType interface of the new media type.

Rückgabewert

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

Rückgabecode Beschreibung
S_OK

The method succeeded.

MF_E_INVALIDREQUEST

Invalid request.

 

Hinweise

For media sources, setting the media type means the source will generate data that conforms to that media type. For media sinks, setting the media type means the sink can receive data that conforms to that media type.

Any implementation of this method should check whether pMediaType differs from the object's current media type. If the types are identical, the method should return S_OK but avoid releasing and recreating resources unnecessarily. If the types are not identical, the method should validate the new type.

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

  • Windows XP mit Service Pack 2 (SP2) und höher.
  • Windows XP Media Center Edition 2005 with KB900325 (Windows XP Media Center Edition 2005) and KB925766 (Oktober 2006 Updaterollup für Windows XP Media Center Edition) installed.

Anforderungen

Mindestens unterstützter Client

Windows Vista

Mindestens unterstützter Server

Windows Server 2008

Header

Mfidl.h

Bibliothek

Mfuuid.lib

Siehe auch

IMFMediaTypeHandler