ITStreamControl::CreateStream method (tapi3if.h)

The CreateStream method creates a new media stream.

Syntax

HRESULT CreateStream(
  [in]  long               lMediaType,
  [in]  TERMINAL_DIRECTION td,
  [out] ITStream           **ppStream
);

Parameters

[in] lMediaType

Indicates media type for stream.

[in] td

Indicates the TERMINAL_DIRECTION.

[out] ppStream

Pointer to pointer for newly created ITStream interface.

Return value

This method can return one of these values.

Value Meaning
S_OK
Method succeeded.
E_POINTER
The ppStream parameter is not a valid pointer.
E_OUTOFMEMORY
Insufficient memory exists to perform the operation.
TAPI_E_INVALIDMEDIATYPE
The lMediaType parameter is not a valid media type.
TAPI_E_INVALIDDIRECTION
The td parameter is not a valid terminal direction.
TAPI_E_MAXSTREAMS
The maximum number of streams supported has already been reached.
TAPI_E_NOTSUPPORTED
This operation is not supported.

Remarks

Many MSPs do not support dynamic creation of streams, and simply return TAPI_E_MAXSTREAMS in their implementation of this method. Default streams are automatically available when a call is created, so most applications do not have to use this method.

Stream creation or removal may involve interaction with a remote endpoint, resulting in a CMC_REMOTE_REQUEST rather than the CMC_LOCAL_REQUEST messages that are received when a stream is stopped or started.

TAPI calls the AddRef method on the ITStream interface returned by ITStreamControl::CreateStream. The application must call Release on the ITStream interface to free resources associated with it.

Requirements

Requirement Value
Target Platform Windows
Header tapi3if.h (include Tapi3.h)

See also

ITStreamControl

Media Service Provider Interface (MSPI)

TERMINAL_DIRECTION

media type