reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
LibWebRTCRemoteParticipant.hxx
Go to the documentation of this file.
1#if !defined(LibWebRTCRemoteParticipant_hxx)
2#define LibWebRTCRemoteParticipant_hxx
3
4#include <map>
5
7#include "Participant.hxx"
12
18
19#include <memory>
20
21namespace resip
22{
23class DialogUsageManager;
24class SipMessage;
25}
26
27// Disable warning 4250
28// VS2019 give a 4250 warning:
29// LibWebRTCRemoteParticipant.hxx(80,1): warning C4250: 'recon::LibWebRTCRemoteParticipant': inherits 'recon::RemoteParticipant::recon::RemoteParticipant::addToConversation' via dominance
30#if defined(WIN32) && !defined(__GNUC__)
31#pragma warning( disable : 4250 )
32#endif
33
34namespace recon
35{
36class LibWebRTCMediaStackAdapter;
37
45{
46public:
52
57
59
60 virtual void buildSdpOffer(bool holdSdp, CallbackSdpReady sdpReady, bool preferExistingSdp = false);
61
62 virtual int getConnectionPortOnBridge();
63 virtual bool hasInput() { return true; }
64 virtual bool hasOutput() { return true; }
65 virtual int getMediaConnectionId();
66
67 virtual void applyBridgeMixWeights() override;
69
70 virtual void adjustRTPStreams(bool sendingOffer=false);
71
72 void onIceGatheringDone() { mIceGatheringDone = true; };
73
74 virtual void addToConversation(Conversation *conversation, unsigned int inputGain = 100, unsigned int outputGain = 100) override;
75 virtual void removeFromConversation(Conversation *conversation) override;
76
77 virtual std::shared_ptr<libwebrtc::BaseRtpEndpoint> getEndpoint() { return mEndpoint; }; // FIXME LibWebRTC
78 std::shared_ptr<libwebrtc::MediaElement> mMultiqueue; // FIXME LibWebRTC
79 bool mWaitingModeVideo = false;
80 std::shared_ptr<libwebrtc::PlayerEndpoint> mPlayer; // FIXME LibWebRTC
81 std::shared_ptr<libwebrtc::PassThroughElement> mPassThrough; // FIXME LibWebRTC
82
83 virtual void waitingMode();
84 virtual std::shared_ptr<libwebrtc::MediaElement> getWaitingModeElement();
85
88
89 virtual void requestKeyframe() override;
90
91protected:
92 virtual bool mediaStackPortAvailable();
93
95
96 virtual bool holdPreferExistingSdp() override { return true; };
97
98private:
99 libwebrtc::BaseRtpEndpoint* newEndpoint();
100 virtual bool initEndpointIfRequired(bool isWebRTC);
101 virtual void doIceGathering(libwebrtc::ContinuationString sdpReady);
102 virtual void createAndConnectElements(libwebrtc::ContinuationVoid cConnected);
103 virtual void buildSdpAnswer(const resip::SdpContents& offer, CallbackSdpReady sdpReady) override;
104
105 std::shared_ptr<libwebrtc::BaseRtpEndpoint> mEndpoint;
106 volatile bool mIceGatheringDone; // FIXME LibWebRTC use a concurrency primitive, e.g. condition_variable
107
108 std::chrono::time_point<std::chrono::steady_clock> mLastLocalKeyframeRequest = std::chrono::steady_clock::now();
109
110public: // FIXME
116 bool mWaitingAnswer; // have sent an offer, waiting for peer to send answer
117 bool mTrickleIcePermitted = false; // FIXME - complete
118 bool mWebRTCOutgoing = false; // FIXME - use WebRTC for outgoing call
119};
120
121}
122
123#endif
124
125
126/* ====================================================================
127
128 Copyright (c) 2022, Software Freedom Institute https://softwarefreedom.institute
129 Copyright (c) 2022, Daniel Pocock https://danielpocock.com
130 Copyright (c) 2021, SIP Spectrum, Inc. www.sipspectrum.com
131 Copyright (c) 2007-2008, Plantronics, Inc.
132 All rights reserved.
133
134 Redistribution and use in source and binary forms, with or without
135 modification, are permitted provided that the following conditions are
136 met:
137
138 1. Redistributions of source code must retain the above copyright
139 notice, this list of conditions and the following disclaimer.
140
141 2. Redistributions in binary form must reproduce the above copyright
142 notice, this list of conditions and the following disclaimer in the
143 documentation and/or other materials provided with the distribution.
144
145 3. Neither the name of Plantronics nor the names of its contributors
146 may be used to endorse or promote products derived from this
147 software without specific prior written permission.
148
149 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
150 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
151 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
152 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
153 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
154 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
155 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
156 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
157 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
158 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
159 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
160
161 ==================================================================== */
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.
This class is one of two main classes of concern to an application using the UserAgent library.
This is the base class for a LibWebRTCRemoteParticipant, LibWebRTCLocalParticipant and a LibWebRTCMed...
This class represent a remote participant.
virtual LibWebRTCRemoteParticipantDialogSet & getLibWebRTCDialogSet()
std::shared_ptr< libwebrtc::MediaElement > mMultiqueue
std::shared_ptr< libwebrtc::PassThroughElement > mPassThrough
virtual void addToConversation(Conversation *conversation, unsigned int inputGain=100, unsigned int outputGain=100) override
virtual void adjustRTPStreams(bool sendingOffer=false)
std::shared_ptr< libwebrtc::PlayerEndpoint > mPlayer
virtual std::shared_ptr< libwebrtc::MediaElement > getWaitingModeElement()
virtual bool onTrickleIce(resip::TrickleIceContents &trickleIce) override
virtual std::shared_ptr< libwebrtc::BaseRtpEndpoint > getEndpoint()
virtual bool onMediaControlEvent(resip::MediaControlContents::MediaControl &mediaControl)
virtual void removeFromConversation(Conversation *conversation) override
virtual void buildSdpOffer(bool holdSdp, CallbackSdpReady sdpReady, bool preferExistingSdp=false)
This class is used by Invite DialogSets.
This class represent a remote participant.
std::function< void(bool sdpOk, std::unique_ptr< resip::SdpContents > sdp)> CallbackSdpReady
RemoteParticipantDialogSet & getDialogSet()
Provides an interface to process and generate SDP bodies (MIME content-type application/sdp).
unsigned int ParticipantHandle
dcm! – add UnusedChecking(_enum) below;
void list()
Definition userAdmin.cxx:66