#include <pcss.h>
Inheritance diagram for OpalPCSSConnection:
Public Member Functions | |
Construction | |
OpalPCSSConnection (OpalCall &call, OpalPCSSEndPoint &endpoint, const PString &playDevice, const PString &recordDevice) | |
~OpalPCSSConnection () | |
Overrides from OpalConnection | |
virtual BOOL | SetUpConnection () |
virtual BOOL | SetAlerting (const PString &calleeName, BOOL withMedia) |
virtual BOOL | SetConnected () |
virtual PString | GetDestinationAddress () |
virtual OpalMediaFormatList | GetMediaFormats () const |
virtual OpalMediaStream * | CreateMediaStream (const OpalMediaFormat &mediaFormat, unsigned sessionID, BOOL isSource) |
virtual void | OnPatchMediaStream (BOOL isSource, OpalMediaPatch &patch) |
virtual BOOL | OpenSourceMediaStream (const OpalMediaFormatList &mediaFormats, unsigned sessionID) |
virtual OpalMediaStream * | OpenSinkMediaStream (OpalMediaStream &source) |
virtual BOOL | SendUserInputString (const PString &value) |
New operations | |
virtual void | InitiateCall () |
virtual void | AcceptIncoming () |
virtual PSoundChannel * | CreateSoundChannel (const OpalMediaFormat &mediaFormat, BOOL isSource) |
Member variable access | |
const PString & | GetSoundChannelPlayDevice () const |
const PString & | GetSoundChannelRecordDevice () const |
unsigned | GetSoundChannelBufferDepth () const |
Protected Attributes | |
OpalPCSSEndPoint & | endpoint |
PString | soundChannelPlayDevice |
PString | soundChannelRecordDevice |
unsigned | soundChannelBuffers |
OpalPCSSConnection::OpalPCSSConnection | ( | OpalCall & | call, | |
OpalPCSSEndPoint & | endpoint, | |||
const PString & | playDevice, | |||
const PString & | recordDevice | |||
) |
Create a new endpoint.
call | Owner calll for connection |
endpoint | Owner endpoint for connection |
playDevice | Sound channel play device |
recordDevice | Sound channel record device |
OpalPCSSConnection::~OpalPCSSConnection | ( | ) |
Destroy endpoint.
virtual void OpalPCSSConnection::AcceptIncoming | ( | ) | [virtual] |
Accept the incoming connection.
virtual OpalMediaStream* OpalPCSSConnection::CreateMediaStream | ( | const OpalMediaFormat & | mediaFormat, | |
unsigned | sessionID, | |||
BOOL | 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 OpalConnection.
virtual PSoundChannel* OpalPCSSConnection::CreateSoundChannel | ( | const OpalMediaFormat & | mediaFormat, | |
BOOL | isSource | |||
) | [virtual] |
Create an PSoundChannel based media stream.
mediaFormat | Media format for the connection |
isSource | Direction for channel |
virtual PString OpalPCSSConnection::GetDestinationAddress | ( | ) | [virtual] |
Get the destination address of an incoming connection. The default behaviour collects a DTMF number terminated with a '#' or if no digits were entered for a time (default 3 seconds). If no digits are entered within a longer time time (default 30 seconds), then an empty string is returned.
Reimplemented from OpalConnection.
virtual OpalMediaFormatList OpalPCSSConnection::GetMediaFormats | ( | ) | const [virtual] |
Get the data formats this connection is capable of operating. This provides a list of media data format names that an OpalMediaStream may be created in within this connection.
The default behaviour returns the formats the PSoundChannel can do, typically only PCM-16.
Implements OpalConnection.
unsigned OpalPCSSConnection::GetSoundChannelBufferDepth | ( | ) | const [inline] |
Get default the sound channel buffer depth.
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 void OpalPCSSConnection::InitiateCall | ( | ) | [virtual] |
Call is initiated as the A-Party.
virtual void OpalPCSSConnection::OnPatchMediaStream | ( | BOOL | 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.
patch | New patch |
Reimplemented from OpalConnection.
virtual OpalMediaStream* OpalPCSSConnection::OpenSinkMediaStream | ( | OpalMediaStream & | source | ) | [virtual] |
Open source transmitter media stream for session.
source | Source media sink format to open to |
Reimplemented from OpalConnection.
virtual BOOL OpalPCSSConnection::OpenSourceMediaStream | ( | const OpalMediaFormatList & | mediaFormats, | |
unsigned | sessionID | |||
) | [virtual] |
Open source transmitter media stream for session.
mediaFormats | Optional media format to open |
sessionID | Session to start stream on |
Reimplemented from OpalConnection.
virtual BOOL 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.
value | String value of indication |
Reimplemented from OpalConnection.
virtual BOOL OpalPCSSConnection::SetAlerting | ( | const PString & | calleeName, | |
BOOL | 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.
calleeName | Name of endpoint being alerted. |
withMedia | Open media with alerting |
Implements OpalConnection.
virtual BOOL OpalPCSSConnection::SetConnected | ( | ) | [virtual] |
Indicate to remote endpoint we are connected.
The default behaviour does nothing.
Implements OpalConnection.
virtual BOOL 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.
OpalPCSSEndPoint& OpalPCSSConnection::endpoint [protected] |
Reimplemented from OpalConnection.
unsigned OpalPCSSConnection::soundChannelBuffers [protected] |
PString OpalPCSSConnection::soundChannelPlayDevice [protected] |
PString OpalPCSSConnection::soundChannelRecordDevice [protected] |