reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
KurentoMediaStackAdapter.hxx
Go to the documentation of this file.
1#if !defined(KurentoMediaStackAdapter_hxx)
2#define KurentoMediaStackAdapter_hxx
3
4#include "BridgeMixer.hxx"
5
6#include <resip/stack/Uri.hxx>
12#include <rutil/Mutex.hxx>
13
16
17#include "MediaStackAdapter.hxx"
18#include "HandleTypes.hxx"
20
21#include <memory>
22
23namespace resip
24{
25class DialogUsageManager;
26}
27
28namespace recon
29{
30class Conversation;
31class Participant;
32class UserAgent;
33class ConversationProfile;
34class KurentoRemoteParticipant;
35class LocalParticipant;
36class MediaResourceParticipant;
37class RemoteParticipant;
38class RemoteParticipantDialogSet;
39class KurentoRemoteParticipantDialogSet;
40
60{
61public:
62
119
120 virtual void onConnected() override;
121
123
124 virtual void shutdown() override;
125
127 // Conversation methods //////////////////////////////////////////////
129
158
160 // Participant methods ///////////////////////////////////////////////
162
170 const std::vector<unsigned int>& codecIds, resip::SdpContents& sessionCaps) override;
171
172
174 // Media Related Methods - this may not be the right spot for these - move to LocalParticipant?
176
177 virtual void setKurentoTOSValue(int tos) { mKurentoTOSValue = tos; }
178
180 RelatedConversationSet* relatedConversationSet, // Pass NULL to create new RelatedConversationSet
189 std::shared_ptr<ConversationProfile> conversationProfile = nullptr) override;
190
191 virtual bool supportsMultipleMediaInterfaces() override;
193 virtual bool supportsLocalAudio() override { return false; }
194
195protected:
196 virtual void setUserAgent(UserAgent *userAgent) override;
198
199private:
200 void init(int defaultSampleRate = 0, int maxSampleRate = 0);
201
202 friend class DefaultDialogSet;
203 friend class Subscription;
204
206
207 // Note: In general the following fns are not thread safe and must be called from dum process
208 // loop only
209 friend class Conversation;
212
213 friend class Participant;
214 friend class KurentoParticipant;
215
216 friend class RemoteParticipant;
218 friend class UserAgent;
219
220 friend class DtmfEvent;
221 friend class MediaEvent;
222
226 friend class LocalParticipant;
227 friend class BridgeMixer;
229
230 virtual void process() override;
231
232 virtual void initializeDtlsFactory(const resip::Data& defaultAoR) override;
233
234 friend class OutputBridgeMixWeightsCmd;
235 void outputBridgeMatrixImpl(ConversationHandle convHandle = 0) override;
236
245 friend class AddParticipantCmd;
247 friend class MoveParticipantCmd;
254 friend class HoldParticipantCmd;
255
256 // Kurento Media related members
257 resip::Data mKurentoUri;
258 kurento::KurentoManager mKurentoManager;
259 kurento::KurentoConnection::ptr mKurentoConnection; // FIXME - make sure it is valid whenever it is used
260 std::shared_ptr<kurento::MediaPipeline> mPipeline;
261 int mKurentoTOSValue; // FIXME Kurento - need to pass to Kurento, maybe move to superclass too
262};
263
264}
265
266#endif
267
268
269/* ====================================================================
270
271 Copyright (c) 2021-2022, SIP Spectrum, Inc. www.sipspectrum.com
272 Copyright (c) 2021, Daniel Pocock https://danielpocock.com
273 Copyright (c) 2007-2008, Plantronics, Inc.
274 All rights reserved.
275
276 Redistribution and use in source and binary forms, with or without
277 modification, are permitted provided that the following conditions are
278 met:
279
280 1. Redistributions of source code must retain the above copyright
281 notice, this list of conditions and the following disclaimer.
282
283 2. Redistributions in binary form must reproduce the above copyright
284 notice, this list of conditions and the following disclaimer in the
285 documentation and/or other materials provided with the distribution.
286
287 3. Neither the name of Plantronics nor the names of its contributors
288 may be used to endorse or promote products derived from this
289 software without specific prior written permission.
290
291 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
292 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
293 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
294 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
295 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
296 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
297 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
298 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
299 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
300 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
301 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
302
303 ==================================================================== */
std::shared_ptr< KurentoConnection > ptr
This class is used to control the sipX Bridge Mixer mix matrix.
This class is one of two main classes of concern to an application using the UserAgent library.
This class is used to manage membership of participants.
The classes defined here are used to pass commands from the application thread to the UserAgent threa...
This class is used by non-Invite DialogSets.
This class represents the data passed in a DTMF event.
Definition DtmfEvent.hxx:18
This class is used to manage membership of participants.
This class is one of two main classes of concern to an application using the UserAgent library.
virtual void configureRemoteParticipantInstance(KurentoRemoteParticipant *krp)
virtual MediaResourceParticipant * createMediaResourceParticipantInstance(ParticipantHandle partHandle, const resip::Uri &mediaUrl, const std::shared_ptr< resip::Data > &audioBuffer, void *recordingCircularBuffer) override
virtual bool supportsMultipleMediaInterfaces() override
virtual void conversationManagerReady(ConversationManager *conversationManager) override
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 LocalParticipant * createLocalParticipantInstance(ParticipantHandle partHandle) override
virtual RemoteParticipantDialogSet * createRemoteParticipantDialogSetInstance(ConversationManager::ParticipantForkSelectMode forkSelectMode=ConversationManager::ForkSelectAutomatic, std::shared_ptr< ConversationProfile > conversationProfile=nullptr) override
virtual bool canConversationsShareParticipants(Conversation *conversation1, Conversation *conversation2) override
virtual ConversationHandle createSharedMediaInterfaceConversation(ConversationHandle sharedMediaInterfaceConvHandle, ConversationManager::AutoHoldMode autoHoldMode=ConversationManager::AutoHoldEnabled)
Only applicable if KurentoConversationMediaInterfaceMode is used.
virtual Conversation * createConversationInstance(ConversationHandle handle, RelatedConversationSet *relatedConversationSet, ConversationHandle sharedMediaInterfaceConvHandle, ConversationManager::AutoHoldMode autoHoldMode) override
virtual void setUserAgent(UserAgent *userAgent) override
virtual RemoteParticipant * createRemoteParticipantInstance(resip::DialogUsageManager &dum, RemoteParticipantDialogSet &rpds) override
This is the base class for a KurentoRemoteParticipant, KurentoLocalParticipant and a KurentoMediaReso...
This class represent a remote participant.
This class represents a local participant.
This class represents an event that happens to a media participant.
This class represents a media resource participant.
This class is one of two main classes of concern to an application.
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 by Invite DialogSets.
This class represent a remote participant.
The classes defined here are used to pass commands from the application thread to the UserAgent threa...
This class is one of two main classes of concern to an application using the UserAgent library.
Definition UserAgent.hxx:56
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
Provides an interface to process and generate SDP bodies (MIME content-type application/sdp).
Represents the "SIP-URI" and "SIPS-URI" elements in the RFC 3261 grammar.
Definition Uri.hxx:22
unsigned int ConversationHandle
unsigned int ParticipantHandle
dcm! – add UnusedChecking(_enum) below;
void list()
Definition userAdmin.cxx:66