IAudioMediaType::IsEqual method (audiomediatype.h)
The IsEqual
method compares two media types and determines whether they are identical.
Syntax
HRESULT IsEqual(
[in] IAudioMediaType *pIAudioType,
[out] DWORD *pdwFlags
);
Parameters
[in] pIAudioType
Specifies a pointer to an IAudioMediaType interface of the media type to compare.
[out] pdwFlags
Specifies a pointer to a DWORD variable that contains the bitwise OR result of zero or more flags. These flags indicate the degree of similarity between the two media types. The following table shows the supported flags.
Flag | Meaning |
---|---|
AUDIOMEDIATYPE_EQUAL_FORMAT_TYPES | The audio format types are the same. |
AUDIOMEDIATYPE_EQUAL_FORMAT_DATA | The format information matches, not including extra data beyond the base WAVEFORMATEX structure. |
AUDIOMEDIATYPE_EQUAL_FORMAT_USER_DATA | The extra data is identical, or neither media type contains extra data. |
Return value
The IsEqual
method returns S_OK if it is successful, otherwise it returns one of the HRESULT values shown in the following table.
Return code | Description |
---|---|
|
One media type is invalid or both media types are invalid. |
|
The media types are not equal. Examine the pdwFlags parameter to determine how the media types differ. |
Remarks
Both media types must have a major type, otherwise the method returns E_INVALIDARG. For more information about media types, see Media Types.
The MF_MEDIATYPE_EQUAL_FORMAT_DATA flag indicates that both media types have compatible attributes, although one might be a superset of the other. This method of comparison means that you can compare a partially-specified media type against a complete media type. For example, you might have two video types that describe the same format, but one type includes attributes for extended color information (chroma siting, nominal range, and so forth).
If the method succeeds and all the comparison flags are set in pdwFlags, the return value is S_OK. If the method succeeds but some comparison flags are not set, the method returns S_FALSE.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Available in Windows Vista and later versions of Windows. |
Target Platform | Desktop |
Header | audiomediatype.h (include Audiomediatype.h) |
IRQL | All levels. |