SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
rtpsessionparams.h
Go to the documentation of this file.
1 /*
2 
3  This file is a part of JRTPLIB
4  Copyright (c) 1999-2017 Jori Liesenborgs
5 
6  Contact: jori.liesenborgs@gmail.com
7 
8  This library was developed at the Expertise Centre for Digital Media
9  (http://www.edm.uhasselt.be), a research center of the Hasselt University
10  (http://www.uhasselt.be). The library is based upon work done for
11  my thesis at the School for Knowledge Technology (Belgium/The Netherlands).
12 
13  Permission is hereby granted, free of charge, to any person obtaining a
14  copy of this software and associated documentation files (the "Software"),
15  to deal in the Software without restriction, including without limitation
16  the rights to use, copy, modify, merge, publish, distribute, sublicense,
17  and/or sell copies of the Software, and to permit persons to whom the
18  Software is furnished to do so, subject to the following conditions:
19 
20  The above copyright notice and this permission notice shall be included
21  in all copies or substantial portions of the Software.
22 
23  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
29  IN THE SOFTWARE.
30 
31  */
32 
37 #ifndef RTPSESSIONPARAMS_H
38 
39 #define RTPSESSIONPARAMS_H
40 
41 #include "rtpconfig.h"
42 #include "rtptypes.h"
43 #include "rtptransmitter.h"
44 #include "rtptimeutilities.h"
45 #include "rtpsources.h"
46 
47 #include "export.h"
48 
49 namespace qrtplib
50 {
51 
57 {
58 public:
60 
64  int SetUsePollThread(bool usethread);
65 
68  int SetNeedThreadSafety(bool s);
69 
71  bool IsUsingPollThread() const
72  {
73  return usepollthread;
74  }
75 
77  void SetMaximumPacketSize(std::size_t max)
78  {
79  maxpacksize = max;
80  }
81 
83  std::size_t GetMaximumPacketSize() const
84  {
85  return maxpacksize;
86  }
87 
91  void SetAcceptOwnPackets(bool accept)
92  {
93  acceptown = accept;
94  }
95 
97  bool AcceptOwnPackets() const
98  {
99  return acceptown;
100  }
101 
104  {
105  receivemode = recvmode;
106  }
107 
110  {
111  return receivemode;
112  }
113 
120  void SetOwnTimestampUnit(double tsunit)
121  {
122  owntsunit = tsunit;
123  }
124 
126  double GetOwnTimestampUnit() const
127  {
128  return owntsunit;
129  }
130 
137  {
138  resolvehostname = v;
139  }
140 
145  {
146  return resolvehostname;
147  }
148 
150  void SetSessionBandwidth(double sessbw)
151  {
152  sessionbandwidth = sessbw;
153  }
154 
156  double GetSessionBandwidth() const
157  {
158  return sessionbandwidth;
159  }
160 
162  void SetControlTrafficFraction(double frac)
163  {
164  controlfrac = frac;
165  }
166 
169  {
170  return controlfrac;
171  }
172 
175  {
176  senderfrac = frac;
177  }
178 
181  {
182  return senderfrac;
183  }
184 
187  {
188  mininterval = t;
189  }
190 
193  {
194  return mininterval;
195  }
196 
201  {
202  usehalfatstartup = usehalf;
203  }
204 
209  {
210  return usehalfatstartup;
211  }
212 
215  {
216  immediatebye = v;
217  }
218 
221  {
222  return immediatebye;
223  }
224 
229  {
230  SR_BYE = v;
231  }
232 
237  {
238  return SR_BYE;
239  }
240 
243  {
244  sendermultiplier = m;
245  }
246 
249  {
250  return sendermultiplier;
251  }
252 
255  {
256  generaltimeoutmultiplier = m;
257  }
258 
261  {
262  return generaltimeoutmultiplier;
263  }
264 
266  void SetBYETimeoutMultiplier(double m)
267  {
268  byetimeoutmultiplier = m;
269  }
270 
272  double GetBYETimeoutMultiplier() const
273  {
274  return byetimeoutmultiplier;
275  }
276 
279  {
280  collisionmultiplier = m;
281  }
282 
285  {
286  return collisionmultiplier;
287  }
288 
291  {
292  notemultiplier = m;
293  }
294 
297  {
298  return notemultiplier;
299  }
300 
302  void SetUsePredefinedSSRC(bool f)
303  {
304  usepredefinedssrc = f;
305  }
306 
308  bool GetUsePredefinedSSRC() const
309  {
310  return usepredefinedssrc;
311  }
312 
315  {
316  predefinedssrc = ssrc;
317  }
318 
321  {
322  return predefinedssrc;
323  }
324 
326  void SetCNAME(const std::string &s)
327  {
328  cname = s;
329  }
330 
332  std::string GetCNAME() const
333  {
334  return cname;
335  }
336 
338  bool NeedThreadSafety() const
339  {
340  return m_needThreadSafety;
341  }
342 private:
343  bool acceptown;
345  std::size_t maxpacksize;
346  double owntsunit;
349 
351  double controlfrac;
352  double senderfrac;
356  bool SR_BYE;
357 
363 
366 
367  std::string cname;
369 };
370 
371 } // end namespace
372 
373 #endif // RTPSESSIONPARAMS_H
374 
RTPTransmitter::ReceiveMode GetReceiveMode() const
void SetNoteTimeoutMultiplier(double m)
void SetSenderTimeoutMultiplier(double m)
std::size_t GetMaximumPacketSize() const
double GetOwnTimestampUnit() const
double GetControlTrafficFraction() const
void SetControlTrafficFraction(double frac)
double GetSenderTimeoutMultiplier() const
double GetCollisionTimeoutMultiplier() const
void SetResolveLocalHostname(bool v)
double GetSessionBandwidth() const
void SetMaximumPacketSize(std::size_t max)
void SetCollisionTimeoutMultiplier(double m)
void SetMinimumRTCPTransmissionInterval(const RTPTime &t)
#define QRTPLIB_API
Definition: export.h:112
bool GetResolveLocalHostname() const
double GetBYETimeoutMultiplier() const
unsigned int uint32_t
Definition: rtptypes_win.h:46
void SetReceiveMode(RTPTransmitter::ReceiveMode recvmode)
std::string GetCNAME() const
void SetSenderControlBandwidthFraction(double frac)
double GetSourceTimeoutMultiplier() const
bool GetUseHalfRTCPIntervalAtStartup() const
void SetCNAME(const std::string &s)
void SetSourceTimeoutMultiplier(double m)
void SetOwnTimestampUnit(double tsunit)
void SetUseHalfRTCPIntervalAtStartup(bool usehalf)
void SetPredefinedSSRC(uint32_t ssrc)
void SetBYETimeoutMultiplier(double m)
RTPTime GetMinimumRTCPTransmissionInterval() const
void SetAcceptOwnPackets(bool accept)
double GetNoteTimeoutMultiplier() const
void SetSessionBandwidth(double sessbw)
double GetSenderControlBandwidthFraction() const
RTPTransmitter::ReceiveMode receivemode
uint32_t GetPredefinedSSRC() const
T max(const T &x, const T &y)
Definition: framework.h:446