IMpeg2Demultiplexer::CreateOutputPin method (strmif.h)

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


HRESULT CreateOutputPin(
  [in]  AM_MEDIA_TYPE *pMediaType,
  [in]  LPWSTR        pszPinName,
  [out] IPin          **ppIPin


[in] pMediaType

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

[in] pszPinName

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] ppIPin

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.

Return code Description
Invalid argument.
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.


Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header strmif.h (include Dshow.h)
Library Strmiids.lib

See also

Error and Success Codes

IMpeg2Demultiplexer Interface