The GetInputStreamPreferredState method gets a Device MFT input stream’s preferred state and media type.
HRESULT GetInputStreamPreferredState( DWORD dwStreamID, DeviceStreamState *value, IMFMediaType **ppMediaType );
Stream ID of the input stream whose state needs to be retrieved.
Specifies the current DeviceStreamState of the specified input Device MFT stream.
Preferred media type for the input stream is passed in through this parameter.
The method returns an HRESULT. Possible values include but not limited to values given in the following table.
||Transitioning the stream state succeeded.|
||Device MFT could not support the request at this time.|
||An invalid stream ID was passed.|
||The requested stream transition is not possible.|
This interface function helps to query the Device MFT input stream’s preferred state and mediatype to which it needs to be transitioned.
When a change in the output stream’s media type needs corresponding change in the input, then Device MFT would post METransformInputStreamStateChanged to DTM to change the relevant input stream. DTM would call GetInputStreamPreferredState to retrieve Device MFT input stream’s preferred mediatype and state.
As an example, consider a Device MFT that has two input streams and three output streams. Let Output 1 and Output 2 source from Input 1 and stream at 720p. Now, let us say Output 2’s media type changes to 1080p. To satisfy this request, Device MFT must change the Input 1 media type to 1080p, by posting METransformInputStreamStateChanged event to the DTM. DTM would call GetInputStreamPreferredState and retrieve the preferred state and mediatype. DTM would call SetInputStreamState to change the input stream’ mediatype and state.
|Minimum supported client||Windows 10, version 1703|