Source: sourcestateinfo.h
|
|
|
|
// ##########################################################################
// #### ####
// #### RTP Audio Server Project ####
// #### ============================ ####
// #### ####
// #### Source State Info ####
// #### ####
// #### Version 1.00 -- February 23, 2001 ####
// #### ####
// #### Copyright (C) 1999 Thomas Dreibholz ####
// #### 2000 Universität Bonn, Abt. IV ####
// #### 2001 EMail: Dreibholz@bigfoot.com ####
// #### WWW: http://www.bigfoot.com/~dreibholz ####
// #### ####
// ##########################################################################
#ifndef SOURCESTATEINFO_H
#define SOURCESTATEINFO_H
#include "system.h"
#include "synchronizable.h"
#include "seqnumvalidator.h"
namespace Coral {
/**
* This class manages the source state information of an RTP receiver to
* be transmitted by a RTCPSender.
* See also RFC 1889 for more information on RTP.
*
* @short Source State Info
* @author Thomas Dreibholz (Dreibholz@bigfoot.com)
* @version 1.0
*
* @see RTPReceiver
* @see RTCPSender
*/
class SourceStateInfo : public SeqNumValidator,
public Synchronizable
{
// ====== Constructor ====================================================
public:
/**
* Constructor.
*/
SourceStateInfo();
// ====== Reset ==========================================================
/**
* Reset.
*/
void reset();
// ====== Status functions ===============================================
/**
* Get SSRC.
*
* @return SSRC.
*/
inline card32 getSSRC() const;
/**
* Get last sender report time stamp.
*
* @return LSR.
*/
inline card32 getLSR() const;
/**
* Calculate delay since last sender report time stamp using current time.
*
* @return DLSR.
*/
card32 calculateDLSR() const;
/**
* Set last sender report time stamp.
*
* @param lsr LSR.
*/
inline void setLSR(const card32 lsr);
/**
* Set SSRC.
*
* @return SSRC.
*/
inline void setSSRC(card32 ssrc);
// ====== Private data ===================================================
private:
card64 LSRUpdateTimeStamp; // Timestamp of last setLSR() call
card32 ReceivedPrior; // Packet received at last interval
card32 ExpectedPrior; // Packet expected at last interval
card32 FractionLost; // Fraction lost
card32 SSRC; // Data source identifier
card32 LSR; // Last SR packet from this source
};
}
#include "sourcestateinfo.icc"
#endif
Generated by: viper@odin on Fri Feb 23 12:41:26 2001, using kdoc 2.0a36. |