Skip to main content
MFCreateMuxSink function

Creates a generic media sink that wraps a multiplexer Microsoft Media Foundation transform (MFT).


HRESULT MFCreateMuxSink(
  _In_  GUID          guidOutputSubType,
  _In_  IMFAttributes *pOutputAttributes,
  _In_  IMFByteStream *pOutputByteStream,
  _Out_ IMFMediaSink  **ppMuxSink


guidOutputSubType [in]

The subtype GUID of the output type for the MFT.

pOutputAttributes [in]

A list of format attributes for the MFT output type. This parameter is optional and can be NULL.

pOutputByteStream [in]

A pointer to the IMFByteStream interface of a byte stream. The output from the MFT is written to this byte stream. This parameter can be NULL.

ppMuxSink [out]

Receives a pointer to the IMFMediaSink interface of the media sink. The caller must release the interface.

Return value

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.


This function attempts to find a multiplexer MFT that supports an output type with the following definition:

  • Major type: MFMediaType_Stream
  • Subtype: guidOutputSubType
  • Additional format attributes (optional)

To provide a list of additional format attributes:

  1. Call MFCreateAttributes to get an IMFAttributes pointer.
  2. Use the IMFAttributes interface to set the attributes. (See Media Type Attributes.)
  3. Pass the IMFAttributes pointer in the pOutputAttributes parameter.

The multiplexer MFT must be registered in the MFT_CATEGORY_MULTIPLEXER category.


Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

None supported







See also

Media Foundation Functions