Creates and destroys a VoiceChannel object, and provides access to the MediaEngine object. PhoneSessionClient calls this object to get a list of codecs when it prepares a session request or responds to a connection request. Call uses this object to create and destroy VoiceChannels when Session objects are created and destroyed, and stores a map of Session/VoiceChannel pairs. The methods shown are not thread-safe, and can be called on any thread.
One instance of ChannelManager is instantiated for the whole application; it is created by PhoneSessionClient.
class ChannelManager : public MessageHandler
The following public methods are exposed by ChannelManager.
Constructor. Creates the MediaEngine subclass.
|~ChannelManager||Destructor. Destroys the voice channel.|
|VoiceChannel* CreateVoiceChannel(Session *session)||Called by Call to create a new VoiceChannel (and helper MediaChannel) when it creates a Session object. Calls CreateVoiceChannel_w on the worker thread passed in to the constructor .|
|void DestroyVoiceChannel(VoiceChannel *voice_channel)||Deletes local references to the VoiceChannel objects and their MediaChannel objects. Calls DestroyVoiceChannel_w on a different thread.|
|MediaEngine* media_engine()||Returns a handle to the MediaEngine object created and used by ChannelManager.|
|void SetAudioOptions(bool auto_gain_control, int wave_in_device, int wave_out_device)||
Called by PhoneSessionClient to set various audio options for the chat. Calls SetAudioOptions_w on a different thread to perform this action.
|Thread* worker_thread()||The thread passed in to the constructor, used to handle the multithreaded methods. This should be the worker thread used by the application.|
Describes the audio options that the media engine uses. It has the following members:
Declaration file: talk/session/phone/channelmanager.h