IMFTopologyNode::SetInputPrefType method

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

Syntax

HRESULT SetInputPrefType(
  DWORD        dwInputIndex,
  IMFMediaType *pType
);

Parameters

dwInputIndex

Zero-based index of the input stream.

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

   
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