OpalPCSSConnection Class Reference

#include <pcss.h>

Inheritance diagram for OpalPCSSConnection:

OpalConnection List of all members.

Public Member Functions

Overrides from OpalConnection
virtual bool IsNetworkConnection () const
virtual PBoolean SetUpConnection ()
virtual PBoolean SetAlerting (const PString &calleeName, PBoolean withMedia)
virtual OpalMediaStreamCreateMediaStream (const OpalMediaFormat &mediaFormat, unsigned sessionID, PBoolean isSource)
virtual void OnPatchMediaStream (PBoolean isSource, OpalMediaPatch &patch)
virtual OpalMediaStreamPtr OpenMediaStream (const OpalMediaFormat &mediaFormat, unsigned sessionID, bool isSource)
virtual PBoolean SetAudioVolume (PBoolean source, unsigned percentage)
virtual unsigned GetAudioSignalLevel (PBoolean source)
virtual PBoolean SendUserInputString (const PString &value)
New operations
virtual void AcceptIncoming ()
virtual PSoundChannel * CreateSoundChannel (const OpalMediaFormat &mediaFormat, PBoolean isSource)
Member variable access
const PString & GetSoundChannelPlayDevice () const
const PString & GetSoundChannelRecordDevice () const
unsigned GetSoundChannelBufferDepth () const

Protected Attributes

OpalPCSSEndPointendpoint
PString soundChannelPlayDevice
PString soundChannelRecordDevice
unsigned soundChannelBuffers

Detailed Description

PC Sound System connection.


Constructor & Destructor Documentation

OpalPCSSConnection::OpalPCSSConnection ( OpalCall call,
OpalPCSSEndPoint endpoint,
const PString &  playDevice,
const PString &  recordDevice 
)

Create a new endpoint.

Parameters:
call  Owner calll for connection
endpoint  Owner endpoint for connection
playDevice  Sound channel play device
recordDevice  Sound channel record device

OpalPCSSConnection::~OpalPCSSConnection (  ) 

Destroy endpoint.

OpalPCSSConnection::OpalPCSSConnection ( OpalCall call,
OpalPCSSEndPoint endpoint,
const PString &  playDevice,
const PString &  recordDevice 
)

Create a new endpoint.

Parameters:
call  Owner calll for connection
endpoint  Owner endpoint for connection
playDevice  Sound channel play device
recordDevice  Sound channel record device

OpalPCSSConnection::~OpalPCSSConnection (  ) 

Destroy endpoint.


Member Function Documentation

virtual bool OpalPCSSConnection::IsNetworkConnection (  )  const [inline, virtual]

Get indication of connection being to a "network". This indicates the if the connection may be regarded as a "network" connection. The distinction is about if there is a concept of a "remote" party being connected to and is best described by example: sip, h323, iax and pstn are all "network" connections as they connect to something "remote". While pc, pots and ivr are not as the entity being connected to is intrinsically local.

Implements OpalConnection.

virtual PBoolean OpalPCSSConnection::SetUpConnection (  )  [virtual]

Start an outgoing connection. This function will initiate the connection to the remote entity, for example in H.323 it sends a SETUP, in SIP it sends an INVITE etc.

The default behaviour does.

Implements OpalConnection.

virtual PBoolean OpalPCSSConnection::SetAlerting ( const PString &  calleeName,
PBoolean  withMedia 
) [virtual]

Indicate to remote endpoint an alert is in progress. If this is an incoming connection and the AnswerCallResponse is in a AnswerCallDeferred or AnswerCallPending state, then this function is used to indicate to that endpoint that an alert is in progress. This is usually due to another connection which is in the call (the B party) has received an OnAlerting() indicating that its remote endpoint is "ringing".

The default behaviour does nothing.

Parameters:
calleeName  Name of endpoint being alerted.
withMedia  Open media with alerting

Implements OpalConnection.

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.

Parameters:
mediaFormat  Media format for stream
sessionID  Session number for stream
isSource  Is a source stream

Reimplemented from OpalConnection.

virtual void OpalPCSSConnection::OnPatchMediaStream ( PBoolean  isSource,
OpalMediaPatch patch 
) [virtual]

Call back when patching a media stream. This function is called when a connection has created a new media patch between two streams. Add the echo canceler patch and call the endpoint function of the same name. Add a PCM silence detector filter.

Parameters:
patch  New patch

Reimplemented from OpalConnection.

virtual OpalMediaStreamPtr OpalPCSSConnection::OpenMediaStream ( const OpalMediaFormat mediaFormat,
unsigned  sessionID,
bool  isSource 
) [virtual]

Open source or sink media stream for session.

Parameters:
mediaFormat  Media format to open
sessionID  Session to start stream on
isSource  Stream is a source/sink

Reimplemented from OpalConnection.

virtual PBoolean OpalPCSSConnection::SetAudioVolume ( PBoolean  source,
unsigned  percentage 
) [virtual]

Set the volume (gain) for the audio media channel to the specified percentage.

Parameters:
source  true for source (microphone), false for sink (speaker)
percentage  Gain, 0=silent, 100=maximun

Reimplemented from OpalConnection.

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.

Parameters:
source  true for source (microphone), false for sink (speaker)

Reimplemented from OpalConnection.

virtual PBoolean OpalPCSSConnection::SendUserInputString ( const PString &  value  )  [virtual]

Send a user input indication to the remote endpoint. This sends an arbitrary string as a user indication. If DTMF tones in particular are required to be sent then the SendIndicationTone() function should be used.

The default behaviour plays the DTMF tones on the line.

Parameters:
value  String value of indication

Reimplemented from OpalConnection.

virtual void OpalPCSSConnection::AcceptIncoming (  )  [virtual]

Accept the incoming connection.

virtual PSoundChannel* OpalPCSSConnection::CreateSoundChannel ( const OpalMediaFormat mediaFormat,
PBoolean  isSource 
) [virtual]

Create an PSoundChannel based media stream.

Parameters:
mediaFormat  Media format for the connection
isSource  Direction for channel

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.

unsigned OpalPCSSConnection::GetSoundChannelBufferDepth (  )  const [inline]

Get default the sound channel buffer depth.


Member Data Documentation

OpalPCSSEndPoint& OpalPCSSConnection::endpoint [protected]

Reimplemented from OpalConnection.

PString OpalPCSSConnection::soundChannelPlayDevice [protected]

PString OpalPCSSConnection::soundChannelRecordDevice [protected]

unsigned OpalPCSSConnection::soundChannelBuffers [protected]


The documentation for this class was generated from the following file:
Generated on Mon Sep 15 11:49:40 2008 for OPAL by  doxygen 1.5.1