IMDSPDevice2::GetFormatSupport2 method (mswmdm.h)
The GetFormatSupport2 method gets the formats supported by a device, including audio and video codecs, and MIME file formats.
Syntax
HRESULT GetFormatSupport2(
[in] DWORD dwFlags,
[out] _WAVEFORMATEX **ppAudioFormatEx,
[out] UINT *pnAudioFormatCount,
[out] _VIDEOINFOHEADER **ppVideoFormatEx,
[out] UINT *pnVideoFormatCount,
[out] WMFILECAPABILITIES **ppFileType,
[out] UINT *pnFileTypeCount
);
Parameters
[in] dwFlags
DWORD containing audio formats, video formats, and MIME types. This flag specifies what the application is requesting the service provider to fill in. The caller can set one or more of the following three values.
Value | Description |
---|---|
WMDM_GET_FORMAT_SUPPORT_AUDIO | Service provider should fill in audio parameters. |
WMDM_GET_FORMAT_SUPPORT_VIDEO | Service provider should fill in video parameters. |
WMDM_GET_FORMAT_SUPPORT_FILE | Service provider should fill in file parameters. |
[out] ppAudioFormatEx
Pointer to an array of _WAVEFORMATEX structures containing information about audio codecs and bit rates supported by the device.
[out] pnAudioFormatCount
Pointer to an integer containing the audio format count.
[out] ppVideoFormatEx
Pointer to an array of _VIDEOINFOHEADER structures containing information about video codecs and formats supported by the device.
[out] pnVideoFormatCount
Pointer to an integer containing the video format count.
[out] ppFileType
Pointer to an array of WMFILECAPABILITIES structures containing information about file types supported by the device.
[out] pnFileTypeCount
Pointer to an integer containing the file format count.
Return value
The method returns an HRESULT. All the interface methods in Windows Media Device Manager can return any of the following classes of error codes:
- Standard COM error codes
- Windows error codes converted to HRESULT values
- Windows Media Device Manager error codes
Remarks
This method must be implemented. It must not return WMDM_E_NOTSUPPORTED or E_NOTIMPL. For more information, see Mandatory and Optional Interfaces.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | mswmdm.h |
Library | Mssachlp.lib |