IMDSPDevice2::GetFormatSupport2
The GetFormatSupport2 method gets the formats supported by a device, including audio and video codecs, and MIME file formats.
Syntax
HRESULT GetFormatSupport2(DWORDdwFlags,_WAVEFORMATEX**ppAudioFormatEx,UINT*pnAudioFormatCount,_VIDEOINFOHEADER**ppVideoFormatEx,UINT*pnVideoFormatCount,WMFILECAPABILITIES**ppFileType,UINT*pnFileTypeCount);
Parameters
dwFlags
[in] 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. |
ppAudioFormatEx
[out] Pointer to an array of _WAVEFORMATEX structures containing information about audio codecs and bit rates supported by the device.
pnAudioFormatCount
[out] Pointer to an integer containing the audio format count.
ppVideoFormatEx
[out] Pointer to an array of _VIDEOINFOHEADER structures containing information about video codecs and formats supported by the device.
pnVideoFormatCount
[out] Pointer to an integer containing the video format count.
ppFileType
[out] Pointer to an array of WMFILECAPABILITIES structures containing information about file types supported by the device.
pnFileTypeCount
[out] Pointer to an integer containing the file format count.
Return Values
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
For an extenstive list of possible error codes, see Error Codes.
Possible values include, but are not limited to, those in the following table.
Return code | Description |
S_OK | The method succeeded. |
E_FAIL | An unspecified error occurred. |
E_OUTOFMEMORY | Not enough memory to return the structures |
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
Header: Defined in mswmdm.h.
Library: mssachlp.lib
See Also