IMFDeviceTransform::GetInputStreamPreferredState method (mftransform.h)
The GetInputStreamPreferredState method gets a Device MFT input stream’s preferred state and media type.
Syntax
HRESULT GetInputStreamPreferredState(
[in] DWORD dwStreamID,
[out] DeviceStreamState *value,
[out] IMFMediaType **ppMediaType
);
Parameters
[in] dwStreamID
Stream ID of the input stream whose state needs to be retrieved.
[out] value
Specifies the current DeviceStreamState of the specified input Device MFT stream.
[out] ppMediaType
Preferred media type for the input stream is passed in through this parameter.
Return value
The method returns an HRESULT. Possible values include but not limited to values given in the following table.
Return code | Description |
---|---|
|
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. |
Remarks
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.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10, version 1703 |
Target Platform | Windows |
Header | mftransform.h |