Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

MFGetTopoNodeCurrentType function

Gets the media type for a stream associated with a topology node.


HRESULT MFGetTopoNodeCurrentType(
  IMFTopologyNode *pNode,
  DWORD dwStreamIndex,
  BOOL fOutput,
  _Out_  IMFMediaType **ppType



A pointer to the IMFTopologyNode interface.


The identifier of the stream to query. This parameter is interpreted as follows:

  • Transform nodes: The value is the zero-based index of the input or output stream.
  • All other node types: The value must be zero.

If TRUE, the function gets an output type. If FALSE, the function gets an input type. This parameter is interpreted as follows:

  • Output nodes: The value must be TRUE.
  • Source nodes: The value must be FALSE.
  • Tee nodes: The value is ignored.
  • Transform nodes: If the value is TRUE, the dwStreamIndex parameter is the index for an output stream. Otherwise, dwStreamIndex is the index for an input stream.
ppType [out]

Receives a pointer to the IMFMediaType interface. The caller must release the interface.

Return value

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

Return codeDescription

The method succeeded.


The stream index is invalid.



This function gets the actual media type from the object that is associated with the topology node. The pNode parameter should specify a node that belongs to a fully resolved topology. If the node belongs to a partial topology, the function will probably fail.

Tee nodes do not have an associated object to query. For tee nodes, the function gets the node's input type, if available. Otherwise, if no input type is available, the function gets the media type of the node's primary output stream. The primary output stream is identified by the MF_TOPONODE_PRIMARYOUTPUT attribute.


Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]







See also

Media Foundation Functions



Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.