reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
MediaStreamEvent.cxx
Go to the documentation of this file.
2
5
6#include <rutil/Logger.hxx>
7
8using namespace recon;
9using namespace resip;
10
11#define RESIPROCATE_SUBSYSTEM ReconSubsystem::RECON
12
13namespace recon {
14
17{
18 strm << "MediaStreamReadyEvent::ReTurnParams: rtpTuple: " << mRtpTuple << " rtcpTuple=" << mRtcpTuple;
19 return strm;
20}
21
24{
25 return encode(strm);
26}
27
29 ParticipantHandle partHandle,
30 std::shared_ptr<StreamParams> streamParams) :
31 mConversationManager(conversationManager),
32 mPartHandle(partHandle),
33 mStreamParams(streamParams)
34{
35}
36
37void
39{
40 RemoteParticipant* remoteParticipant = dynamic_cast<RemoteParticipant*>(mConversationManager->getParticipant(mPartHandle));
41 if (remoteParticipant)
42 {
43 remoteParticipant->getDialogSet().processMediaStreamReadyEvent(mStreamParams);
44 }
45}
46
49{
50 resip_assert(0);
51 return 0;
52}
53
55MediaStreamReadyEvent::encode(EncodeStream& strm) const
56{
57 strm << "MediaStreamReadyEvent: streamParams: " << mStreamParams;
58 return strm;
59}
60
62MediaStreamReadyEvent::encodeBrief(EncodeStream& strm) const
63{
64 return encode(strm);
65}
66
68 ParticipantHandle partHandle,
69 unsigned int errorCode) :
70 mConversationManager(conversationManager),
71 mPartHandle(partHandle),
72 mErrorCode(errorCode)
73{
74}
75
76void
78{
79 RemoteParticipant* remoteParticipant = dynamic_cast<RemoteParticipant*>(mConversationManager->getParticipant(mPartHandle));
80 if (remoteParticipant)
81 {
82 remoteParticipant->getDialogSet().processMediaStreamErrorEvent(mErrorCode);
83 }
84}
85
88{
89 resip_assert(0);
90 return 0;
91}
92
94MediaStreamErrorEvent::encode(EncodeStream& strm) const
95{
96 strm << "MediaStreamErrorEvent: errorCode: " << mErrorCode;
97 return strm;
98}
99
101MediaStreamErrorEvent::encodeBrief(EncodeStream& strm) const
102{
103 return encode(strm);
104}
105
107operator<<(EncodeStream& strm, const MediaStreamReadyEvent::StreamParams& params)
108{
109 return params.encode(strm);
110}
111
112}
113
114/* ====================================================================
115
116 Copyright (c) 2021-2026, SIP Spectrum, Inc. http://www.sipspectrum.com
117 Copyright (c) 2021, Daniel Pocock https://danielpocock.com
118 Copyright (c) 2007-2008, Plantronics, Inc.
119 All rights reserved.
120
121 Redistribution and use in source and binary forms, with or without
122 modification, are permitted provided that the following conditions are
123 met:
124
125 1. Redistributions of source code must retain the above copyright
126 notice, this list of conditions and the following disclaimer.
127
128 2. Redistributions in binary form must reproduce the above copyright
129 notice, this list of conditions and the following disclaimer in the
130 documentation and/or other materials provided with the distribution.
131
132 3. Neither the name of Plantronics nor the names of its contributors
133 may be used to endorse or promote products derived from this
134 software without specific prior written permission.
135
136 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
137 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
138 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
139 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
140 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
141 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
142 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
143 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
144 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
145 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
146 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
147
148 ==================================================================== */
#define resip_assert(x)
This file needs to work for both C and C++ code.
This class is one of two main classes of concern to an application using the UserAgent library.
MediaStreamErrorEvent(ConversationManager *conversationManager, ParticipantHandle partHandle, unsigned int errorCode)
EncodeStream & encode(EncodeStream &strm) const
output the entire message to stream
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
EncodeStream & encodeBrief(EncodeStream &strm) const
EncodeStream & encode(EncodeStream &strm) const
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
EncodeStream & encode(EncodeStream &strm) const
output the entire message to stream
MediaStreamReadyEvent(ConversationManager *conversationManager, ParticipantHandle partHandle, std::shared_ptr< StreamParams > streamParams)
virtual void processMediaStreamErrorEvent(unsigned int errorCode)
virtual void processMediaStreamReadyEvent(std::shared_ptr< MediaStreamReadyEvent::StreamParams > streamParams)
This class represent a remote participant.
RemoteParticipantDialogSet & getDialogSet()
The base-class used for message-passing.
Definition Message.hxx:21
unsigned int ParticipantHandle
EncodeStream & operator<<(EncodeStream &strm, const MediaStreamReadyEvent::StreamParams &params)
dcm! – add UnusedChecking(_enum) below;
#define EncodeStream