37 #ifndef RTCPSCHEDULER_H
39 #define RTCPSCHEDULER_H
41 #include "rtpconfig.h"
91 double senderfraction;
93 bool usehalfatstartup;
158 void CalculateNextRTCPTime();
159 void PerformReverseReconsideration();
160 RTPTime CalculateBYETransmissionInterval();
161 RTPTime CalculateTransmissionInterval(
bool sender);
165 size_t headeroverhead;
166 size_t avgrtcppacksize;
175 int byemembers,pbyemembers;
176 size_t avgbyepacketsize;
182 #endif // RTCPSCHEDULER_H
int SetMinimumTransmissionInterval(const RTPTime &t)
Sets the minimum (deterministic) interval between RTCP compound packets to t.
double GetRTCPBandwidth() const
Returns the used RTCP bandwidth in bytes per second (default is 1000).
Definition: rtcpscheduler.h:60
double GetSenderBandwidthFraction() const
Returns the fraction of the RTCP bandwidth reserved for senders (default is 25%). ...
Definition: rtcpscheduler.h:66
void ScheduleBYEPacket(size_t packetsize)
Asks the scheduler to schedule an RTCP compound packet containing a BYE packetl; the compound packet ...
void AnalyseOutgoing(RTCPCompoundPacket &rtcpcomppack)
For each outgoing RTCP compound packet, this function has to be called for the scheduler to work corr...
Represents an RTP Packet.
Definition: rtppacket.h:53
void SetRequestImmediateBYE(bool v)
If v is true, the scheduler will schedule a BYE packet to be sent immediately if allowed.
Definition: rtcpscheduler.h:83
RTPTime GetTransmissionDelay()
Returns the delay after which an RTCP compound will possibly have to be sent.
Represents a table in which information about the participating sources is kept.
Definition: rtpsources.h:71
int SetRTCPBandwidth(double bw)
Sets the RTCP bandwidth to be used to bw (in bytes per second).
int SetSenderBandwidthFraction(double fraction)
Sets the fraction of the RTCP bandwidth reserved for senders to fraction.
This class is used to specify wallclock time, delay intervals etc.
Definition: rtptimeutilities.h:77
Represents an RTCP compound packet.
Definition: rtcpcompoundpacket.h:50
void ActiveMemberDecrease()
This function has to be called each time a member times out or sends a BYE packet.
size_t GetHeaderOverhead() const
Returns the currently used header overhead.
Definition: rtcpscheduler.h:123
bool GetUseHalfAtStartup() const
Returns true if only half the minimum interval should be used before sending the first RTCP compound ...
Definition: rtcpscheduler.h:80
bool IsTime()
This function returns true if it's time to send an RTCP compound packet and false otherwise...
void SetHeaderOverhead(size_t numbytes)
Sets the header overhead from underlying protocols (for example UDP and IP) to numbytes.
Definition: rtcpscheduler.h:120
void AnalyseIncoming(RTCPCompoundPacket &rtcpcomppack)
For each incoming RTCP compound packet, this function has to be called for the scheduler to work corr...
void Reset()
Resets the scheduler.
void SetUseHalfAtStartup(bool usehalf)
If usehalf is true, only use half the minimum interval before sending the first RTCP compound packet...
Definition: rtcpscheduler.h:75
bool GetRequestImmediateBYE() const
Returns if the scheduler will schedule a BYE packet to be sent immediately if allowed (default is tru...
Definition: rtcpscheduler.h:88
RTCPScheduler(RTPSources &sources)
Creates an instance which will use the source table RTPSources to determine when RTCP compound packet...
void SetParameters(const RTCPSchedulerParams ¶ms)
Sets the scheduler parameters to be used to params.
Definition: rtcpscheduler.h:114
Describes parameters used by the RTCPScheduler class.
Definition: rtcpscheduler.h:50
This class determines when RTCP compound packets should be sent.
Definition: rtcpscheduler.h:98
RTPTime GetMinimumTransmissionInterval() const
Returns the minimum RTCP transmission interval (default is 5 seconds).
Definition: rtcpscheduler.h:72
RTPTime CalculateDeterministicInterval(bool sender=false)
Calculates the deterministic interval at this time.
The RTPRandom class can be used to generate random numbers.
Definition: rtprandom.h:46
RTCPSchedulerParams GetParameters() const
Returns the currently used scheduler parameters.
Definition: rtcpscheduler.h:117