#include <pcss.h>
Inheritance diagram for OpalPCSSConnection:
Public Member Functions | |
Construction | |
OpalPCSSConnection (OpalCall &call, OpalPCSSEndPoint &endpoint, const PString &playDevice, const PString &recordDevice, unsigned options=0, OpalConnection::StringOptions *stringOptions=NULL) | |
~OpalPCSSConnection () | |
Overrides from OpalConnection | |
virtual bool | TransferConnection (const PString &remoteParty) |
virtual OpalMediaStream * | CreateMediaStream (const OpalMediaFormat &mediaFormat, unsigned sessionID, PBoolean isSource) |
virtual PBoolean | SetAudioVolume (PBoolean source, unsigned percentage) |
virtual unsigned | GetAudioSignalLevel (PBoolean source) |
New operations | |
virtual PSoundChannel * | CreateSoundChannel (const OpalMediaFormat &mediaFormat, PBoolean isSource) |
Member variable access | |
const PString & | GetSoundChannelPlayDevice () const |
const PString & | GetSoundChannelRecordDevice () const |
unsigned | GetSoundChannelBufferDepth () const |
unsigned | GetSoundChannelBufferTime () const |
Protected Attributes | |
OpalPCSSEndPoint & | endpoint |
PString | soundChannelPlayDevice |
PString | soundChannelRecordDevice |
unsigned | soundChannelBuffers |
unsigned | m_soundChannelBufferTime |
OpalPCSSConnection::OpalPCSSConnection | ( | OpalCall & | call, | |
OpalPCSSEndPoint & | endpoint, | |||
const PString & | playDevice, | |||
const PString & | recordDevice, | |||
unsigned | options = 0 , |
|||
OpalConnection::StringOptions * | stringOptions = NULL | |||
) |
Create a new endpoint.
call | Owner calll for connection |
endpoint | Owner endpoint for connection |
playDevice | Sound channel play device |
recordDevice | Sound channel record device |
options | Option bit map to be passed to connection |
stringOptions | Options to be passed to connection |
OpalPCSSConnection::~OpalPCSSConnection | ( | ) |
Destroy endpoint.
virtual OpalMediaStream* OpalPCSSConnection::CreateMediaStream | ( | const OpalMediaFormat & | mediaFormat, | |
unsigned | sessionID, | |||
PBoolean | isSource | |||
) | [virtual] |
Open a new media stream. This will create a media stream of an appropriate subclass as required by the underlying connection protocol. For instance H.323 would create an OpalRTPStream.
The sessionID parameter may not be needed by a particular media stream and may be ignored. In the case of an OpalRTPStream it us used.
Note that media streams may be created internally to the underlying protocol. This function is not the only way a stream can come into existance.
The default behaviour is pure.
mediaFormat | Media format for stream |
sessionID | Session number for stream |
isSource | Is a source stream |
Reimplemented from OpalLocalConnection.
virtual PSoundChannel* OpalPCSSConnection::CreateSoundChannel | ( | const OpalMediaFormat & | mediaFormat, | |
PBoolean | isSource | |||
) | [virtual] |
Create an PSoundChannel based media stream.
mediaFormat | Media format for the connection |
isSource | Direction for channel |
virtual unsigned OpalPCSSConnection::GetAudioSignalLevel | ( | PBoolean | source | ) | [virtual] |
Get the average signal level (0..32767) for the audio media channel. A return value of UINT_MAX indicates no valid signal, eg no audio channel opened.
source | true for source (microphone), false for sink (speaker) |
Reimplemented from OpalConnection.
unsigned OpalPCSSConnection::GetSoundChannelBufferDepth | ( | ) | const [inline] |
Get default the sound channel buffer depth. Note the largest of the depth in frames and the depth in milliseconds as returned by GetSoundBufferTime() is used.
unsigned OpalPCSSConnection::GetSoundChannelBufferTime | ( | ) | const [inline] |
Get default the sound channel buffer time in milliseconds. Note the largest of the depth in frames and the depth in milliseconds as returned by GetSoundBufferTime() is used.
const PString& OpalPCSSConnection::GetSoundChannelPlayDevice | ( | ) | const [inline] |
Get the name for the sound channel to be used for output. This defaults to the value of the PSoundChannel::GetDefaultDevice() function.
const PString& OpalPCSSConnection::GetSoundChannelRecordDevice | ( | ) | const [inline] |
Get the name for the sound channel to be used for input. This defaults to the value of the PSoundChannel::GetDefaultDevice() function.
virtual PBoolean OpalPCSSConnection::SetAudioVolume | ( | PBoolean | source, | |
unsigned | percentage | |||
) | [virtual] |
Set the volume (gain) for the audio media channel to the specified percentage.
source | true for source (microphone), false for sink (speaker) |
percentage | Gain, 0=silent, 100=maximun |
Reimplemented from OpalConnection.
virtual bool OpalPCSSConnection::TransferConnection | ( | const PString & | remoteParty | ) | [virtual] |
Initiate the transfer of an existing call (connection) to a new remote party.
If remoteParty is a valid call token, then the remote party is transferred to that party (consultation transfer) and both calls are cleared.
remoteParty | Remote party to transfer the existing call to |
Reimplemented from OpalConnection.
OpalPCSSEndPoint& OpalPCSSConnection::endpoint [protected] |
Reimplemented from OpalLocalConnection.
unsigned OpalPCSSConnection::m_soundChannelBufferTime [protected] |
unsigned OpalPCSSConnection::soundChannelBuffers [protected] |
PString OpalPCSSConnection::soundChannelPlayDevice [protected] |
PString OpalPCSSConnection::soundChannelRecordDevice [protected] |