Partager via


IMpeg2Demultiplexer::SetOutputPinMediaType

 
Microsoft DirectShow 9.0

IMpeg2Demultiplexer::SetOutputPinMediaType

The SetOutputPinMediaType method updates the media type of the specified output pin. (DirectX 9.0 and later.)

Syntax

  HRESULT SetOutputPinMediaType(
  LPWSTR pszPinName,
  AM_MEDIA_TYPE* pMediaType
);

Parameters

pszPinName

[in] The friendly name of the pin as specified when the pin was created in a call to CreateOutputPin.

pMediaType

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

Return Value

Returns S_OK if successful. If the method fails, it returns an HRESULT error code.

Remarks

Pins can be reconfigured at any time with a new media type. If no connection exists, the media type is simply updated. If the pin is connected, the success or failure of the call will depend on the downstream input pin's acceptance or rejection of the specified media type.

The media type is not interpreted in any way by the Demultiplexer filter. It is used only during connection negotiation by the output pin. It has no effect on the content of the media samples. Media sample content is defined when a PID is mapped via the MEDIA_SAMPLE_CONTENT parameter in the IMPEG2PIDMap::MapPID method, or via the defined values in an IMPEG2StreamIdMap::MapStreamId call.

Requirements

Header: Declared in Strmif.h; include Dshow.h.

Library: Use Strmiids.lib.

See Also