IMFDeviceTransform::ProcessOutput method (mftransform.h)

The ProcessOutput method gets the processed output from the Device MFT output streams.

Syntax

HRESULT ProcessOutput(
  [in] DWORD                  dwFlags,
  [in] DWORD                  cOutputBufferCount,
  [in] MFT_OUTPUT_DATA_BUFFER *pOutputSample,
  [in] DWORD                  *pdwStatus
);

Parameters

[in] dwFlags

Bitwise OR of zero or more flags from the _MFT_PROCESS_OUTPUT_FLAGS enumeration.

[in] cOutputBufferCount

Number of elements in the pOutputSamples array. The value must be at least 1.

[in] pOutputSample

Pointer to an array of MFT_OUTPUT_DATA_BUFFER structures, allocated by the caller. The MFT uses this array to return output data to the caller.

[in] pdwStatus

Receives a bitwise OR of zero or more flags from the _MFT_PROCESS_OUTPUT_STATUS enumeration.

Return value

The method returns an HRESULT. Possible values include but not limited to values given in the following table.

Return code Description
S_OK
Method succeeded.
E_INVALIDARG
Invalid argument passed.
MF_E_INVALIDREQUEST
Device MFT could not support the request at this time.
MF_E_INVAILIDSTREAMNUMBER
An invalid stream ID was passed.
MF_E_INVALID_STREAM_STATE
The requested stream transition is not possible.
MF_E_TRANSFORM_TYPE_NOT_SET
Input media type has not been set.

Remarks

In most cases, if the method succeeds, the Media Foundation transform (MFT) stores the sample and holds a reference count on the IMFSample pointer. When the MFT is done using the sample, it must release it to avoid memory leaks.

After the device transform manager (DTM) has set valid media types on all of the streams, the MFT should always be able to accept more input and be able to produce more output.

If an MFT encounters a non-fatal error in the input data, it can simply drop the data and attempt to recover when it gets the more input data. If the MFT drops any data, it should set the MFSampleExtension_Discontinuity attribute on the next output sample, to notify the caller that there is a gap in the data stream.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1703
Target Platform Windows
Header mftransform.h

See also

IMFDeviceTransform