Microsoft DirectX 8.1 (C++) |
The CreateOutputPin method creates a new output pin on the Demux.
Syntax
HRESULT CreateOutputPin(
AM_MEDIA_TYPE* pMediaType,
LPWSTR pszPinName,
IPin** ppIPin
);
Parameters
pMediaType
[in] Pointer to an AM_MEDIA_TYPE structure that specifies the media type information for the new pin.
pszPinName
[in] Pointer to a wide character string that specifies the application-defined friendly name for the new pin.
ppIPin
[out] Address of a variable that receives a pointer to the pin's IPin interface.
Return Value
Returns S_OK if successful. If the method fails, it returns an HRESULT error code.
Remarks
Duplicate pin names are not allowed. The returned IPin interface can be used to query the new pin for either an IMPEG2StreamIdMap interface (for program streams) or an IMPEG2PIDMap interface (for transport streams). Based on which interface is queried for on the first output pin, the Demux will configure itself for either transport or program stream mode. Once the Demux is configured, a call to QueryInterface to retrieve the other interface will fail.
See Also