Compares two media types and determines whether they are identical. If they are not identical, the method indicates how the two formats differ.
HRESULT IsEqual( IMFMediaType *pIMediaType, DWORD *pdwFlags );
Pointer to the IMFMediaType interface of the media type to compare.
Receives a bitwise OR of zero or more flags, indicating the degree of similarity between the two media types. The following flags are defined.
||The major types are the same. The major type is specified by the MF_MT_MAJOR_TYPE attribute.|
||The subtypes are the same, or neither media type has a subtype. The subtype is specified by the MF_MT_SUBTYPE attribute.|
The attributes in one of the media types are a subset of the attributes in the other, and the values of these attributes match, excluding the value of the MF_MT_USER_DATA, MF_MT_FRAME_RATE_RANGE_MIN, and MF_MT_FRAME_RATE_RANGE_MAX attributes.
Specifically, the method takes the media type with the smaller number of attributes and checks whether each attribute from that type is present in the other media type and has the same value (not including MF_MT_USER_DATA, MF_MT_FRAME_RATE_RANGE_MIN, and MF_MT_FRAME_RATE_RANGE_MAX).
To perform other comparisons, use the IMFAttributes::Compare method. For example, the Compare method can test for identical attributes, or test the intersection of the two attribute sets. For more information, see MF_ATTRIBUTES_MATCH_TYPE.
||The user data is identical, or neither media type contains user data. User data is specified by the MF_MT_USER_DATA attribute.|
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
||The types are not equal. Examine the pdwFlags parameter to determine how the types differ.|
||The types are equal.|
||One or both media types are invalid.|
Both of the media types must have a major type, or the method returns E_INVALIDARG.
If the method succeeds and all of the comparison flags are set in pdwFlags, the return value is S_OK. If the method succeeds but one or more comparison flags are not set, the method returns S_FALSE.
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.
|Minimum supported client||Windows Vista [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2008 [desktop apps | UWP apps]|
|Header||mfobjects.h (include Mfidl.h)|