IMFMediaEngineExtension::CanPlayType method

Queries whether the object can load a specified type of media resource.

Syntax


HRESULT CanPlayType(
  [in]  BOOL                    AudioOnly,
  [in]  BSTR                    MimeType,
  [out] MF_MEDIA_ENGINE_CANPLAY *pAnswer
);

Parameters

AudioOnly [in]

If TRUE, the Media Engine is set to audio-only mode. Otherwise, the Media Engine is set to audio-video mode.

MimeType [in]

A string that contains a MIME type with an optional codecs parameter, as defined in RFC 4281.

pAnswer [out]

Receives a member of the MF_MEDIA_ENGINE_CANPLAY enumeration.

Return value

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

Remarks

Implement this method if your Media Engine extension supports one or more MIME types.

Requirements

Minimum supported client

Windows 8 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 [desktop apps | Windows Store apps]

Header

Mfmediaengine.h

See also

IMFMediaEngineExtension

 

 

Show: