OPAL  Version 3.10.4
OpalMixerEndPoint Class Reference

#include <opalmixer.h>

Inheritance diagram for OpalMixerEndPoint:
OpalLocalEndPoint OpalEndPoint

Public Member Functions

Construction
 OpalMixerEndPoint (OpalManager &manager, const char *prefix)
 ~OpalMixerEndPoint ()
virtual void ShutDown ()
Overrides from OpalEndPoint
virtual OpalMediaFormatList GetMediaFormats () const
virtual PSafePtr< OpalConnectionMakeConnection (OpalCall &call, const PString &party, void *userData=NULL, unsigned options=0, OpalConnection::StringOptions *stringOptions=NULL)
virtual PBoolean GarbageCollection ()
Operations
PSafePtr< OpalMixerConnectionGetMixerConnectionWithLock (const PString &token, PSafetyMode mode=PSafeReadWrite)
virtual OpalMixerConnectionCreateConnection (PSafePtr< OpalMixerNode > node, OpalCall &call, void *userData, unsigned options, OpalConnection::StringOptions *stringOptions)
Mixer Operations
PSafePtr< OpalMixerNodeAddNode (OpalMixerNodeInfo *info)
virtual OpalMixerNodeCreateNode (OpalMixerNodeInfo *info)
PSafePtr< OpalMixerNodeGetFirstNode (PSafetyMode mode=PSafeReference) const
PSafePtr< OpalMixerNodeFindNode (const PString &name, PSafetyMode mode=PSafeReference)
void RemoveNode (OpalMixerNode &node)
Member variable access
void SetAdHocNodeInfo (const OpalMixerNodeInfo &info)
void SetAdHocNodeInfo (OpalMixerNodeInfo *info)
OpalMixerNodeInfoGetAdHocNodeInfo ()
const OpalMixerNodeManagerGetNodeManager () const
OpalMixerNodeManagerGetNodeManager ()

Protected Attributes

OpalMixerNodeInfom_adHocNodeInfo
OpalMixerNodeManager m_nodeManager

Detailed Description

Mixer EndPoint. This class represents an endpoint that mixes media. It can be used as the basis for a Multipoint Conferencing Unit.


Constructor & Destructor Documentation

OpalMixerEndPoint::OpalMixerEndPoint ( OpalManager manager,
const char *  prefix 
)

Create a new endpoint.

Parameters:
managerManager of all endpoints.
prefixPrefix for URL style address strings

Member Function Documentation

Add a new node. The info variable should be created on the heap and it is subsequently owned by the node. NULL can be passed if defaults are to be used. Calls CreateNode.

Parameters:
infoInitial info for node
virtual OpalMixerConnection* OpalMixerEndPoint::CreateConnection ( PSafePtr< OpalMixerNode node,
OpalCall call,
void *  userData,
unsigned  options,
OpalConnection::StringOptions stringOptions 
) [virtual]

Create a connection for the PCSS endpoint. The default implementation is to create a OpalMixerConnection.

Parameters:
nodeNode the connection is in
callOwner of connection
userDataArbitrary data to pass to connection
optionsOption bit mask to pass to connection
stringOptionsOptions to pass to connection

Create a new node. This should create the new instance of the OpalMixerNode as required by the derived class, if any. The info variable should be created on the heap and it is subsequently owned by the node. NULL can be passed if defaults are to be used.

Parameters:
infoInitial info for node
PSafePtr<OpalMixerNode> OpalMixerEndPoint::FindNode ( const PString &  name,
PSafetyMode  mode = PSafeReference 
) [inline]

Find an existing node. This will search for the mixer node using GUID and then name.

Parameters:
nameGUID or alias name for node
modeLock mode for returned pointer

References OpalMixerNodeManager::FindNode(), and m_nodeManager.

virtual PBoolean OpalMixerEndPoint::GarbageCollection ( ) [virtual]

Execute garbage collection for endpoint. Returns true if all garbage has been collected. Default behaviour deletes the objects in the connectionsActive list.

Reimplemented from OpalEndPoint.

Get default ad hoc mode information. The pointer returned from this function is passed to the CreateNode() function, so may be a reference to derived class, which a derived class of OpalMixerNode could use.

Note if NULL, then ad hoc nodes are not created and incoming connections are refused. A user must ex[icitly call AddNode() to create a name that can be conected to.

Default bahaviour returns member variable m_adHocNodeInfo.

References m_adHocNodeInfo.

PSafePtr<OpalMixerNode> OpalMixerEndPoint::GetFirstNode ( PSafetyMode  mode = PSafeReference) const [inline]

Get the first node. The active nodes may be enumerated by the ++ operator on the PSafePtr.

Parameters:
modeLock mode for returned pointer

References OpalMixerNodeManager::GetFirstNode(), and m_nodeManager.

Get the data formats this endpoint is capable of operating. This provides a list of media data format names that may be used by an OpalMediaStream may be created by a connection from this endpoint.

Note that a specific connection may not actually support all of the media formats returned here, but should return no more.

The default behaviour returns the most basic media formats, PCM audio and YUV420P video.

Reimplemented from OpalLocalEndPoint.

PSafePtr<OpalMixerConnection> OpalMixerEndPoint::GetMixerConnectionWithLock ( const PString &  token,
PSafetyMode  mode = PSafeReadWrite 
) [inline]

Find a connection that uses the specified token. This searches the endpoint for the connection that contains the token as provided by functions such as MakeConnection(). If not then it attempts to use the token as a OpalCall token and find a connection of the same class.

Parameters:
tokenToken to identify connection
modeLock mode

Get the Node Manager for this endpoint.

References m_nodeManager.

virtual PSafePtr<OpalConnection> OpalMixerEndPoint::MakeConnection ( OpalCall call,
const PString &  party,
void *  userData = NULL,
unsigned  options = 0,
OpalConnection::StringOptions stringOptions = NULL 
) [virtual]

Set up a connection to a remote party. This is called from the OpalManager::MakeConnection() function once it has determined that this is the endpoint for the protocol.

The general form for this party parameter is:

[proto:][alias@][transport$]address[:port]

where the various fields will have meanings specific to the endpoint type. For example, with H.323 it could be "h323:Fred@site.com" which indicates a user Fred at gatekeeper size.com. Whereas for the PSTN endpoint it could be "pstn:5551234" which is to call 5551234 on the first available PSTN line.

The proto field is optional when passed to a specific endpoint. If it is present, however, it must agree with the endpoints protocol name or false is returned.

This function usually returns almost immediately with the connection continuing to occur in a new background thread.

If false is returned then the connection could not be established. For example if a PSTN endpoint is used and the assiciated line is engaged then it may return immediately. Returning a non-NULL value does not mean that the connection will succeed, only that an attempt is being made.

The default behaviour is pure.

Parameters:
callOwner of connection
partyRemote party to call
userDataArbitrary data to pass to connection
optionsOption bit mask to pass to connection
stringOptionsOptions to pass to connection
void OpalMixerEndPoint::RemoveNode ( OpalMixerNode node) [inline]

Remove a node. Shut down all active connections with node, remove its name associations and delete it.

Parameters:
nodeInitial info for node

References m_nodeManager, and OpalMixerNodeManager::RemoveNode().

Set default ad hoc node information. The pointer is passed to the CreateNode() function, so may be a reference to derived class, which a derived class of OpalMixerNode could use.

Note if NULL, then ad hoc nodes are not created and incoming connections are refused. A user must ex[icitly call AddNode() to create a name that can be conected to.

The version that takes a reference will utilise the CLone() function to create a copy of the mixer info.

virtual void OpalMixerEndPoint::ShutDown ( ) [virtual]

Shut down the endpoint, this is called by the OpalManager just before destroying the object and can be handy to make sure some things are stopped before the vtable gets clobbered.

Reimplemented from OpalEndPoint.


Field Documentation


The documentation for this class was generated from the following file: