jrtplib  3.7.1
rtpsessionparams.h
Go to the documentation of this file.
1 /*
2 
3  This file is a part of JRTPLIB
4  Copyright (c) 1999-2007 Jori Liesenborgs
5 
6  Contact: jori.liesenborgs@gmail.com
7 
8  This library was developed at the "Expertisecentrum Digitale 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 
52 {
53 public:
55 
59  int SetUsePollThread(bool usethread);
60 
62  bool IsUsingPollThread() const { return usepollthread; }
63 
65  void SetMaximumPacketSize(size_t max) { maxpacksize = max; }
66 
68  size_t GetMaximumPacketSize() const { return maxpacksize; }
69 
73  void SetAcceptOwnPackets(bool accept) { acceptown = accept; }
74 
76  bool AcceptOwnPackets() const { return acceptown; }
77 
79  void SetReceiveMode(RTPTransmitter::ReceiveMode recvmode) { receivemode = recvmode; }
80 
82  RTPTransmitter::ReceiveMode GetReceiveMode() const { return receivemode; }
83 
90  void SetOwnTimestampUnit(double tsunit) { owntsunit = tsunit; }
91 
93  double GetOwnTimestampUnit() const { return owntsunit; }
94 
100  void SetResolveLocalHostname(bool v) { resolvehostname = v; }
101 
105  bool GetResolveLocalHostname() const { return resolvehostname; }
106 #ifdef RTP_SUPPORT_PROBATION
107 
108  void SetProbationType(RTPSources::ProbationType probtype) { probationtype = probtype; }
109 
111  RTPSources::ProbationType GetProbationType() const { return probationtype; }
112 #endif // RTP_SUPPORT_PROBATION
113 
115  void SetSessionBandwidth(double sessbw) { sessionbandwidth = sessbw; }
116 
118  double GetSessionBandwidth() const { return sessionbandwidth; }
119 
121  void SetControlTrafficFraction(double frac) { controlfrac = frac; }
122 
124  double GetControlTrafficFraction() const { return controlfrac; }
125 
127  void SetSenderControlBandwidthFraction(double frac) { senderfrac = frac; }
128 
130  double GetSenderControlBandwidthFraction() const { return senderfrac; }
131 
133  void SetMinimumRTCPTransmissionInterval(const RTPTime &t) { mininterval = t; }
134 
136  RTPTime GetMinimumRTCPTransmissionInterval() const { return mininterval; }
137 
141  void SetUseHalfRTCPIntervalAtStartup(bool usehalf) { usehalfatstartup = usehalf; }
142 
146  bool GetUseHalfRTCPIntervalAtStartup() const { return usehalfatstartup; }
147 
149  void SetRequestImmediateBYE(bool v) { immediatebye = v; }
150 
152  bool GetRequestImmediateBYE() const { return immediatebye; }
153 
157  void SetSenderReportForBYE(bool v) { SR_BYE = v; }
158 
162  bool GetSenderReportForBYE() const { return SR_BYE; }
163 
165  void SetSenderTimeoutMultiplier(double m) { sendermultiplier = m; }
166 
168  double GetSenderTimeoutMultiplier() const { return sendermultiplier; }
169 
171  void SetSourceTimeoutMultiplier(double m) { generaltimeoutmultiplier = m; }
172 
174  double GetSourceTimeoutMultiplier() const { return generaltimeoutmultiplier; }
175 
177  void SetBYETimeoutMultiplier(double m) { byetimeoutmultiplier = m; }
178 
180  double GetBYETimeoutMultiplier() const { return byetimeoutmultiplier; }
181 
183  void SetCollisionTimeoutMultiplier(double m) { collisionmultiplier = m; }
184 
186  double GetCollisionTimeoutMultiplier() const { return collisionmultiplier; }
187 
189  void SetNoteTimeoutMultiplier(double m) { notemultiplier = m; }
190 
192  double GetNoteTimeoutMultiplier() const { return notemultiplier; }
193 private:
194  bool acceptown;
195  bool usepollthread;
196  size_t maxpacksize;
197  double owntsunit;
198  RTPTransmitter::ReceiveMode receivemode;
199  bool resolvehostname;
200 #ifdef RTP_SUPPORT_PROBATION
201  RTPSources::ProbationType probationtype;
202 #endif // RTP_SUPPORT_PROBATION
203 
204  double sessionbandwidth;
205  double controlfrac;
206  double senderfrac;
207  RTPTime mininterval;
208  bool usehalfatstartup;
209  bool immediatebye;
210  bool SR_BYE;
211 
212  double sendermultiplier;
213  double generaltimeoutmultiplier;
214  double byetimeoutmultiplier;
215  double collisionmultiplier;
216  double notemultiplier;
217 };
218 
219 #endif // RTPSESSIONPARAMS_H
220