Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IMFMediaSink::RemoveStreamSink method

Removes a stream sink from the media sink.

Syntax


HRESULT RemoveStreamSink(
  [in] DWORD dwStreamSinkIdentifier
);

Parameters

dwStreamSinkIdentifier [in]

Identifier of the stream to remove. The stream identifier is defined when you call IMFMediaSink::AddStreamSink to add the stream sink.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return codeDescription
S_OK

The method succeeded.

E_INVALIDARG

This particular stream sink cannot be removed.

MF_E_INVALIDSTREAMNUMBER

The stream number is not valid.

MF_E_NOT_INITIALIZED

The media sink has not been initialized.

MF_E_SHUTDOWN

The media sink's Shutdown method has been called.

MF_E_STREAMSINKS_FIXED

This media sink has a fixed set of stream sinks. Stream sinks cannot be removed.

 

Remarks

After this method is called, the corresponding stream sink object is no longer valid. The IMFMediaSink::GetStreamSinkByIndex and IMFMediaSink::GetStreamSinkById methods will no longer return that stream sink. You can re-use the stream identifier if you add another stream (by calling AddStreamSink).

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.

In some cases, the media sink supports this method but does not allow every stream sink to be removed. (For example, it might not allow stream 0 to be removed.)

Requirements

Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Mfidl.h

Library

Mfuuid.lib

See also

IMFMediaSink
Media Sinks

 

 

Community Additions

ADD
Show:
© 2015 Microsoft