rtpsessionparams.h

Go to the documentation of this file.
00001 /*
00002 
00003   This file is a part of JRTPLIB
00004   Copyright (c) 1999-2007 Jori Liesenborgs
00005 
00006   Contact: jori.liesenborgs@gmail.com
00007 
00008   This library was developed at the "Expertisecentrum Digitale Media"
00009   (http://www.edm.uhasselt.be), a research center of the Hasselt University
00010   (http://www.uhasselt.be). The library is based upon work done for 
00011   my thesis at the School for Knowledge Technology (Belgium/The Netherlands).
00012 
00013   Permission is hereby granted, free of charge, to any person obtaining a
00014   copy of this software and associated documentation files (the "Software"),
00015   to deal in the Software without restriction, including without limitation
00016   the rights to use, copy, modify, merge, publish, distribute, sublicense,
00017   and/or sell copies of the Software, and to permit persons to whom the
00018   Software is furnished to do so, subject to the following conditions:
00019 
00020   The above copyright notice and this permission notice shall be included
00021   in all copies or substantial portions of the Software.
00022 
00023   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00024   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00025   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00026   THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00027   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00028   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
00029   IN THE SOFTWARE.
00030 
00031 */
00032 
00037 #ifndef RTPSESSIONPARAMS_H
00038 
00039 #define RTPSESSIONPARAMS_H
00040 
00041 #include "rtpconfig.h"
00042 #include "rtptypes.h"
00043 #include "rtptransmitter.h"
00044 #include "rtptimeutilities.h"
00045 #include "rtpsources.h"
00046 
00051 class RTPSessionParams
00052 {
00053 public:
00054         RTPSessionParams();
00055         
00059         int SetUsePollThread(bool usethread);
00060 
00062         bool IsUsingPollThread() const                                          { return usepollthread; }
00063 
00065         void SetMaximumPacketSize(size_t max)                                   { maxpacksize = max; }
00066 
00068         size_t GetMaximumPacketSize() const                                     { return maxpacksize; }
00069 
00073         void SetAcceptOwnPackets(bool accept)                                   { acceptown = accept; }
00074         
00076         bool AcceptOwnPackets() const                                           { return acceptown; }
00077 
00079         void SetReceiveMode(RTPTransmitter::ReceiveMode recvmode)               { receivemode = recvmode; }
00080 
00082         RTPTransmitter::ReceiveMode GetReceiveMode() const                      { return receivemode; }
00083 
00090         void SetOwnTimestampUnit(double tsunit)                                 { owntsunit = tsunit; }
00091 
00093         double GetOwnTimestampUnit() const                                      { return owntsunit; }
00094 
00100         void SetResolveLocalHostname(bool v)                                    { resolvehostname = v; }
00101 
00105         bool GetResolveLocalHostname() const                                    { return resolvehostname; }
00106 #ifdef RTP_SUPPORT_PROBATION
00107 
00108         void SetProbationType(RTPSources::ProbationType probtype)               { probationtype = probtype; }
00109 
00111         RTPSources::ProbationType GetProbationType() const                      { return probationtype; }
00112 #endif // RTP_SUPPORT_PROBATION
00113 
00115         void SetSessionBandwidth(double sessbw)                                 { sessionbandwidth = sessbw; }
00116 
00118         double GetSessionBandwidth() const                                      { return sessionbandwidth; }
00119 
00121         void SetControlTrafficFraction(double frac)                             { controlfrac = frac; }
00122 
00124         double GetControlTrafficFraction() const                                { return controlfrac; }
00125 
00127         void SetSenderControlBandwidthFraction(double frac)                     { senderfrac = frac; }
00128 
00130         double GetSenderControlBandwidthFraction() const                        { return senderfrac; }
00131 
00133         void SetMinimumRTCPTransmissionInterval(const RTPTime &t)               { mininterval = t; }
00134 
00136         RTPTime GetMinimumRTCPTransmissionInterval() const                      { return mininterval; }
00137 
00141         void SetUseHalfRTCPIntervalAtStartup(bool usehalf)                      { usehalfatstartup = usehalf; }
00142 
00146         bool GetUseHalfRTCPIntervalAtStartup() const                            { return usehalfatstartup; }
00147 
00149         void SetRequestImmediateBYE(bool v)                                     { immediatebye = v; }
00150 
00152         bool GetRequestImmediateBYE() const                                     { return immediatebye; }
00153 
00157         void SetSenderReportForBYE(bool v)                                      { SR_BYE = v; }
00158 
00162         bool GetSenderReportForBYE() const                                      { return SR_BYE; }
00163         
00165         void SetSenderTimeoutMultiplier(double m)                               { sendermultiplier = m; }
00166 
00168         double GetSenderTimeoutMultiplier() const                               { return sendermultiplier; }
00169 
00171         void SetSourceTimeoutMultiplier(double m)                               { generaltimeoutmultiplier = m; }
00172 
00174         double GetSourceTimeoutMultiplier() const                               { return generaltimeoutmultiplier; }
00175 
00177         void SetBYETimeoutMultiplier(double m)                                  { byetimeoutmultiplier = m; }
00178 
00180         double GetBYETimeoutMultiplier() const                                  { return byetimeoutmultiplier; }
00181 
00183         void SetCollisionTimeoutMultiplier(double m)                            { collisionmultiplier = m; }
00184 
00186         double GetCollisionTimeoutMultiplier() const                            { return collisionmultiplier; }
00187 
00189         void SetNoteTimeoutMultiplier(double m)                                 { notemultiplier = m; }
00190 
00192         double GetNoteTimeoutMultiplier() const                                 { return notemultiplier; }
00193 private:
00194         bool acceptown;
00195         bool usepollthread;
00196         size_t maxpacksize;
00197         double owntsunit;
00198         RTPTransmitter::ReceiveMode receivemode;
00199         bool resolvehostname;
00200 #ifdef RTP_SUPPORT_PROBATION
00201         RTPSources::ProbationType probationtype;
00202 #endif // RTP_SUPPORT_PROBATION
00203         
00204         double sessionbandwidth;
00205         double controlfrac;
00206         double senderfrac;
00207         RTPTime mininterval;
00208         bool usehalfatstartup;
00209         bool immediatebye;
00210         bool SR_BYE;
00211 
00212         double sendermultiplier;
00213         double generaltimeoutmultiplier;
00214         double byetimeoutmultiplier;
00215         double collisionmultiplier;
00216         double notemultiplier;
00217 };
00218 
00219 #endif // RTPSESSIONPARAMS_H
00220 

Generated on Thu Feb 8 16:22:05 2007 for jrtplib by  doxygen 1.5.1