21#define RESIPROCATE_SUBSYSTEM ReconSubsystem::RECON
27#define MAX_PARTICIPANTS 2
36 mKurentoMediaStackAdapter(kurentoMediaStackAdapter),
37 mKurentoReInviteOnParticipantsPresent(true)
59 std::shared_ptr<ConfigParse> cfg =
getConfig();
62 mKurentoReInviteOnParticipantsPresent = cfg->getConfigBool(
"KurentoReInviteOnParticipantsPresent",
63 mKurentoReInviteOnParticipantsPresent);
81 std::shared_ptr<kurento::BaseRtpEndpoint> ep = krp->
getEndpoint();
90 wm->disconnect([
this, ep, wm, c]{
91 ep->disconnect([
this, wm, c]{
105 std::shared_ptr<kurento::BaseRtpEndpoint> answeredEndpoint = _p->
getEndpoint();
108 DebugLog(<<
"we are first in the conversation");
117 DebugLog(<<
"joining a Conversation with an existing Participant");
119 if(!answeredEndpoint)
121 ErrLog(<<
"our endpoint is not initialized");
126 DebugLog(<<
"the local endpoint is not yet in a valid state");
129 DebugLog(<<
"attempting to join two RemoteParticipants");
130 disconnectWaitingMode(_p, [
this, _p, answeredEndpoint]{
135 Conversation::ParticipantMap::iterator _it = m.begin();
136 for(;_it != m.end() && krp == 0; _it++)
145 std::shared_ptr<kurento::BaseRtpEndpoint> otherEndpoint = krp->
getEndpoint();
147 disconnectWaitingMode(krp, [
this, _p, answeredEndpoint, otherEndpoint, krp]{
148 otherEndpoint->connect([
this, _p, answeredEndpoint, otherEndpoint, krp]{
149 answeredEndpoint->connect([
this, _p, answeredEndpoint, otherEndpoint, krp]{
151 if(mKurentoReInviteOnParticipantsPresent)
166 for(
int i = 1000; i <= 5000; i+=1000)
168 std::chrono::milliseconds _i = std::chrono::milliseconds(i);
175 }, *answeredEndpoint);
183 DebugLog(<<
"onParticipantRemoved, checking for remaining participants");
185 std::shared_ptr<kurento::BaseRtpEndpoint> myEndpoint = _p->
getEndpoint();
188 Conversation::ParticipantMap::iterator _it = m.begin();
189 for(;_it != m.end() && krp == 0; _it++)
199 DebugLog(<<
"remaining participant found");
200 std::shared_ptr<kurento::BaseRtpEndpoint> otherEndpoint = krp->
getEndpoint();
201 if(otherEndpoint->valid())
203 otherEndpoint->disconnect([
this, krp, myEndpoint, otherEndpoint](){
204 if(myEndpoint->valid())
206 myEndpoint->disconnect([this, krp](){
#define WarningLog(args_)
#define resip_assert(x)
This file needs to work for both C and C++ code.
This class is one of two main classes of concern to an application using the UserAgent library.
virtual void requestKeyframe(ParticipantHandle partHandle, std::chrono::duration< double > durationMs)
This class is used to manage membership of participants.
ParticipantMap & getParticipants()
unsigned int getNumRemoteParticipants()
std::shared_ptr< resip::ConfigParse > getConfig()
virtual ConversationManager & getConversationManager()
std::shared_ptr< BridgeMixer > getBridgeMixerShared()
ConversationHandle getHandle()
virtual bool isSharingMediaInterfaceWithAnotherConversation()
std::map< ParticipantHandle, ConversationParticipantAssignment > ParticipantMap
KurentoConversation(ConversationHandle handle, ConversationManager &conversationManager, KurentoMediaStackAdapter &kurentoMediaStackAdapter, RelatedConversationSet *relatedConversationSet, ConversationHandle sharedMediaInterfaceConvHandle, ConversationManager::AutoHoldMode autoHoldMode)
virtual void confirmParticipant(Participant *participant)
virtual ~KurentoConversation()
virtual void onParticipantRemoved(Participant *participant)
virtual void onParticipantAdded(Participant *participant)
This class represent a remote participant.
virtual std::shared_ptr< kurento::MediaElement > getWaitingModeElement()
virtual void waitingMode()
virtual std::shared_ptr< kurento::BaseRtpEndpoint > getEndpoint()
This is the base class for a RemoteParticipant, LocalParticipant and a MediaResourceParticipant.
virtual ParticipantHandle getParticipantHandle()
virtual void requestKeyframeFromPeerTimeout(bool reset)
std::function< void(void) > ContinuationVoid
unsigned int ConversationHandle
unsigned int ParticipantHandle
dcm! – add UnusedChecking(_enum) below;