Export (0) Print
Expand All

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.

ValueMeaning
0–0xFFFFFFFB

The zero-based index of a stream.

MF_SOURCE_READER_FIRST_VIDEO_STREAM
0xFFFFFFFC

The first video stream.

MF_SOURCE_READER_FIRST_AUDIO_STREAM
0xFFFFFFFD

The first audio stream.

 

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 codeDescription
S_OK

Success.

MF_E_INVALIDINDEX

The dwTransformIndex parameter is out of range.

MF_E_INVALIDSTREAMNUMBER

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.

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

Mfreadwrite.h

See also

IMFSourceReaderEx

 

 

Community Additions

ADD
Show:
© 2014 Microsoft