Share via


IRTCSession::RemoveStream

The RemoveStream method removes one stream from the session. The session must be in the RTCSS_CONNECTED or RTCSS_INPROGRESS state. The call will start a renegotiation with the other end of the call, and an RTCE_SESSION_STATE_CHANGE event will be triggered.

HRESULT RemoveStream(longlMediaType,
LONG_PTRlCookie);

Parameters

  • lMediaType
    [in] An RTCMT_ constant specifying the media for which the stream will be removed. Only one stream can be removed by this call.
  • lCookie
    [in] Application-provided cookie used in the completion notification.

Return Values

RTC methods may return an RTC_E_ constant.

Value Meaning
RTC_E_INVALID_SESSION_STATE The session must be connected or in progress.
RTC_E_INVALID_SESSION_TYPE The session must be PC-PC or PC-phone.

Remarks

This function may send data over the wire in unencrypted form; therefore, someone eavesdropping on the network may be able to read the data. The security risk of sending the data in clear text should be considered before using this method in an unencrypted session. An RTC session can be encrypted by specifying TLS in the profile used for the session.

For RTC Client API version 1.2, this method can be called multiple times to remove all media streams from the session. For the RTC version 1.0 API, this method may be used to remove all but one media streams.

Note  This method will remove the media type specified in the IRTCClient::SetPreferredMediaTypes method.

Requirements

Client: Requires Windows XP.
Server: Requires Windows Server 2003.
Redistributable: Requires Rtcdll.dll on Windows 2000, and Windows Me/98.
Header: Declared in Rtccore.h.
Library: Included as a resource in Rtcdll.dll.
GUID: IID_IRTCSession is defined as 387c8086-99be-42fb-9973-7c0fc0ca9fa8.

See Also

IRTCSession, RTCMT_, IRTCSession::AddStream