IMFSourceReaderEx::GetTransformForStream method (mfreadwrite.h)
Gets a pointer to a Media Foundation transform (MFT) for a specified stream.
Syntax
HRESULT GetTransformForStream(
[in] DWORD dwStreamIndex,
[in] DWORD dwTransformIndex,
[out] GUID *pGuidCategory,
[out] IMFTransform **ppTransform
);
Parameters
[in] dwStreamIndex
The stream to query for the MFT. The value can be any of the following.
[in] dwTransformIndex
The zero-based index of the MFT to retrieve.
[out] pGuidCategory
Receives a GUID that specifies the category of the MFT. For a list of possible values, see MFT_CATEGORY.
[out] ppTransform
Receives a pointer to the IMFTransform interface of the MFT. The caller must release the interface.
Return value
This method can return one of these values.
Return code | Description |
---|---|
|
Success. |
|
The dwTransformIndex parameter is out of range. |
|
The dwStreamIndex parameter is invalid. |
Remarks
You can use this method to configure an MFT after it is inserted into the processing chain. Do not use the pointer returned in ppTransform to set media types on the MFT or to process data. In particular, calling any of the following IMFTransform methods could have unexpected results.
- AddInputStreams
- DeleteInputStream
- ProcessEvent
- ProcessInput
- ProcessMessage
- ProcessOutput
- SetInputType
- SetOutputType
To avoid losing any data, you should drain the source reader before calling this method. For more information, see Draining the Data Pipeline.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2012 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | mfreadwrite.h |