IMFTopologyNode::ConnectOutput method (mfidl.h)

Connects an output stream from this node to the input stream of another node.

Syntax

HRESULT ConnectOutput(
  [in] DWORD           dwOutputIndex,
  [in] IMFTopologyNode *pDownstreamNode,
  [in] DWORD           dwInputIndexOnDownstreamNode
);

Parameters

[in] dwOutputIndex

Zero-based index of the output stream on this node.

[in] pDownstreamNode

Pointer to the IMFTopologyNode interface of the node to connect to.

[in] dwInputIndexOnDownstreamNode

Zero-based index of the input stream on the other node.

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_FAIL
The method failed.
E_INVALIDARG
Invalid parameter.

Remarks

Node connections represent data flow from one node to the next. The streams are logical, and are specified by index.

If the node is already connected at the specified output, the method breaks the existing connection. If dwOutputIndex or dwInputIndexOnDownstreamNode specify streams that do not exist yet, the method adds as many streams as needed.

This method checks for certain invalid conditions:

  • An output node cannot have any output connections. If you call this method on an output node, the method returns E_FAIL.
  • A node cannot be connected to itself. If pDownstreamNode specifies the same node as the method call, the method returns E_INVALIDARG.
However, if the method succeeds, it does not guarantee that the node connection is valid. It is possible to create a partial topology that the topology loader cannot resolve. If so, the IMFTopoLoader::Load method will fail.

To break an existing node connection, call IMFTopologyNode::DisconnectOutput.

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