Microsoft DirectX 9.0


The CreateOutputPin method creates a new output pin on the Demux.


HRESULT CreateOutputPin(
  AM_MEDIA_TYPE* pMediaType,
  LPWSTR pszPinName,
  IPin** ppIPin



[in] Pointer to an AM_MEDIA_TYPE structure that specifies the media type information for the new pin.


[in] Pointer to a wide character string that specifies a name for the new pin. The maximum length is 128 characters, including the NULL terminator.


[out] Address of a variable that receives a pointer to the pin's IPin interface.

Return Value

Returns an HRESULT value. Possible return values include the following.

Value Description
E_INVALIDARG Invalid argument.
S_OK Success.
VFW_E_DUPLICATE_NAME Duplicate pin name.


Duplicate pin names are not allowed. To configure the pin, query the returned IPin interface for the IMPEG2StreamIdMap interface (for program streams) or for the IMPEG2PIDMap interface (for transport streams). Depending on which interface is queried for on the first output pin, the Demux configures itself for either transport or program stream mode. Once the Demux is configured, any calls to QueryInterface to retrieve the other interface will fail.

See Also