00001 /*************************************************************************** 00002 RTPReceiverInfo.h - description 00003 ------------------- 00004 (C) 2007 Ahmed Ayadi <ahmed.ayadi@sophia.inria.fr> 00005 (C) 2001 Matthias Oppitz <Matthias.Oppitz@gmx.de> 00006 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 __INET_RTPRECEIVERINFO_H 00024 #define __INET_RTPRECEIVERINFO_H 00025 00026 #include <cassert> 00027 #include "INETDefs.h" 00028 #include "RTPParticipantInfo.h" 00029 00036 class INET_API RTPReceiverInfo : public RTPParticipantInfo 00037 { 00038 00039 public: 00040 00044 RTPReceiverInfo(uint32 ssrc = 0); 00045 00049 RTPReceiverInfo(const RTPReceiverInfo& receiverInfo); 00050 00054 virtual ~RTPReceiverInfo(); 00055 00059 RTPReceiverInfo& operator=(const RTPReceiverInfo& receiverInfo); 00060 00064 virtual RTPReceiverInfo *dup() const; 00065 00070 virtual void processRTPPacket(RTPPacket *packet, int id, simtime_t arrivalTime); 00071 00075 virtual void processSenderReport(SenderReport *report, simtime_t arrivalTime); 00076 00080 virtual void processSDESChunk(SDESChunk *sdesChunk, simtime_t arrivalTime); 00081 00086 virtual ReceptionReport *receptionReport(simtime_t now); 00087 00091 virtual void nextInterval(simtime_t now); 00092 00096 virtual bool isActive(); 00097 00101 virtual bool isValid(); 00102 00108 virtual bool toBeDeleted(simtime_t now); 00109 00110 00111 protected: 00112 00116 uint16 _sequenceNumberBase; 00117 00121 uint16 _highestSequenceNumber; 00122 00127 uint32 _highestSequenceNumberPrior; 00128 00132 uint32 _sequenceNumberCycles; 00133 00137 uint32 _packetsReceived; 00138 00143 uint32 _packetsReceivedPrior; 00144 00148 simtime_t _jitter; 00149 00153 cOutVector _jitterOutVector; 00157 cOutVector _packetLostOutVector; 00163 int _clockRate; 00164 00168 uint32 _lastSenderReportRTPTimeStamp; 00169 00173 uint64 _lastSenderReportNTPTimeStamp; 00174 00179 uint32 _lastPacketRTPTimeStamp; 00180 00185 simtime_t _lastPacketArrivalTime; 00186 00190 simtime_t _lastSenderReportArrivalTime; 00191 00196 int _inactiveIntervals; 00197 00202 simtime_t _startOfInactivity; 00203 00207 int _itemsReceived; 00208 00209 int packetLoss; 00210 00211 FILE * packetSequenceLostLogFile ; 00212 }; 00213 00214 #endif 00215