Queries whether the object supports a specified media type.
public:
HRESULT IsMediaTypeSupported(
IMFMediaType *pMediaType,
_Outptr_opt_result_maybenull_ IMFMediaType **ppMediaType
)
pMediaType
Type: IMFMediaType *
Pointer to the IMFMediaType interface of the media type to check.
ppMediaType
Type: Outptr_opt_result_maybenull IMFMediaType **
Receives a pointer to the IMFMediaType interface of the closest matching media type, or receives the value NULL. If non-NULL, the caller must release the interface. This parameter can be NULL. See Remarks.
Type: HRESULT
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_INVALIDMEDIATYPE | The object does not support this media type. |
Refer to Media Foundation return codes.
If the object supports the media type given in pMediaType, the method returns S_OK. For a media source, it means the source can generate data that conforms to that media type. For a media sink, it means the sink can receive data that conforms to that media type. If the object does not support the media type, the method fails.
The ppMediaType parameter is optional. If the method fails, the object might use ppMediaType to return a media type that the object does support, and which closely matches the one given in pMediaType. The method is not guaranteed to return a media type in ppMediaType. If no type is returned, this parameter receives a NULL pointer. If the method succeeds, this parameter receives a NULL pointer. If the caller sets ppMediaType to NULL, this parameter is ignored.
Header: Declared in mfidl.h.
Library: Use mfuuid.lib.