OPAL  Version 3.18.8
OpalMixerNode Class Reference

#include <opalmixer.h>

Inherits PSafeObject.

Collaboration diagram for OpalMixerNode:

Public Member Functions

Construction
 OpalMixerNode (OpalMixerNodeManager &manager, OpalMixerNodeInfo *info)
 
 ~OpalMixerNode ()
 
void ShutDown ()
 
Overrides from PObject
void PrintOn (ostream &strm) const
 
Operations
virtual void AttachConnection (OpalConnection *connection)
 
virtual void DetachConnection (OpalConnection *connection)
 
virtual bool AttachStream (OpalMixerMediaStream *stream)
 
virtual void DetachStream (OpalMixerMediaStream *stream)
 
virtual void UseMediaPassThrough (unsigned sessionID, OpalConnection *connection=NULL)
 
bool SetJitterBufferSize (const OpalBaseMixer::Key_T &key, const OpalJitterBuffer::Init &init)
 
bool WritePacket (const OpalMixerMediaStream &stream, const RTP_DataFrame &input)
 
virtual void BroadcastUserInput (const OpalConnection *connection, const PString &value)
 
virtual void GetConferenceState (OpalConferenceState &state) const
 
Member variable access
const PGloballyUniqueID & GetGUID () const
 
const PStringSet & GetNames () const
 
bool AddName (const PString &name)
 
void RemoveName (const PString &name)
 
PINDEX GetConnectionCount () const
 
template<class Subclass >
PSafePtr< Subclass > GetFirstConnectionAs (PSafetyMode mode=PSafeReference) const
 
PSafePtr< OpalConnectionGetFirstConnection (PSafetyMode mode=PSafeReference) const
 
const OpalMixerNodeInfoGetNodeInfo ()
 
const PTime & GetCreationTime () const
 
void SetOwnerConnection (const PString &connectionIdentifier)
 

Protected Types

typedef std::map
< OpalVideoFormat::ContentRole,
OpalVideoStreamMixer * > 
VideoMixerMap
 
typedef std::map< PString,
OpalBaseMixer * > 
MixerByIdMap
 

Protected Attributes

OpalMixerNodeManagerm_manager
 
PGloballyUniqueID m_guid
 
PStringSet m_names
 
OpalMixerNodeInfom_info
 
PTime m_creationTime
 
atomic< bool > m_shuttingDown
 
PSafeArray< OpalConnectionm_connections
 
PString m_ownerConnection
 
OpalAudioStreamMixerm_audioMixer
 
VideoMixerMap m_videoMixers
 
MixerByIdMap m_mixerById
 

Detailed Description

Mixer node. This class represents a group of connections that are being mixed.

Member Typedef Documentation

typedef std::map<PString, OpalBaseMixer *> OpalMixerNode::MixerByIdMap
protected
typedef std::map<OpalVideoFormat::ContentRole, OpalVideoStreamMixer *> OpalMixerNode::VideoMixerMap
protected

Constructor & Destructor Documentation

OpalMixerNode::OpalMixerNode ( OpalMixerNodeManager manager,
OpalMixerNodeInfo info 
)

Create a new node.

Parameters
managerManager for this node
infoConfiguration information
OpalMixerNode::~OpalMixerNode ( )

Destroy node.

Member Function Documentation

bool OpalMixerNode::AddName ( const PString &  name)

Add a name for this node.

virtual void OpalMixerNode::AttachConnection ( OpalConnection connection)
virtual

Attach a connection.

Parameters
connectionConnection to attach
virtual bool OpalMixerNode::AttachStream ( OpalMixerMediaStream stream)
virtual

Attach a stream for output.

Parameters
streamStream to attach
virtual void OpalMixerNode::BroadcastUserInput ( const OpalConnection connection,
const PString &  value 
)
virtual

Send a user input indication to all connections.

Parameters
connectionConnection NOT to send to
valueString value of indication
virtual void OpalMixerNode::DetachConnection ( OpalConnection connection)
virtual

Detach a connection.

Parameters
connectionConnection to detach
virtual void OpalMixerNode::DetachStream ( OpalMixerMediaStream stream)
virtual

Detach a stream for output.

Parameters
streamStream to detach
virtual void OpalMixerNode::GetConferenceState ( OpalConferenceState state) const
virtual

Get Conference state information. This obtains the state information about a conference this connection is directly a part of. If the connection type does not embody a conference then false is returned.

The state parameter, if non-NULL, is illed with the state of the conference. When NULL, this just indicates that the connection is part of a conference with the return value.

Default behaviour is to return false which indicates this connection is not part of a conference.

Parameters
stateConference state information
PINDEX OpalMixerNode::GetConnectionCount ( ) const
inline

Get count of connections. Note that as this value can change ata any moent, it is really not that useful and should definitely not be used for enumeration of the connections.

References m_connections.

const PTime& OpalMixerNode::GetCreationTime ( ) const
inline

Get the creation time of the node.

References m_creationTime.

PSafePtr<OpalConnection> OpalMixerNode::GetFirstConnection ( PSafetyMode  mode = PSafeReference) const
inline

Get first connection in the connections list.

template<class Subclass >
PSafePtr<Subclass> OpalMixerNode::GetFirstConnectionAs ( PSafetyMode  mode = PSafeReference) const
inline

Get first connection in the connections list as type.

References m_connections.

const PGloballyUniqueID& OpalMixerNode::GetGUID ( ) const
inline

Get globally unique identifier for node.

References m_guid.

const PStringSet& OpalMixerNode::GetNames ( ) const
inline

Get list of names for this node.

References m_names.

const OpalMixerNodeInfo& OpalMixerNode::GetNodeInfo ( )
inline

Get the raw audio accumulation buffer.

References m_info.

void OpalMixerNode::PrintOn ( ostream &  strm) const

Standard stream print function. The PObject class has a << operator defined that invokes this function polymorphically.

Parameters
strmStream to output text representation
void OpalMixerNode::RemoveName ( const PString &  name)

Remove a name for this node.

bool OpalMixerNode::SetJitterBufferSize ( const OpalBaseMixer::Key_T key,
const OpalJitterBuffer::Init init 
)

Sets the size of the jitter buffer to be used by the specified stream in this mixer. A mixer defaults to not having any jitter buffer enabled.

If either jitter delay parameter is zero, it destroys the jitter buffer attached to this mixer.

Parameters
keykey for mixer stream
initInitialisation information
void OpalMixerNode::SetOwnerConnection ( const PString &  connectionIdentifier)
inline

Set the owner connection. If a connection with GetToken(), GetLocalPartyURL() or GetRemotePartyURL() equal to connectionIdentifier disconnects from the node, then the node is shut down and all other participants disconnected.

References m_ownerConnection.

void OpalMixerNode::ShutDown ( )

Shut down node. This clears all attached connections, removes all names and generally shuts the node down.

virtual void OpalMixerNode::UseMediaPassThrough ( unsigned  sessionID,
OpalConnection connection = NULL 
)
virtual

Use media bypass if applicable.

Parameters
sessionIDSession ID to bypass, 0 indicates all
connectionJust deleted connection
bool OpalMixerNode::WritePacket ( const OpalMixerMediaStream stream,
const RTP_DataFrame input 
)

Write data to mixer.

Parameters
streamkey for mixer stream
inputInput RTP data for media

Field Documentation

OpalAudioStreamMixer* OpalMixerNode::m_audioMixer
protected
PSafeArray<OpalConnection> OpalMixerNode::m_connections
protected
PTime OpalMixerNode::m_creationTime
protected

Referenced by GetCreationTime().

PGloballyUniqueID OpalMixerNode::m_guid
protected

Referenced by GetGUID().

OpalMixerNodeInfo* OpalMixerNode::m_info
protected

Referenced by GetNodeInfo().

OpalMixerNodeManager& OpalMixerNode::m_manager
protected
MixerByIdMap OpalMixerNode::m_mixerById
protected
PStringSet OpalMixerNode::m_names
protected

Referenced by GetNames().

PString OpalMixerNode::m_ownerConnection
protected

Referenced by SetOwnerConnection().

atomic<bool> OpalMixerNode::m_shuttingDown
protected
VideoMixerMap OpalMixerNode::m_videoMixers
protected

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