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.
Public Member Functions | Private Attributes | List of all members
qrtplib::RTCPSchedulerParams Class Reference

#include <rtcpscheduler.h>

+ Collaboration diagram for qrtplib::RTCPSchedulerParams:

Public Member Functions

 RTCPSchedulerParams ()
 
 ~RTCPSchedulerParams ()
 
int SetRTCPBandwidth (double bw)
 
double GetRTCPBandwidth () const
 
int SetSenderBandwidthFraction (double fraction)
 
double GetSenderBandwidthFraction () const
 
int SetMinimumTransmissionInterval (const RTPTime &t)
 
RTPTime GetMinimumTransmissionInterval () const
 
void SetUseHalfAtStartup (bool usehalf)
 
bool GetUseHalfAtStartup () const
 
void SetRequestImmediateBYE (bool v)
 
bool GetRequestImmediateBYE () const
 

Private Attributes

double bandwidth
 
double senderfraction
 
RTPTime mininterval
 
bool usehalfatstartup
 
bool immediatebye
 

Detailed Description

Describes parameters used by the RTCPScheduler class.

Definition at line 56 of file rtcpscheduler.h.

Constructor & Destructor Documentation

◆ RTCPSchedulerParams()

qrtplib::RTCPSchedulerParams::RTCPSchedulerParams ( )

Definition at line 46 of file rtcpscheduler.cpp.

References bandwidth, qrtplib::RTPTimeInitializerObject::Dummy(), immediatebye, RTCP_DEFAULTHALFATSTARTUP, RTCP_DEFAULTIMMEDIATEBYE, RTCP_DEFAULTSENDERFRACTION, senderfraction, qrtplib::timeinit, and usehalfatstartup.

46  :
48 {
49  bandwidth = 1000; // TODO What is a good value here?
53  timeinit.Dummy();
54 }
RTPTimeInitializerObject timeinit
#define RTCP_DEFAULTIMMEDIATEBYE
Definition: rtpdefines.h:72
#define RTCP_DEFAULTMININTERVAL
Definition: rtpdefines.h:68
#define RTCP_DEFAULTSENDERFRACTION
Definition: rtpdefines.h:70
#define RTCP_DEFAULTHALFATSTARTUP
Definition: rtpdefines.h:71
+ Here is the call graph for this function:

◆ ~RTCPSchedulerParams()

qrtplib::RTCPSchedulerParams::~RTCPSchedulerParams ( )

Definition at line 56 of file rtcpscheduler.cpp.

57 {
58 }

Member Function Documentation

◆ GetMinimumTransmissionInterval()

RTPTime qrtplib::RTCPSchedulerParams::GetMinimumTransmissionInterval ( ) const
inline

Returns the minimum RTCP transmission interval (default is 5 seconds).

Definition at line 84 of file rtcpscheduler.h.

Referenced by qrtplib::RTCPScheduler::CalculateBYETransmissionInterval(), and qrtplib::RTCPScheduler::CalculateDeterministicInterval().

85  {
86  return mininterval;
87  }
+ Here is the caller graph for this function:

◆ GetRequestImmediateBYE()

bool qrtplib::RTCPSchedulerParams::GetRequestImmediateBYE ( ) const
inline

Returns if the scheduler will schedule a BYE packet to be sent immediately if allowed (default is true).

Definition at line 112 of file rtcpscheduler.h.

Referenced by qrtplib::RTCPScheduler::ScheduleBYEPacket().

113  {
114  return immediatebye;
115  }
+ Here is the caller graph for this function:

◆ GetRTCPBandwidth()

double qrtplib::RTCPSchedulerParams::GetRTCPBandwidth ( ) const
inline

Returns the used RTCP bandwidth in bytes per second (default is 1000).

Definition at line 66 of file rtcpscheduler.h.

Referenced by qrtplib::RTCPScheduler::CalculateBYETransmissionInterval(), and qrtplib::RTCPScheduler::CalculateDeterministicInterval().

67  {
68  return bandwidth;
69  }
+ Here is the caller graph for this function:

◆ GetSenderBandwidthFraction()

double qrtplib::RTCPSchedulerParams::GetSenderBandwidthFraction ( ) const
inline

Returns the fraction of the RTCP bandwidth reserved for senders (default is 25%).

Definition at line 75 of file rtcpscheduler.h.

Referenced by qrtplib::RTCPScheduler::CalculateBYETransmissionInterval(), and qrtplib::RTCPScheduler::CalculateDeterministicInterval().

76  {
77  return senderfraction;
78  }
+ Here is the caller graph for this function:

◆ GetUseHalfAtStartup()

bool qrtplib::RTCPSchedulerParams::GetUseHalfAtStartup ( ) const
inline

Returns true if only half the minimum interval should be used before sending the first RTCP compound packet (defualt is true).

Definition at line 98 of file rtcpscheduler.h.

Referenced by qrtplib::RTCPScheduler::CalculateBYETransmissionInterval(), and qrtplib::RTCPScheduler::CalculateDeterministicInterval().

99  {
100  return usehalfatstartup;
101  }
+ Here is the caller graph for this function:

◆ SetMinimumTransmissionInterval()

int qrtplib::RTCPSchedulerParams::SetMinimumTransmissionInterval ( const RTPTime t)

Sets the minimum (deterministic) interval between RTCP compound packets to t.

Definition at line 76 of file rtcpscheduler.cpp.

References ERR_RTP_SCHEDPARAMS_BADMINIMUMINTERVAL, qrtplib::RTPTime::GetDouble(), mininterval, and RTCPSCHED_MININTERVAL.

Referenced by qrtplib::RTPSession::InternalCreate().

77 {
78  double t2 = t.GetDouble();
79 
80  if (t2 < RTCPSCHED_MININTERVAL)
82 
83  mininterval = t;
84  return 0;
85 }
#define RTCPSCHED_MININTERVAL
#define ERR_RTP_SCHEDPARAMS_BADMINIMUMINTERVAL
Definition: rtperrors.h:105
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetRequestImmediateBYE()

void qrtplib::RTCPSchedulerParams::SetRequestImmediateBYE ( bool  v)
inline

If v is true, the scheduler will schedule a BYE packet to be sent immediately if allowed.

Definition at line 104 of file rtcpscheduler.h.

Referenced by qrtplib::RTPSession::InternalCreate().

105  {
106  immediatebye = v;
107  }
+ Here is the caller graph for this function:

◆ SetRTCPBandwidth()

int qrtplib::RTCPSchedulerParams::SetRTCPBandwidth ( double  bw)

Sets the RTCP bandwidth to be used to bw (in bytes per second).

Definition at line 60 of file rtcpscheduler.cpp.

References bandwidth, and ERR_RTP_SCHEDPARAMS_INVALIDBANDWIDTH.

Referenced by qrtplib::RTPSession::InternalCreate(), and qrtplib::RTPSession::SetSessionBandwidth().

61 {
62  if (bw < 0.0)
64  bandwidth = bw;
65  return 0;
66 }
#define ERR_RTP_SCHEDPARAMS_INVALIDBANDWIDTH
Definition: rtperrors.h:106
+ Here is the caller graph for this function:

◆ SetSenderBandwidthFraction()

int qrtplib::RTCPSchedulerParams::SetSenderBandwidthFraction ( double  fraction)

Sets the fraction of the RTCP bandwidth reserved for senders to fraction.

Definition at line 68 of file rtcpscheduler.cpp.

References ERR_RTP_SCHEDPARAMS_BADFRACTION, and senderfraction.

Referenced by qrtplib::RTPSession::InternalCreate().

69 {
70  if (fraction < 0.0 || fraction > 1.0)
72  senderfraction = fraction;
73  return 0;
74 }
#define ERR_RTP_SCHEDPARAMS_BADFRACTION
Definition: rtperrors.h:104
+ Here is the caller graph for this function:

◆ SetUseHalfAtStartup()

void qrtplib::RTCPSchedulerParams::SetUseHalfAtStartup ( bool  usehalf)
inline

If usehalf is true, only use half the minimum interval before sending the first RTCP compound packet.

Definition at line 90 of file rtcpscheduler.h.

Referenced by qrtplib::RTPSession::InternalCreate().

91  {
92  usehalfatstartup = usehalf;
93  }
+ Here is the caller graph for this function:

Member Data Documentation

◆ bandwidth

double qrtplib::RTCPSchedulerParams::bandwidth
private

Definition at line 117 of file rtcpscheduler.h.

Referenced by RTCPSchedulerParams(), and SetRTCPBandwidth().

◆ immediatebye

bool qrtplib::RTCPSchedulerParams::immediatebye
private

Definition at line 121 of file rtcpscheduler.h.

Referenced by RTCPSchedulerParams().

◆ mininterval

RTPTime qrtplib::RTCPSchedulerParams::mininterval
private

Definition at line 119 of file rtcpscheduler.h.

Referenced by SetMinimumTransmissionInterval().

◆ senderfraction

double qrtplib::RTCPSchedulerParams::senderfraction
private

Definition at line 118 of file rtcpscheduler.h.

Referenced by RTCPSchedulerParams(), and SetSenderBandwidthFraction().

◆ usehalfatstartup

bool qrtplib::RTCPSchedulerParams::usehalfatstartup
private

Definition at line 120 of file rtcpscheduler.h.

Referenced by RTCPSchedulerParams().


The documentation for this class was generated from the following files: