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