Platform SDK: TAPI |
Media capabilities are quite different under TAPI 2.2 (TAPI/C) as opposed to TAPI 3.0 (COM), largely because the COM API has access to media service providers (MSPs). Please see About The Media Service Provider (MSP) for additional information on MSPs and Media Control for a general review of media stream operations and information.
The two most important concepts for an application are the media type (or mode) and the stream. The type is the form in which data is transmitted. For a list of types defined by TAPI, see LINEMEDIAMODE_ Constants. The media stream is the actual stream of information that travels on the line. An MSP can provide direct access to the stream. TAPI 2.2 applications have some access, but primarily reference other APIs to implement such controls.
These APIs include the Waveform API, the Comm API, and the Media Control Interface (MCI). The Waveform API is used for multimedia programming, the Comm API is the set of communications functions provided by the Microsoft Platform SDK, and the MCI provides a high-level generalized interface for controlling media devices.
For example, for line devices, an application can use TAPI 2.2 to establish a connection to another station. Once the connection is established, the application can then use the Waveform API (or the MCI Waveaudio API) on the associated device to play back (send) and record (receive) audio data over the connection. Similarly, if the connection's media stream is from a modem, an application would use the modem configuration extensions of the Comm API to control the media stream.
To provide TAPI 2.2 with media-stream access to either a phone or a call on a line device, the service provider must implement both the Telephony SPI and the appropriate media stream SPI or DDI (device-driver interface). The service provider can support lines and phones simultaneously.
Because these device classes and media stream operations function independently of one another, coordination of their usage must occur at the application level. Multiple applications that share calls and media streams in nontrivial ways will likely need to coordinate their activities at the application level to prevent conflicting usage of TAPI and the media stream API in use.
TAPI reports changes in the type of media stream (voice, fax, data modem, and so on) to participating applications. This process is sometimes referred to as call classification. The mechanism used to determine the type of media stream is specific to the service provider. For example, a service provider may filter the media stream for energy or tones that characterize the media type, or it may use distinctive ringing, information exchanged in messages over the network, or knowledge about the caller or called ID to make this determination.