00001 /*************************************************************************** 00002 RTPReceiverInfo.h - description 00003 ------------------- 00004 begin : Wed Dec 5 2001 00005 copyright : (C) 2001 by Matthias Oppitz 00006 email : Matthias.Oppitz@gmx.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 00023 #ifndef __RTPRECEIVERINFO_H__ 00024 #define __RTPRECEIVERINFO_H__ 00025 00026 #include "omnetpp.h" 00027 00028 #include "types.h" 00029 #include "RTPParticipantInfo.h" 00030 00037 class RTPReceiverInfo : public RTPParticipantInfo { 00038 00039 public: 00040 00044 RTPReceiverInfo(u_int32 ssrc = 0); 00045 00049 RTPReceiverInfo(const RTPReceiverInfo& receiverInfo); 00050 00054 virtual ~RTPReceiverInfo(); 00055 00059 RTPReceiverInfo& operator=(const RTPReceiverInfo& receiverInfo); 00060 00064 virtual cObject *dup() const; 00065 00069 virtual const char *className() const; 00070 00075 virtual void processRTPPacket(RTPPacket *packet, simtime_t arrivalTime); 00076 00080 virtual void processSenderReport(SenderReport *report, simtime_t arrivalTime); 00081 00085 virtual void processSDESChunk(SDESChunk *sdesChunk, simtime_t arrivalTime); 00086 00091 virtual ReceptionReport *receptionReport(simtime_t now); 00092 00096 virtual void nextInterval(simtime_t now); 00097 00101 virtual bool active(); 00102 00106 virtual bool valid(); 00107 00113 virtual bool toBeDeleted(simtime_t now); 00114 00115 00116 private: 00117 00121 u_int16 _sequenceNumberBase; 00122 00126 u_int16 _highestSequenceNumber; 00127 00132 u_int32 _highestSequenceNumberPrior; 00133 00137 u_int32 _sequenceNumberCycles; 00138 00142 u_int32 _packetsReceived; 00143 00148 u_int32 _packetsReceivedPrior; 00149 00153 double _jitter; 00154 00160 int _clockRate; 00161 00165 u_int32 _lastSenderReportRTPTimeStamp; 00166 00170 u_int64 _lastSenderReportNTPTimeStamp; 00171 00176 u_int32 _lastPacketRTPTimeStamp; 00177 00182 simtime_t _lastPacketArrivalTime; 00183 00187 simtime_t _lastSenderReportArrivalTime; 00188 00193 int _inactiveIntervals; 00194 00199 simtime_t _startOfInactivity; 00200 00204 int _itemsReceived; 00205 00206 }; 00207 00208 #endif