IMFMediaSink::AddStreamSink method (mfidl.h)
Adds a new stream sink to the media sink.
Syntax
HRESULT AddStreamSink(
[in] DWORD dwStreamSinkIdentifier,
[in] IMFMediaType *pMediaType,
[out] IMFStreamSink **ppStreamSink
);
Parameters
[in] dwStreamSinkIdentifier
Identifier for the new stream. The value is arbitrary but must be unique.
[in] pMediaType
Pointer to the IMFMediaType interface, specifying the media type for the stream. This parameter can be NULL.
[out] ppStreamSink
Receives a pointer to the new stream sink's IMFStreamSink interface. The caller must release the interface.
Return value
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Return code | Description |
---|---|
|
The method succeeded. |
|
The specified stream identifier is not valid. |
|
The media sink's Shutdown method has been called. |
|
There is already a stream sink with the same stream identifier. |
|
This media sink has a fixed set of stream sinks. New stream sinks cannot be added. |
Remarks
Not all media sinks support this method. If the media sink does not support this method, the IMFMediaSink::GetCharacteristics method returns the MEDIASINK_FIXED_STREAMS flag.
If pMediaType is NULL, use the IMFMediaTypeHandler interface to set the media type. Call IMFStreamSink::GetMediaTypeHandler to get a pointer to the interface.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | mfidl.h |
Library | Mfuuid.lib |