|Microsoft DirectX 9.0|
The SetOutputPinMediaType method updates the media type of the specified output pin. (DirectX® 9.0 and later.)
HRESULT SetOutputPinMediaType( LPWSTR pszPinName, AM_MEDIA_TYPE* pMediaType );
[in] The friendly name of the pin as specified when the pin was created in a call to CreateOutputPin.
in] Pointer to an AM_MEDIA_TYPE structure that specifies the new media type information for the pin.
Returns S_OK if successful. If the method fails, it returns an HRESULT error code.
The pin must be assigned the media type at the time it is created. The media type cannot be modified later.
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.