reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
LibWebRTCMediaStackAdapter.hxx
Go to the documentation of this file.
1#if !defined(LibWebRTCMediaStackAdapter_hxx)
2#define LibWebRTCMediaStackAdapter_hxx
3
4#include <boost/function.hpp>
5
6#include "BridgeMixer.hxx"
7
8#include <resip/stack/Uri.hxx>
14#include <rutil/Mutex.hxx>
15
16#include "MediaStackAdapter.hxx"
17#include "HandleTypes.hxx"
19
20#include <memory>
21
22namespace resip
23{
24class DialogUsageManager;
25}
26
27namespace recon
28{
29class Conversation;
30class Participant;
31class UserAgent;
32class ConversationProfile;
33class LibWebRTCRemoteParticipant;
34class LocalParticipant;
35class MediaResourceParticipant;
36class RemoteParticipant;
37class RemoteParticipantDialogSet;
38class LibWebRTCRemoteParticipantDialogSet;
39
59{
60public:
61
118
119 virtual void onConnected() override;
120
122
123 virtual void shutdown() override;
124
126 // Conversation methods //////////////////////////////////////////////
128
157
159 // Participant methods ///////////////////////////////////////////////
161
169 const std::vector<unsigned int>& codecIds, resip::SdpContents& sessionCaps) override;
170
171
173 // Media Related Methods - this may not be the right spot for these - move to LocalParticipant?
175
176 virtual void setLibWebRTCTOSValue(int tos) { mLibWebRTCTOSValue = tos; }
177
179 RelatedConversationSet* relatedConversationSet, // Pass NULL to create new RelatedConversationSet
188 std::shared_ptr<ConversationProfile> conversationProfile = nullptr) override;
189
190 virtual bool supportsMultipleMediaInterfaces() override;
192 virtual bool supportsLocalAudio() override { return false; }
193
194protected:
195 virtual void setUserAgent(UserAgent *userAgent) override;
197
198private:
199 void init(int defaultSampleRate = 0, int maxSampleRate = 0);
200
201 friend class DefaultDialogSet;
202 friend class Subscription;
203
205
206 // Note: In general the following fns are not thread safe and must be called from dum process
207 // loop only
208 friend class Conversation;
211
212 friend class Participant;
214
215 friend class RemoteParticipant;
217 friend class UserAgent;
218
219 friend class DtmfEvent;
220 friend class MediaEvent;
221
225 friend class LocalParticipant;
226 friend class BridgeMixer;
228
229 virtual void process() override;
230
231 virtual void initializeDtlsFactory(const resip::Data& defaultAoR) override;
232
233 friend class OutputBridgeMixWeightsCmd;
234 void outputBridgeMatrixImpl(ConversationHandle convHandle = 0) override;
235
244 friend class AddParticipantCmd;
246 friend class MoveParticipantCmd;
253 friend class HoldParticipantCmd;
254
255 // LibWebRTC Media related members
256 std::shared_ptr<libwebrtc::MediaPipeline> mPipeline;
257 int mLibWebRTCTOSValue; // FIXME LibWebRTC - need to pass to LibWebRTC, maybe move to superclass too
258};
259
260}
261
262#endif
263
264
265/* ====================================================================
266
267 Copyright (c) 2022, Software Freedom Institute https://softwarefreedom.institute
268 Copyright (c) 2022, Daniel Pocock https://danielpocock.com
269 Copyright (c) 2021-2022, SIP Spectrum, Inc. www.sipspectrum.com
270 Copyright (c) 2007-2008, Plantronics, Inc.
271 All rights reserved.
272
273 Redistribution and use in source and binary forms, with or without
274 modification, are permitted provided that the following conditions are
275 met:
276
277 1. Redistributions of source code must retain the above copyright
278 notice, this list of conditions and the following disclaimer.
279
280 2. Redistributions in binary form must reproduce the above copyright
281 notice, this list of conditions and the following disclaimer in the
282 documentation and/or other materials provided with the distribution.
283
284 3. Neither the name of Plantronics nor the names of its contributors
285 may be used to endorse or promote products derived from this
286 software without specific prior written permission.
287
288 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
289 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
290 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
291 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
292 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
293 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
294 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
295 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
296 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
297 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
298 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
299
300 ==================================================================== */
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 bool canConversationsShareParticipants(Conversation *conversation1, Conversation *conversation2) override
virtual MediaResourceParticipant * createMediaResourceParticipantInstance(ParticipantHandle partHandle, const resip::Uri &mediaUrl, const std::shared_ptr< resip::Data > &audioBuffer, void *recordingCircularBuffer) override
virtual Conversation * createConversationInstance(ConversationHandle handle, RelatedConversationSet *relatedConversationSet, ConversationHandle sharedMediaInterfaceConvHandle, ConversationManager::AutoHoldMode autoHoldMode) override
virtual RemoteParticipant * createRemoteParticipantInstance(resip::DialogUsageManager &dum, RemoteParticipantDialogSet &rpds) override
virtual ConversationHandle createSharedMediaInterfaceConversation(ConversationHandle sharedMediaInterfaceConvHandle, ConversationManager::AutoHoldMode autoHoldMode=ConversationManager::AutoHoldEnabled)
Only applicable if LibWebRTCConversationMediaInterfaceMode is used.
virtual void configureRemoteParticipantInstance(LibWebRTCRemoteParticipant *krp)
virtual RemoteParticipantDialogSet * createRemoteParticipantDialogSetInstance(ConversationManager::ParticipantForkSelectMode forkSelectMode=ConversationManager::ForkSelectAutomatic, std::shared_ptr< ConversationProfile > conversationProfile=nullptr) override
virtual void setUserAgent(UserAgent *userAgent) 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 void conversationManagerReady(ConversationManager *conversationManager) override
This is the base class for a LibWebRTCRemoteParticipant, LibWebRTCLocalParticipant and a LibWebRTCMed...
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