2.4.2.5 Media Control
The TAPI DLL can request the execution of a limited set of media control operations on the call's media stream triggered by telephony events. Although the TAPI DLL's clients will usually use the media API specifically defined for the media mode, media control can yield a significant performance improvement for client/server implementations since simple "detect/control" sequences can be offloaded to the server. The operation TSPI_lineSetMediaControl allows the TAPI DLL to specify a list of tuples specifying a telephony event and the associated media control action.
The telephony events that can trigger media control activities are:
- detection of a digit - The TAPI DLL provides a list of specific digits and the media control action each of them triggers.
- detection of a media mode - The TAPI DLL provides a list of media modes and the media control actions a transition into the media mode triggers.
- detection of a specified tone - The TAPI DLL specifies a list of tones and the media control action each tone detection triggers.
- detection of a call state - The TAPI DLL specifies a list of call states and the media control action each transition to the call state triggers.
The media control actions are defined generically for the different media modes. Not all media streams may provide meaningful interpretations of the media control actions. The operations should map well to audio streams.
- start - Starts the media stream.
- reset - Resets the media stream.
- pause - Stops or pauses the media stream.
- resume - Starts or resumes the media stream.
- rate up - Increases the rate (i.e., speed) of the media stream by a implementation-defined amount.
- rate down - Decreases the rate (i.e., speed) of the media stream by a implementation-defined amount.
- rate normal - Returns the rate (i.e., speed) to normal.
- volume up - Increases the volume (i.e., amplitude) of the media stream.
- volume down - Decreases the volume (i.e., amplitude) of the media stream.
- volume normal - Returns the volume (i.e., amplitude) to normal.
TSPI_lineSetMediaControl
Sets up a call's media stream for media control.
The scope of media control is bound by the lifetime of the call. Media control on a call ends as soon the call disconnects or goes idle. Only a single media control request can be outstanding on a call across all apps.