IMFTopologyNode::SetOutputPrefType method (mfidl.h)

Sets the preferred media type for an output stream on this node.

Syntax

HRESULT SetOutputPrefType(
  [in] DWORD        dwOutputIndex,
  [in] IMFMediaType *pType
);

Parameters

[in] dwOutputIndex

Zero-based index of the output stream.

[in] pType

Pointer to the IMFMediaType interface of the media type.

Return value

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

Return code Description
S_OK
The method succeeded.
E_NOTIMPL
This node is an output node.

Remarks

The preferred type is a hint for the topology loader.

Do not call this method after loading a topology or setting a topology on the Media Session. Changing the preferred type on a running topology can cause connection errors.

If no output stream exists at the specified index, the method creates new streams up to and including the specified index number.

Output nodes cannot have outputs. If this method is called on an output node, it returns E_NOTIMPL

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header mfidl.h
Library Mfuuid.lib

See also

IMFTopologyNode

Topologies