reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
recon::KurentoMediaStackAdapter Class Reference

This class is one of two main classes of concern to an application using the UserAgent library. More...

#include <KurentoMediaStackAdapter.hxx>

Inheritance diagram for recon::KurentoMediaStackAdapter:
[legend]

Public Member Functions

 KurentoMediaStackAdapter (ConversationManager &conversationManager, const resip::Data &kurentoUri)
 Note: Kurentotapi Media Interfaces have a finite number of supported endpoints that are allowed in each bridge mixer - by default this value is 10 (1 used for local mic / speaker, 1 for a WAV Player/Recorder and 1 for a Tone Player, leaving 7 remaining for RemoteParticipants - 8 if local audio
is disabled).
 
 KurentoMediaStackAdapter (ConversationManager &conversationManager, const resip::Data &kurentoUri, int defaultSampleRate, int maxSampleRate)
 
virtual ~KurentoMediaStackAdapter ()
 
virtual void onConnected () override
 
virtual void conversationManagerReady (ConversationManager *conversationManager) override
 
virtual void shutdown () override
 
virtual ConversationHandle createSharedMediaInterfaceConversation (ConversationHandle sharedMediaInterfaceConvHandle, ConversationManager::AutoHoldMode autoHoldMode=ConversationManager::AutoHoldEnabled)
 Only applicable if KurentoConversationMediaInterfaceMode is used.
 
virtual void buildSessionCapabilities (const resip::Data &ipaddress, const std::vector< unsigned int > &codecIds, resip::SdpContents &sessionCaps) override
 Builds a session capabilties SDPContents based on the passed in ipaddress and codec ordering.
 
virtual void setKurentoTOSValue (int tos)
 
virtual Conversation * createConversationInstance (ConversationHandle handle, RelatedConversationSet *relatedConversationSet, ConversationHandle sharedMediaInterfaceConvHandle, ConversationManager::AutoHoldMode autoHoldMode) override
 
virtual LocalParticipant * createLocalParticipantInstance (ParticipantHandle partHandle) override
 
virtual MediaResourceParticipant * createMediaResourceParticipantInstance (ParticipantHandle partHandle, const resip::Uri &mediaUrl, const std::shared_ptr< resip::Data > &audioBuffer, void *recordingCircularBuffer) override
 
virtual RemoteParticipant * createRemoteParticipantInstance (resip::DialogUsageManager &dum, RemoteParticipantDialogSet &rpds) override
 
virtual RemoteParticipant * createRemoteParticipantInstance (ParticipantHandle partHandle, resip::DialogUsageManager &dum, RemoteParticipantDialogSet &rpds) override
 
virtual RemoteParticipantDialogSet * createRemoteParticipantDialogSetInstance (ConversationManager::ParticipantForkSelectMode forkSelectMode=ConversationManager::ForkSelectAutomatic, std::shared_ptr< ConversationProfile > conversationProfile=nullptr) override
 
virtual bool supportsMultipleMediaInterfaces () override
 
virtual bool canConversationsShareParticipants (Conversation *conversation1, Conversation *conversation2) override
 
virtual bool supportsLocalAudio () override
 
- Public Member Functions inherited from recon::MediaStackAdapter
 MediaStackAdapter (ConversationManager &conversationManager)
 
virtual ~MediaStackAdapter ()
 
virtual void setRTCPEventLoggingHandler (std::shared_ptr< flowmanager::RTCPEventLoggingHandler > h)
 
virtual std::shared_ptr< flowmanager::RTCPEventLoggingHandler > getRTCPEventLoggingHandler () const
 
- Public Member Functions inherited from kurento::KurentoConnectionObserver
virtual ~KurentoConnectionObserver ()
 

Protected Member Functions

virtual void setUserAgent (UserAgent *userAgent) override
 
virtual void configureRemoteParticipantInstance (KurentoRemoteParticipant *krp)
 
- Protected Member Functions inherited from recon::MediaStackAdapter
virtual UserAgent * getUserAgent ()
 
ConversationManager & getConversationManager ()
 
std::shared_ptr< BridgeMixer > & getBridgeMixer ()
 
bool isShuttingDown ()
 
ConversationHandle getNewConversationHandle ()
 
void post (resip::Message *message)
 
Conversation * getConversation (ConversationHandle convHandle)
 
std::shared_ptr< resip::ConfigParse > getConfig ()
 

Friends

class DefaultDialogSet
 
class Subscription
 
class UserAgentShutdownCmd
 
class Conversation
 
class KurentoConversation
 
class OutputBridgeMixWeightsCmd
 
class Participant
 
class KurentoParticipant
 
class RemoteParticipant
 
class KurentoRemoteParticipant
 
class UserAgent
 
class DtmfEvent
 
class MediaEvent
 
class RemoteParticipantDialogSet
 
class KurentoRemoteParticipantDialogSet
 
class MediaResourceParticipant
 
class LocalParticipant
 
class BridgeMixer
 
class KurentoMediaInterface
 
class MediaResourceParticipantDeleterCmd
 
class CreateConversationCmd
 
class DestroyConversationCmd
 
class JoinConversationCmd
 
class CreateRemoteParticipantCmd
 
class CreateMediaResourceParticipantCmd
 
class CreateLocalParticipantCmd
 
class DestroyParticipantCmd
 
class AddParticipantCmd
 
class RemoveParticipantCmd
 
class MoveParticipantCmd
 
class ModifyParticipantContributionCmd
 
class AlertParticipantCmd
 
class AnswerParticipantCmd
 
class RejectParticipantCmd
 
class RedirectParticipantCmd
 
class RedirectToParticipantCmd
 
class HoldParticipantCmd
 

Detailed Description

This class is one of two main classes of concern to an application using the UserAgent library.

This class should be subclassed by the application and the ConversationManager handlers should be implemented by it.

This class is responsible for handling tasks that are directly related to managing Conversations. All non-conversation handling is done via the UserAgent class.

This class handles tasks such as: -Creation and destruction of Conversations -Participant management and creation -Placing and receiving calls -Playing audio and/or tones into a conversation -Managing local audio properties

Definition at line 59 of file KurentoMediaStackAdapter.hxx.

Constructor & Destructor Documentation

◆ KurentoMediaStackAdapter() [1/2]

KurentoMediaStackAdapter::KurentoMediaStackAdapter ( ConversationManager &  conversationManager,
const resip::Data &  kurentoUri 
)

Note: Kurentotapi Media Interfaces have a finite number of supported endpoints that are allowed in each bridge mixer - by default this value is 10 (1 used for local mic / speaker, 1 for a WAV Player/Recorder and 1 for a Tone Player, leaving 7 remaining for RemoteParticipants - 8 if local audio
is disabled).

Also, if enableExtraPlayAndRecordResources is passed in as true then an extra slot if taken for an additional player and recorder.

The limit of 10 is controlled by the preprocessor define DEFAULT_BRIDGE_MAX_IN_OUTPUTS (see http://www.resiprocate.org/Limitations_with_Kurentotapi_media_Integration for more details.

KurentoGlobalMediaInterfaceMode - uses 1 global Kurentotapi media interface and allows for participants to exist in multiple conversations at the same time and have the bridge mixer properly control their mixing. In this mode, there can only be a single MediaParticipant at a time performing each operation (ie. 1 playing a WAV, 1 recording and one playing a tone is allowed, but only 1 of each type) for all conversations. If enableExtraPlayAndRecordResources is enabled then you are allowed to have 2 players and 2 recorders. This architecture/mode is appropriate for single user agent devices (ie. sip phones).

KurentoConversationMediaInterfaceMode - by default uses 1 Kurentotapi media interface per conversation. If you use createSharedMediaInterfaceConversation instead of createConversation then you can specify that 2 (multiple) conversations can share the same media interface. This allows participants to be moved between any conversations that share the same media interface. Using this mode, participants can only exist in multiple conversations at the same time if those conversations share the same media interface. This means the limit of remote participants is no longer global, it now applies to each media interface. The limit on media participants is per media interface. This architecture/mode is appropriate for server applications, such as multi-party conference servers (up to 8 participants per conference), music on hold servers and call park servers. API restrictions in this mode: -joinConversation -restricted to functioning only if both source and destination conversations share the same media inteface -addParticipant -can only add a participant to multiple conversations if the conversations share the same media interface -moveParticipant -can only move a participant to another conversation if both source and destination conversations share the same media inteface -alertParticipant -if you are using the EarlyFlag then the RemoteParticipant must be added to a conversation before calling this -answerParticipant -RemoteParticipant must be added to a conversation before calling this Note: Only LocalParticipants can only exist outside of a conversation. If they exist in multiple conversations then those conversations must have the same media interface.

Definition at line 42 of file KurentoMediaStackAdapter.cxx.

◆ KurentoMediaStackAdapter() [2/2]

KurentoMediaStackAdapter::KurentoMediaStackAdapter ( ConversationManager &  conversationManager,
const resip::Data &  kurentoUri,
int  defaultSampleRate,
int  maxSampleRate 
)

Definition at line 51 of file KurentoMediaStackAdapter.cxx.

◆ ~KurentoMediaStackAdapter()

KurentoMediaStackAdapter::~KurentoMediaStackAdapter ( )
virtual

Definition at line 102 of file KurentoMediaStackAdapter.cxx.

Member Function Documentation

◆ buildSessionCapabilities()

void KurentoMediaStackAdapter::buildSessionCapabilities ( const resip::Data &  ipaddress,
const std::vector< unsigned int > &  codecIds,
resip::SdpContents &  sessionCaps 
)
overridevirtual

Builds a session capabilties SDPContents based on the passed in ipaddress and codec ordering.

Note: Codec ordering is an array of sipX internal codecId's. Id's for codecs not loaded are ignored.

Implements recon::MediaStackAdapter.

Definition at line 174 of file KurentoMediaStackAdapter.cxx.

◆ canConversationsShareParticipants()

bool KurentoMediaStackAdapter::canConversationsShareParticipants ( Conversation *  conversation1,
Conversation *  conversation2 
)
overridevirtual

Implements recon::MediaStackAdapter.

Definition at line 216 of file KurentoMediaStackAdapter.cxx.

◆ configureRemoteParticipantInstance()

void KurentoMediaStackAdapter::configureRemoteParticipantInstance ( KurentoRemoteParticipant *  krp)
protectedvirtual

Definition at line 243 of file KurentoMediaStackAdapter.cxx.

◆ conversationManagerReady()

void KurentoMediaStackAdapter::conversationManagerReady ( ConversationManager *  conversationManager)
overridevirtual

Implements recon::MediaStackAdapter.

Definition at line 109 of file KurentoMediaStackAdapter.cxx.

◆ createConversationInstance()

Conversation * KurentoMediaStackAdapter::createConversationInstance ( ConversationHandle  handle,
RelatedConversationSet *  relatedConversationSet,
ConversationHandle  sharedMediaInterfaceConvHandle,
ConversationManager::AutoHoldMode  autoHoldMode 
)
overridevirtual

Implements recon::MediaStackAdapter.

Definition at line 222 of file KurentoMediaStackAdapter.cxx.

◆ createLocalParticipantInstance()

LocalParticipant * KurentoMediaStackAdapter::createLocalParticipantInstance ( ParticipantHandle  partHandle)
overridevirtual

Implements recon::MediaStackAdapter.

Definition at line 231 of file KurentoMediaStackAdapter.cxx.

◆ createMediaResourceParticipantInstance()

MediaResourceParticipant * KurentoMediaStackAdapter::createMediaResourceParticipantInstance ( ParticipantHandle  partHandle,
const resip::Uri &  mediaUrl,
const std::shared_ptr< resip::Data > &  audioBuffer,
void *  recordingCircularBuffer 
)
overridevirtual

Implements recon::MediaStackAdapter.

Definition at line 237 of file KurentoMediaStackAdapter.cxx.

◆ createRemoteParticipantDialogSetInstance()

RemoteParticipantDialogSet * KurentoMediaStackAdapter::createRemoteParticipantDialogSetInstance ( ConversationManager::ParticipantForkSelectMode  forkSelectMode = ConversationManager::ForkSelectAutomatic,
std::shared_ptr< ConversationProfile >  conversationProfile = nullptr 
)
overridevirtual

Implements recon::MediaStackAdapter.

Definition at line 272 of file KurentoMediaStackAdapter.cxx.

◆ createRemoteParticipantInstance() [1/2]

RemoteParticipant * KurentoMediaStackAdapter::createRemoteParticipantInstance ( ParticipantHandle  partHandle,
resip::DialogUsageManager &  dum,
RemoteParticipantDialogSet &  rpds 
)
overridevirtual

Implements recon::MediaStackAdapter.

Definition at line 264 of file KurentoMediaStackAdapter.cxx.

◆ createRemoteParticipantInstance() [2/2]

RemoteParticipant * KurentoMediaStackAdapter::createRemoteParticipantInstance ( resip::DialogUsageManager &  dum,
RemoteParticipantDialogSet &  rpds 
)
overridevirtual

Implements recon::MediaStackAdapter.

Definition at line 256 of file KurentoMediaStackAdapter.cxx.

◆ createSharedMediaInterfaceConversation()

ConversationHandle KurentoMediaStackAdapter::createSharedMediaInterfaceConversation ( ConversationHandle  sharedMediaInterfaceConvHandle,
ConversationManager::AutoHoldMode  autoHoldMode = ConversationManager::AutoHoldEnabled 
)
virtual

Only applicable if KurentoConversationMediaInterfaceMode is used.

Create a new empty Conversation to which participants can be added. This new conversation will share the media interface from the passed in conversation handle. This allows participants to be moved between these two conversations, or any conversations that share the same media interface. This method will fail (return 0) if this ConversationManager is in KurentoGlobalMediaInterfaceMode.

Parameters
autoHoldMode- enum specifying one of the following: AutoHoldDisabled - Never auto hold, only hold if holdParticipant API is used AutoHoldEnabled - Default. Automatically put a RemoteParticipant on-hold if there are no other participants in the conversation with them. AutoHoldBroadcastOnly - Use this if you are broadcasting media to all participants and don't need to receive any inbound media. All participants in the conversation will be SIP held and will receive media from an added MediaParticipant. Remote offers with inactive will be responded with sendonly as well. This option is useful for implementing music on hold servers.
Returns
A handle to the newly created conversation.

Definition at line 126 of file KurentoMediaStackAdapter.cxx.

◆ onConnected()

void KurentoMediaStackAdapter::onConnected ( )
overridevirtual

Implements kurento::KurentoConnectionObserver.

Definition at line 70 of file KurentoMediaStackAdapter.cxx.

◆ setKurentoTOSValue()

virtual void recon::KurentoMediaStackAdapter::setKurentoTOSValue ( int  tos)
inlinevirtual

Definition at line 177 of file KurentoMediaStackAdapter.hxx.

◆ setUserAgent()

void KurentoMediaStackAdapter::setUserAgent ( UserAgent *  userAgent)
overrideprotectedvirtual

Implements recon::MediaStackAdapter.

Definition at line 114 of file KurentoMediaStackAdapter.cxx.

◆ shutdown()

void KurentoMediaStackAdapter::shutdown ( )
overridevirtual

Implements recon::MediaStackAdapter.

Definition at line 85 of file KurentoMediaStackAdapter.cxx.

◆ supportsLocalAudio()

virtual bool recon::KurentoMediaStackAdapter::supportsLocalAudio ( )
inlineoverridevirtual

Implements recon::MediaStackAdapter.

Definition at line 193 of file KurentoMediaStackAdapter.hxx.

◆ supportsMultipleMediaInterfaces()

bool KurentoMediaStackAdapter::supportsMultipleMediaInterfaces ( )
overridevirtual

Implements recon::MediaStackAdapter.

Definition at line 210 of file KurentoMediaStackAdapter.cxx.

Friends And Related Symbol Documentation

◆ AddParticipantCmd

Definition at line 245 of file KurentoMediaStackAdapter.hxx.

◆ AlertParticipantCmd

Definition at line 249 of file KurentoMediaStackAdapter.hxx.

◆ AnswerParticipantCmd

◆ BridgeMixer

Definition at line 227 of file KurentoMediaStackAdapter.hxx.

◆ Conversation

Definition at line 209 of file KurentoMediaStackAdapter.hxx.

◆ CreateConversationCmd

◆ CreateLocalParticipantCmd

◆ CreateMediaResourceParticipantCmd

◆ CreateRemoteParticipantCmd

◆ DefaultDialogSet

Definition at line 202 of file KurentoMediaStackAdapter.hxx.

◆ DestroyConversationCmd

◆ DestroyParticipantCmd

◆ DtmfEvent

Definition at line 220 of file KurentoMediaStackAdapter.hxx.

◆ HoldParticipantCmd

Definition at line 254 of file KurentoMediaStackAdapter.hxx.

◆ JoinConversationCmd

Definition at line 240 of file KurentoMediaStackAdapter.hxx.

◆ KurentoConversation

Definition at line 210 of file KurentoMediaStackAdapter.hxx.

◆ KurentoMediaInterface

friend class KurentoMediaInterface
friend

Definition at line 228 of file KurentoMediaStackAdapter.hxx.

◆ KurentoParticipant

Definition at line 214 of file KurentoMediaStackAdapter.hxx.

◆ KurentoRemoteParticipant

◆ KurentoRemoteParticipantDialogSet

◆ LocalParticipant

Definition at line 226 of file KurentoMediaStackAdapter.hxx.

◆ MediaEvent

Definition at line 221 of file KurentoMediaStackAdapter.hxx.

◆ MediaResourceParticipant

◆ MediaResourceParticipantDeleterCmd

◆ ModifyParticipantContributionCmd

◆ MoveParticipantCmd

Definition at line 247 of file KurentoMediaStackAdapter.hxx.

◆ OutputBridgeMixWeightsCmd

Definition at line 211 of file KurentoMediaStackAdapter.hxx.

◆ Participant

Definition at line 213 of file KurentoMediaStackAdapter.hxx.

◆ RedirectParticipantCmd

◆ RedirectToParticipantCmd

◆ RejectParticipantCmd

◆ RemoteParticipant

Definition at line 216 of file KurentoMediaStackAdapter.hxx.

◆ RemoteParticipantDialogSet

◆ RemoveParticipantCmd

◆ Subscription

friend class Subscription
friend

Definition at line 203 of file KurentoMediaStackAdapter.hxx.

◆ UserAgent

Definition at line 218 of file KurentoMediaStackAdapter.hxx.

◆ UserAgentShutdownCmd


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