IMFSourceReaderEx::GetTransformForStream method
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
- dwStreamIndex [in]
-
The stream to query for the MFT. The value can be any of the following.
- dwTransformIndex [in]
-
The zero-based index of the MFT to retreive.
- pGuidCategory [out]
-
Receives a GUID that specifies the category of the MFT. For a list of possible values, see MFT_CATEGORY.
- ppTransform [out]
-
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
If a decoder is present, it appears at index position zero.
To avoid losing any data, you should drain the source reader before calling this method. For more information, see Draining the Data Pipeline.
Requirements
|
Minimum supported client |
Windows 8 [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2012 [desktop apps | Windows Store apps] |
|
Header |
|
See also