IMFTopologyNode::SetInputPrefType method (mfidl.h)

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

Syntax

HRESULT SetInputPrefType(
  [in] DWORD        dwInputIndex,
  [in] IMFMediaType *pType
);

Parameters

[in] dwInputIndex

Zero-based index of the input 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 a source 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 input stream exists at the specified index, the method creates new streams up to and including the specified index number.

Source nodes cannot have inputs. If this method is called on a source 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