reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
SipXConversation.cxx
Go to the documentation of this file.
2#include "Participant.hxx"
6#include "UserAgent.hxx"
8#include "ReconSubsystem.hxx"
9
10#include <rutil/Log.hxx>
11#include <rutil/Logger.hxx>
13
14using namespace recon;
15using namespace resip;
16
17#define RESIPROCATE_SUBSYSTEM ReconSubsystem::RECON
18
20 ConversationManager& conversationManager,
21 SipXMediaStackAdapter& sipXMediaStackAdapter,
22 RelatedConversationSet* relatedConversationSet,
23 ConversationHandle sharedMediaInterfaceConvHandle,
25: Conversation(handle, conversationManager, relatedConversationSet, sharedMediaInterfaceConvHandle, autoHoldMode),
26 mSipXMediaStackAdapter(sipXMediaStackAdapter)
27{
28 if(mSipXMediaStackAdapter.supportsMultipleMediaInterfaces())
29 {
31 {
32 SipXConversation* sharedFlowConversation = dynamic_cast<SipXConversation*>(conversationManager.getConversation(sharedMediaInterfaceConvHandle));
33 mMediaInterface = sharedFlowConversation->getMediaInterface();
34 }
35 else
36 {
37 std::shared_ptr<BridgeMixer> mixer;
38 mSipXMediaStackAdapter.createMediaInterfaceAndMixer(false /* giveFocus?*/, // Focus will be given when local participant is added
39 mMediaInterface,
40 mixer);
41 setBridgeMixer(mixer);
42 }
43 }
44 InfoLog(<< "mBridgeMixer " << getBridgeMixerShared().use_count() << " " << getBridgeMixer());
45}
46
48{
49 getBridgeMixerShared().reset(); // Make sure the mixer is destroyed before the media interface
50 mMediaInterface.reset();
51}
52
53void
57
58void
62
63/* ====================================================================
64
65 Copyright (c) 2021, SIP Spectrum, Inc. www.sipspectrum.com
66 Copyright (c) 2021, Daniel Pocock https://danielpocock.com
67 Copyright (c) 2007-2008, Plantronics, Inc.
68 All rights reserved.
69
70 Redistribution and use in source and binary forms, with or without
71 modification, are permitted provided that the following conditions are
72 met:
73
74 1. Redistributions of source code must retain the above copyright
75 notice, this list of conditions and the following disclaimer.
76
77 2. Redistributions in binary form must reproduce the above copyright
78 notice, this list of conditions and the following disclaimer in the
79 documentation and/or other materials provided with the distribution.
80
81 3. Neither the name of Plantronics nor the names of its contributors
82 may be used to endorse or promote products derived from this
83 software without specific prior written permission.
84
85 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
86 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
87 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
88 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
89 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
90 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
91 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
92 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
93 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
94 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
95 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
96
97 ==================================================================== */
#define InfoLog(args_)
Definition Logger.hxx:131
This class is one of two main classes of concern to an application using the UserAgent library.
Conversation * getConversation(ConversationHandle convHandle)
This class is used to manage membership of participants.
BridgeMixer * getBridgeMixer() noexcept
virtual void setBridgeMixer(std::shared_ptr< BridgeMixer > mixer)
std::shared_ptr< BridgeMixer > getBridgeMixerShared()
virtual bool isSharingMediaInterfaceWithAnotherConversation()
This is the base class for a RemoteParticipant, LocalParticipant and a MediaResourceParticipant.
This is used to keep a mapping between all related conversations.
This class is used to manage membership of participants.
virtual void onParticipantRemoved(Participant *participant)
std::shared_ptr< SipXMediaInterface > getMediaInterface() const
SipXConversation(ConversationHandle handle, ConversationManager &conversationManager, SipXMediaStackAdapter &sipXMediaStackAdapter, RelatedConversationSet *relatedConversationSet, ConversationHandle sharedMediaInterfaceConvHandle, ConversationManager::AutoHoldMode autoHoldMode)
virtual void onParticipantAdded(Participant *participant)
This class is one of two main classes of concern to an application using the UserAgent library.
virtual bool supportsMultipleMediaInterfaces() override
unsigned int ConversationHandle
dcm! – add UnusedChecking(_enum) below;