JRTPLIB  3.9.0
Public Member Functions | List of all members
jrtplib::RTCPScheduler Class Reference

This class determines when RTCP compound packets should be sent. More...

#include <rtcpscheduler.h>

Public Member Functions

 RTCPScheduler (RTPSources &sources, RTPRandom &rtprand)
 Creates an instance which will use the source table RTPSources to determine when RTCP compound packets should be scheduled. More...
 
void Reset ()
 Resets the scheduler. More...
 
void SetParameters (const RTCPSchedulerParams &params)
 Sets the scheduler parameters to be used to params. More...
 
RTCPSchedulerParams GetParameters () const
 Returns the currently used scheduler parameters. More...
 
void SetHeaderOverhead (size_t numbytes)
 Sets the header overhead from underlying protocols (for example UDP and IP) to numbytes. More...
 
size_t GetHeaderOverhead () const
 Returns the currently used header overhead. More...
 
void AnalyseIncoming (RTCPCompoundPacket &rtcpcomppack)
 For each incoming RTCP compound packet, this function has to be called for the scheduler to work correctly. More...
 
void AnalyseOutgoing (RTCPCompoundPacket &rtcpcomppack)
 For each outgoing RTCP compound packet, this function has to be called for the scheduler to work correctly. More...
 
void ActiveMemberDecrease ()
 This function has to be called each time a member times out or sends a BYE packet. More...
 
void ScheduleBYEPacket (size_t packetsize)
 Asks the scheduler to schedule an RTCP compound packet containing a BYE packetl; the compound packet has size packetsize.
 
RTPTime GetTransmissionDelay ()
 Returns the delay after which an RTCP compound will possibly have to be sent. More...
 
bool IsTime ()
 This function returns true if it's time to send an RTCP compound packet and false otherwise. More...
 
RTPTime CalculateDeterministicInterval (bool sender=false)
 Calculates the deterministic interval at this time. More...
 

Detailed Description

Constructor & Destructor Documentation

jrtplib::RTCPScheduler::RTCPScheduler ( RTPSources sources,
RTPRandom rtprand 
)

Creates an instance which will use the source table RTPSources to determine when RTCP compound packets should be scheduled. Note that for correct operation the sources instance should have information about the own SSRC (added by RTPSources::CreateOwnSSRC). You must also supply a random number generator rtprand which will be used for adding randomness to the RTCP intervals.

Member Function Documentation

void jrtplib::RTCPScheduler::ActiveMemberDecrease ( )
void jrtplib::RTCPScheduler::AnalyseIncoming ( RTCPCompoundPacket rtcpcomppack)
void jrtplib::RTCPScheduler::AnalyseOutgoing ( RTCPCompoundPacket rtcpcomppack)
RTPTime jrtplib::RTCPScheduler::CalculateDeterministicInterval ( bool  sender = false)

Calculates the deterministic interval at this time. This is used - in combination with a certain multiplier - to time out members, senders etc.

size_t jrtplib::RTCPScheduler::GetHeaderOverhead ( ) const
inline
RTCPSchedulerParams jrtplib::RTCPScheduler::GetParameters ( ) const
inline
RTPTime jrtplib::RTCPScheduler::GetTransmissionDelay ( )

Returns the delay after which an RTCP compound will possibly have to be sent. The IsTime member function should be called afterwards to make sure that it actually is time to send an RTCP compound packet.

bool jrtplib::RTCPScheduler::IsTime ( )

This function returns true if it's time to send an RTCP compound packet and false otherwise. If the function returns true, it will also have calculated the next time at which a packet should be sent, so if it is called again right away, it will return false.

void jrtplib::RTCPScheduler::Reset ( )
void jrtplib::RTCPScheduler::SetHeaderOverhead ( size_t  numbytes)
inline
void jrtplib::RTCPScheduler::SetParameters ( const RTCPSchedulerParams params)
inline

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