IMFTransform::GetStreamIDs method (mftransform.h)
Gets the stream identifiers for the input and output streams on this Media Foundation transform (MFT).
HRESULT GetStreamIDs( DWORD dwInputIDArraySize, DWORD *pdwInputIDs, DWORD dwOutputIDArraySize, DWORD *pdwOutputIDs );
Number of elements in the pdwInputIDs array.
Pointer to an array allocated by the caller. The method fills the array with the input stream identifiers. The array size must be at least equal to the number of input streams. To get the number of input streams, call IMFTransform::GetStreamCount.
If the caller passes an array that is larger than the number of input streams, the MFT must not write values into the extra array entries.
Number of elements in the pdwOutputIDs array.
Pointer to an array allocated by the caller. The method fills the array with the output stream identifiers. The array size must be at least equal to the number of output streams. To get the number of output streams, call GetStreamCount.
If the caller passes an array that is larger than the number of output streams, the MFT must not write values into the extra array entries.
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
||The method succeeded.|
||Not implemented. See Remarks.|
||One or both of the arrays is too small.|
Stream identifiers are necessary because some MFTs can add or remove streams, so the index of a stream may not be unique. Therefore, IMFTransform methods that operate on streams take stream identifiers.
This method can return E_NOTIMPL if both of the following conditions are true:
- The transform has a fixed number of streams.
- The streams are numbered consecutively from 0 to n – 1, where n is the number of input streams or output streams. In other words, the first input stream is 0, the second is 1, and so on; and the first output stream is 0, the second is 1, and so on.
- The MFT can add or remove output streams.
- The MFT allows the client to add or remove input streams.
- The stream identifiers are not consecutive.
If the client adds an input stream, the client assigns the identifier, so the MFT must allow arbitrary identifiers, as long as they are unique. If the MFT creates an output stream, the MFT assigns the identifier.
By convention, if an MFT has exactly one fixed input stream and one fixed output stream, it should assign the identifier 0 to both streams.
If MFT_UNIQUE_METHOD_NAMES is defined before including mftransform.h, this method is renamed MFTGetStreamIDs. See Creating Hybrid DMO/MFT Objects.
|Minimum supported client||Windows Vista [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2008 [desktop apps | UWP apps]|