IMFDeviceTransform::GetInputAvailableType method (mftransform.h)

The GetInputAvailableType method gets an available media type for an input stream on this Media Foundation transform (MFT).

Syntax

HRESULT GetInputAvailableType(
  [in]  DWORD        dwInputStreamID,
  [in]  DWORD        dwTypeIndex,
  [out] IMFMediaType **pMediaType
);

Parameters

[in] dwInputStreamID

Input stream identifier. To get the list of stream identifiers, call IMFDeviceTransform::GetStreamID.

[in] dwTypeIndex

Index of the media type to retrieve. Media types are indexed from zero and returned in approximate order of preference.

[out] pMediaType

Receives a pointer to the IMFMediaType interface.

Return value

The method returns an HRESULT. Possible values include but not limited to values given in the following table.

Return code Description
S_OK
Initialization succeeded
MF_E_INVALIDREQUEST
Device MFT could not support the request at this time.
MF_E_INVALIDSTREAMNUMBER
The stream ID is not valid.
MF_E_NO_MORE_TYPES
There is no media type available with the specified index.

Remarks

The MFT defines a list of available media types for each input stream and orders them by preference. This method enumerates the available media types for an input stream. To enumerate the available types, increment dwTypeIndex until the method returns MF_E_NO_MORE_TYPES.

Implementation notes

If the MFT stores a media type internally, the MFT should return a clone of the media type, not a pointer to the original type. Otherwise, the caller might modify the type and alter the internal state of the MFT.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1703
Target Platform Windows
Header mftransform.h

See also

IMFDeviceTransform