IMFCaptureSource::GetAvailableDeviceMediaType method (mfcaptureengine.h)
Gets a format that is supported by one of the capture streams.
Syntax
HRESULT GetAvailableDeviceMediaType(
[in] DWORD dwSourceStreamIndex,
[in] DWORD dwMediaTypeIndex,
[in] IMFMediaType **ppMediaType
);
Parameters
[in] dwSourceStreamIndex
The stream to query. The value can be any of the following.
Value | Meaning |
---|---|
|
The zero-based index of a stream. To get the number of streams, call IMFCaptureSource::GetDeviceStreamCount. |
|
The first image stream. |
|
The first video stream. |
|
The first audio stream. |
[in] dwMediaTypeIndex
The zero-based index of the media type to retrieve.
[in] ppMediaType
Receives a pointer to the IMFMediaType interface. The caller must release the interface.
Return value
This method can return one of these values.
Return code | Description |
---|---|
|
Success. |
|
The dwSourceStreamIndex parameter is invalid. |
|
The dwMediaTypeIndex parameter is out of range. |
Remarks
To enumerate all of the available formats on a stream, call this method in a loop while incrementing dwMediaTypeIndex, until the method returns MF_E_NO_MORE_TYPES.
Some cameras might support a range of frame rates. The minimum and maximum frame rates are stored in the MF_MT_FRAME_RATE_RANGE_MIN and MF_MT_FRAME_RATE_RANGE_MAX attributes on the media type.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps only] |
Minimum supported server | Windows Server 2012 [desktop apps only] |
Target Platform | Windows |
Header | mfcaptureengine.h |