#include <opalmixer.h>
Inheritance diagram for OpalMixerConnection:
Public Member Functions | |
Construction | |
OpalMixerConnection (PSafePtr< OpalMixerNode > node, OpalCall &call, OpalMixerEndPoint &endpoint, void *userData, unsigned options=0, OpalConnection::StringOptions *stringOptions=NULL) | |
~OpalMixerConnection () | |
Overrides from OpalConnection | |
virtual void | OnReleased () |
virtual OpalMediaFormatList | GetMediaFormats () const |
virtual OpalMediaStream * | CreateMediaStream (const OpalMediaFormat &mediaFormat, unsigned sessionID, PBoolean isSource) |
virtual void | OnStartMediaPatch (OpalMediaPatch &patch) |
virtual void | OnApplyStringOptions () |
Call back for connection to act on changed string options. | |
virtual PBoolean | SendUserInputString (const PString &value) |
virtual PBoolean | SendUserInputTone (char tone, unsigned duration=0) |
Operations | |
void | SetListenOnly (bool listenOnly) |
bool | GetListenOnly () const |
PSafePtr< OpalMixerNode > | GetNode () const |
Protected Attributes | |
OpalMixerEndPoint & | m_endpoint |
PSafePtr< OpalMixerNode > | m_node |
bool | m_listenOnly |
OpalMixerConnection::OpalMixerConnection | ( | PSafePtr< OpalMixerNode > | node, | |
OpalCall & | call, | |||
OpalMixerEndPoint & | endpoint, | |||
void * | userData, | |||
unsigned | options = 0 , |
|||
OpalConnection::StringOptions * | stringOptions = NULL | |||
) |
Create a new connection.
node | Node the connection is in |
call | Owner calll for connection |
endpoint | Owner endpoint for connection |
userData | Arbitrary data to pass to connection |
options | Option bit map to be passed to connection |
stringOptions | Options to be passed to connection |
OpalMixerConnection::~OpalMixerConnection | ( | ) |
Destroy connection.
virtual OpalMediaStream* OpalMixerConnection::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.
bool OpalMixerConnection::GetListenOnly | ( | ) | const [inline] |
Get flag for this connection is in listen only mode.
virtual OpalMediaFormatList OpalMixerConnection::GetMediaFormats | ( | ) | const [virtual] |
Get the data formats this connection is capable of operating. This provides a list of media data format names that a OpalMediaStream may be created in within this connection.
The default behaviour calls GetMediaFormats() on the endpoint.
Reimplemented from OpalConnection.
PSafePtr<OpalMixerNode> OpalMixerConnection::GetNode | ( | ) | const [inline] |
Get the node that this connection is being mxied in.
virtual void OpalMixerConnection::OnApplyStringOptions | ( | ) | [virtual] |
virtual void OpalMixerConnection::OnReleased | ( | ) | [virtual] |
Clean up the termination of the connection. This function can do any internal cleaning up and waiting on background threads that may be using the connection object.
Note that there is not a one to one relationship with the OnEstablishedConnection() function. This function may be called without that function being called. For example if SetUpConnection() was used but the call never completed.
Classes that override this function should make sure they call the ancestor version for correct operation.
An application will not typically call this function as it is used by the OpalManager during a release of the connection.
The default behaviour calls the OpalEndPoint function of the same name.
Reimplemented from OpalConnection.
virtual void OpalMixerConnection::OnStartMediaPatch | ( | OpalMediaPatch & | patch | ) | [virtual] |
Call back when media stream patch thread starts.
patch | Patch being started |
Reimplemented from OpalConnection.
virtual PBoolean OpalMixerConnection::SendUserInputString | ( | const PString & | value | ) | [virtual] |
Send a user input indication to the remote endpoint. This is for sending arbitrary strings as user indications.
The default behaviour is to call SendUserInputTone() for each character in the string.
value | String value of indication |
Reimplemented from OpalLocalConnection.
virtual PBoolean OpalMixerConnection::SendUserInputTone | ( | char | tone, | |
unsigned | duration = 0 | |||
) | [virtual] |
Send a user input indication to the remote endpoint. This sends DTMF emulation user input. If something more sophisticated than the simple tones that can be sent using the SendUserInput() function.
A duration of zero indicates that no duration is to be indicated. A non-zero logical channel indicates that the tone is to be syncronised with the logical channel at the rtpTimestamp value specified.
The tone parameter must be one of "0123456789#*ABCD!" where '!' indicates a hook flash. If tone is a ' ' character then a signalUpdate PDU is sent that updates the last tone indication sent. See the H.245 specifcation for more details on this.
The default behaviour sends the tone using RFC2833.
tone | DTMF tone code |
duration | Duration of tone in milliseconds |
Reimplemented from OpalConnection.
void OpalMixerConnection::SetListenOnly | ( | bool | listenOnly | ) |
Set this connection to listen only mode.
listenOnly | New listen only state. |
OpalMixerEndPoint& OpalMixerConnection::m_endpoint [protected] |
bool OpalMixerConnection::m_listenOnly [protected] |
PSafePtr<OpalMixerNode> OpalMixerConnection::m_node [protected] |