IMpeg2Demultiplexer::CreateOutputPin method (strmif.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

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

Syntax

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

Parameters

[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
E_INVALIDARG
Invalid argument.
S_OK
Success.
VFW_E_DUPLICATE_NAME
Duplicate pin name.

Remarks

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.

Requirements

Requirement Value
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